| .. | .. |
|---|
| 19 | 19 | #include "ath9k.h" |
|---|
| 20 | 20 | #include "btcoex.h" |
|---|
| 21 | 21 | |
|---|
| 22 | +static void ath9k_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif, |
|---|
| 23 | + u32 queues, bool drop); |
|---|
| 24 | + |
|---|
| 22 | 25 | u8 ath9k_parse_mpdudensity(u8 mpdudensity) |
|---|
| 23 | 26 | { |
|---|
| 24 | 27 | /* |
|---|
| .. | .. |
|---|
| 373 | 376 | ath_dynack_node_deinit(sc->sc_ah, an); |
|---|
| 374 | 377 | } |
|---|
| 375 | 378 | |
|---|
| 376 | | -void ath9k_tasklet(unsigned long data) |
|---|
| 379 | +void ath9k_tasklet(struct tasklet_struct *t) |
|---|
| 377 | 380 | { |
|---|
| 378 | | - struct ath_softc *sc = (struct ath_softc *)data; |
|---|
| 381 | + struct ath_softc *sc = from_tasklet(sc, t, intr_tq); |
|---|
| 379 | 382 | struct ath_hw *ah = sc->sc_ah; |
|---|
| 380 | 383 | struct ath_common *common = ath9k_hw_common(ah); |
|---|
| 381 | 384 | enum ath_reset_type type; |
|---|
| .. | .. |
|---|
| 816 | 819 | |
|---|
| 817 | 820 | if (ath_tx_start(hw, skb, &txctl) != 0) { |
|---|
| 818 | 821 | ath_dbg(common, XMIT, "TX failed\n"); |
|---|
| 819 | | - TX_STAT_INC(txctl.txq->axq_qnum, txfailed); |
|---|
| 822 | + TX_STAT_INC(sc, txctl.txq->axq_qnum, txfailed); |
|---|
| 820 | 823 | goto exit; |
|---|
| 821 | 824 | } |
|---|
| 822 | 825 | |
|---|
| .. | .. |
|---|
| 836 | 839 | continue; |
|---|
| 837 | 840 | |
|---|
| 838 | 841 | txinfo = IEEE80211_SKB_CB(bf->bf_mpdu); |
|---|
| 839 | | - fi = (struct ath_frame_info *)&txinfo->rate_driver_data[0]; |
|---|
| 842 | + fi = (struct ath_frame_info *)&txinfo->status.status_driver_data[0]; |
|---|
| 840 | 843 | if (fi->keyix == keyix) |
|---|
| 841 | 844 | return true; |
|---|
| 842 | 845 | } |
|---|
| .. | .. |
|---|
| 1279 | 1282 | { |
|---|
| 1280 | 1283 | int *power = data; |
|---|
| 1281 | 1284 | |
|---|
| 1285 | + if (vif->bss_conf.txpower == INT_MIN) |
|---|
| 1286 | + return; |
|---|
| 1287 | + |
|---|
| 1282 | 1288 | if (*power < vif->bss_conf.txpower) |
|---|
| 1283 | 1289 | *power = vif->bss_conf.txpower; |
|---|
| 1284 | 1290 | } |
|---|
| .. | .. |
|---|
| 1556 | 1562 | FIF_OTHER_BSS | \ |
|---|
| 1557 | 1563 | FIF_BCN_PRBRESP_PROMISC | \ |
|---|
| 1558 | 1564 | FIF_PROBE_REQ | \ |
|---|
| 1565 | + FIF_MCAST_ACTION | \ |
|---|
| 1559 | 1566 | FIF_FCSFAIL) |
|---|
| 1560 | 1567 | |
|---|
| 1561 | 1568 | /* FIXME: sc->sc_full_reset ? */ |
|---|
| .. | .. |
|---|
| 1777 | 1784 | * frames is a acceptable to allow RSN IBSS to be used. |
|---|
| 1778 | 1785 | */ |
|---|
| 1779 | 1786 | return -EOPNOTSUPP; |
|---|
| 1787 | + } |
|---|
| 1788 | + |
|---|
| 1789 | + /* There may be MPDUs queued for the outgoing PTK key. Flush queues to |
|---|
| 1790 | + * make sure these are not send unencrypted or with a wrong (new) key |
|---|
| 1791 | + */ |
|---|
| 1792 | + if (cmd == DISABLE_KEY && key->flags & IEEE80211_KEY_FLAG_PAIRWISE) { |
|---|
| 1793 | + ieee80211_stop_queues(hw); |
|---|
| 1794 | + ath9k_flush(hw, vif, 0, true); |
|---|
| 1795 | + ieee80211_wake_queues(hw); |
|---|
| 1780 | 1796 | } |
|---|
| 1781 | 1797 | |
|---|
| 1782 | 1798 | mutex_lock(&sc->mutex); |
|---|
| .. | .. |
|---|
| 2020 | 2036 | ath9k_ps_wakeup(sc); |
|---|
| 2021 | 2037 | ret = ath_tx_aggr_start(sc, sta, tid, ssn); |
|---|
| 2022 | 2038 | if (!ret) |
|---|
| 2023 | | - ieee80211_start_tx_ba_cb_irqsafe(vif, sta->addr, tid); |
|---|
| 2039 | + ret = IEEE80211_AMPDU_TX_START_IMMEDIATE; |
|---|
| 2024 | 2040 | ath9k_ps_restore(sc); |
|---|
| 2025 | 2041 | break; |
|---|
| 2026 | 2042 | case IEEE80211_AMPDU_TX_STOP_FLUSH: |
|---|
| 2027 | 2043 | case IEEE80211_AMPDU_TX_STOP_FLUSH_CONT: |
|---|
| 2028 | 2044 | flush = true; |
|---|
| 2029 | | - /* fall through */ |
|---|
| 2045 | + fallthrough; |
|---|
| 2030 | 2046 | case IEEE80211_AMPDU_TX_STOP_CONT: |
|---|
| 2031 | 2047 | ath9k_ps_wakeup(sc); |
|---|
| 2032 | 2048 | ath_tx_aggr_stop(sc, sta, tid); |
|---|
| .. | .. |
|---|
| 2491 | 2507 | return ret; |
|---|
| 2492 | 2508 | } |
|---|
| 2493 | 2509 | |
|---|
| 2494 | | -static int ath9k_cancel_remain_on_channel(struct ieee80211_hw *hw) |
|---|
| 2510 | +static int ath9k_cancel_remain_on_channel(struct ieee80211_hw *hw, |
|---|
| 2511 | + struct ieee80211_vif *vif) |
|---|
| 2495 | 2512 | { |
|---|
| 2496 | 2513 | struct ath_softc *sc = hw->priv; |
|---|
| 2497 | 2514 | struct ath_common *common = ath9k_hw_common(sc->sc_ah); |
|---|