diff options
author | Kalle Valo <kvalo@codeaurora.org> | 2017-08-09 15:37:23 -0400 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2017-08-09 15:37:23 -0400 |
commit | 9d6b9b8d1cdbda449bd30e6f63b8eeca15829475 (patch) | |
tree | b4b1d2f3b94ebdaef58ac1eb9db1d5b530d8f72a | |
parent | 368bd88ebb64cabe4a1ec727659214bb8d693707 (diff) | |
parent | 20fc690f38d17b8f961101a477a9aa0841fb6e20 (diff) |
Merge tag 'iwlwifi-for-kalle-2018-08-09' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes
Some more fixes for 4.13
* Fix a memory leak in the SAR code;
* Fix a stuck queue case in AP mode;
* Convert a WARN to a simple debug in a legitimate race case (from
which we can recover);
* Fix a severe throughput aggregation on 9000-family devices due to
aggregation issues.
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 12 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 10 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 4 | ||||
-rw-r--r-- | include/net/mac80211.h | 15 | ||||
-rw-r--r-- | net/mac80211/agg-rx.c | 22 |
6 files changed, 59 insertions, 10 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c index 79e7a7a285dc..82863e9273eb 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c | |||
@@ -1275,8 +1275,10 @@ static int iwl_mvm_sar_get_wgds_table(struct iwl_mvm *mvm) | |||
1275 | 1275 | ||
1276 | entry = &wifi_pkg->package.elements[idx++]; | 1276 | entry = &wifi_pkg->package.elements[idx++]; |
1277 | if ((entry->type != ACPI_TYPE_INTEGER) || | 1277 | if ((entry->type != ACPI_TYPE_INTEGER) || |
1278 | (entry->integer.value > U8_MAX)) | 1278 | (entry->integer.value > U8_MAX)) { |
1279 | return -EINVAL; | 1279 | ret = -EINVAL; |
1280 | goto out_free; | ||
1281 | } | ||
1280 | 1282 | ||
1281 | mvm->geo_profiles[i].values[j] = entry->integer.value; | 1283 | mvm->geo_profiles[i].values[j] = entry->integer.value; |
1282 | } | 1284 | } |
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c index c7b1e58e3384..ce901be5fba8 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | |||
@@ -2597,8 +2597,18 @@ static void iwl_mvm_purge_deferred_tx_frames(struct iwl_mvm *mvm, | |||
2597 | spin_lock_bh(&mvm_sta->lock); | 2597 | spin_lock_bh(&mvm_sta->lock); |
2598 | for (i = 0; i <= IWL_MAX_TID_COUNT; i++) { | 2598 | for (i = 0; i <= IWL_MAX_TID_COUNT; i++) { |
2599 | tid_data = &mvm_sta->tid_data[i]; | 2599 | tid_data = &mvm_sta->tid_data[i]; |
2600 | while ((skb = __skb_dequeue(&tid_data->deferred_tx_frames))) | 2600 | |
2601 | while ((skb = __skb_dequeue(&tid_data->deferred_tx_frames))) { | ||
2602 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); | ||
2603 | |||
2604 | /* | ||
2605 | * The first deferred frame should've stopped the MAC | ||
2606 | * queues, so we should never get a second deferred | ||
2607 | * frame for the RA/TID. | ||
2608 | */ | ||
2609 | iwl_mvm_start_mac_queues(mvm, info->hw_queue); | ||
2601 | ieee80211_free_txskb(mvm->hw, skb); | 2610 | ieee80211_free_txskb(mvm->hw, skb); |
2611 | } | ||
2602 | } | 2612 | } |
2603 | spin_unlock_bh(&mvm_sta->lock); | 2613 | spin_unlock_bh(&mvm_sta->lock); |
2604 | } | 2614 | } |
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c index f3e608196369..71c8b800ffa9 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | |||
@@ -636,9 +636,9 @@ static bool iwl_mvm_reorder(struct iwl_mvm *mvm, | |||
636 | 636 | ||
637 | baid_data = rcu_dereference(mvm->baid_map[baid]); | 637 | baid_data = rcu_dereference(mvm->baid_map[baid]); |
638 | if (!baid_data) { | 638 | if (!baid_data) { |
639 | WARN(!(reorder & IWL_RX_MPDU_REORDER_BA_OLD_SN), | 639 | IWL_DEBUG_RX(mvm, |
640 | "Received baid %d, but no data exists for this BAID\n", | 640 | "Got valid BAID but no baid allocated, bypass the re-ordering buffer. Baid %d reorder 0x%x\n", |
641 | baid); | 641 | baid, reorder); |
642 | return false; | 642 | return false; |
643 | } | 643 | } |
644 | 644 | ||
@@ -759,7 +759,9 @@ static void iwl_mvm_agg_rx_received(struct iwl_mvm *mvm, | |||
759 | 759 | ||
760 | data = rcu_dereference(mvm->baid_map[baid]); | 760 | data = rcu_dereference(mvm->baid_map[baid]); |
761 | if (!data) { | 761 | if (!data) { |
762 | WARN_ON(!(reorder_data & IWL_RX_MPDU_REORDER_BA_OLD_SN)); | 762 | IWL_DEBUG_RX(mvm, |
763 | "Got valid BAID but no baid allocated, bypass the re-ordering buffer. Baid %d reorder 0x%x\n", | ||
764 | baid, reorder_data); | ||
763 | goto out; | 765 | goto out; |
764 | } | 766 | } |
765 | 767 | ||
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c index dcaef7c043ac..027ee5e72172 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c | |||
@@ -291,8 +291,8 @@ static void iwl_mvm_rx_agg_session_expired(unsigned long data) | |||
291 | goto unlock; | 291 | goto unlock; |
292 | 292 | ||
293 | mvm_sta = iwl_mvm_sta_from_mac80211(sta); | 293 | mvm_sta = iwl_mvm_sta_from_mac80211(sta); |
294 | ieee80211_stop_rx_ba_session_offl(mvm_sta->vif, | 294 | ieee80211_rx_ba_timer_expired(mvm_sta->vif, |
295 | sta->addr, ba_data->tid); | 295 | sta->addr, ba_data->tid); |
296 | unlock: | 296 | unlock: |
297 | rcu_read_unlock(); | 297 | rcu_read_unlock(); |
298 | } | 298 | } |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index b2b5419467cc..f8149ca192b4 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -5499,6 +5499,21 @@ static inline void ieee80211_stop_rx_ba_session_offl(struct ieee80211_vif *vif, | |||
5499 | ieee80211_manage_rx_ba_offl(vif, addr, tid + IEEE80211_NUM_TIDS); | 5499 | ieee80211_manage_rx_ba_offl(vif, addr, tid + IEEE80211_NUM_TIDS); |
5500 | } | 5500 | } |
5501 | 5501 | ||
5502 | /** | ||
5503 | * ieee80211_rx_ba_timer_expired - stop a Rx BA session due to timeout | ||
5504 | * | ||
5505 | * Some device drivers do not offload AddBa/DelBa negotiation, but handle rx | ||
5506 | * buffer reording internally, and therefore also handle the session timer. | ||
5507 | * | ||
5508 | * Trigger the timeout flow, which sends a DelBa. | ||
5509 | * | ||
5510 | * @vif: &struct ieee80211_vif pointer from the add_interface callback | ||
5511 | * @addr: station mac address | ||
5512 | * @tid: the rx tid | ||
5513 | */ | ||
5514 | void ieee80211_rx_ba_timer_expired(struct ieee80211_vif *vif, | ||
5515 | const u8 *addr, unsigned int tid); | ||
5516 | |||
5502 | /* Rate control API */ | 5517 | /* Rate control API */ |
5503 | 5518 | ||
5504 | /** | 5519 | /** |
diff --git a/net/mac80211/agg-rx.c b/net/mac80211/agg-rx.c index 8708cbe8af5b..2b36eff5d97e 100644 --- a/net/mac80211/agg-rx.c +++ b/net/mac80211/agg-rx.c | |||
@@ -7,7 +7,7 @@ | |||
7 | * Copyright 2006-2007 Jiri Benc <jbenc@suse.cz> | 7 | * Copyright 2006-2007 Jiri Benc <jbenc@suse.cz> |
8 | * Copyright 2007, Michael Wu <flamingice@sourmilk.net> | 8 | * Copyright 2007, Michael Wu <flamingice@sourmilk.net> |
9 | * Copyright 2007-2010, Intel Corporation | 9 | * Copyright 2007-2010, Intel Corporation |
10 | * Copyright(c) 2015 Intel Deutschland GmbH | 10 | * Copyright(c) 2015-2017 Intel Deutschland GmbH |
11 | * | 11 | * |
12 | * This program is free software; you can redistribute it and/or modify | 12 | * This program is free software; you can redistribute it and/or modify |
13 | * it under the terms of the GNU General Public License version 2 as | 13 | * it under the terms of the GNU General Public License version 2 as |
@@ -466,3 +466,23 @@ void ieee80211_manage_rx_ba_offl(struct ieee80211_vif *vif, | |||
466 | rcu_read_unlock(); | 466 | rcu_read_unlock(); |
467 | } | 467 | } |
468 | EXPORT_SYMBOL(ieee80211_manage_rx_ba_offl); | 468 | EXPORT_SYMBOL(ieee80211_manage_rx_ba_offl); |
469 | |||
470 | void ieee80211_rx_ba_timer_expired(struct ieee80211_vif *vif, | ||
471 | const u8 *addr, unsigned int tid) | ||
472 | { | ||
473 | struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif); | ||
474 | struct ieee80211_local *local = sdata->local; | ||
475 | struct sta_info *sta; | ||
476 | |||
477 | rcu_read_lock(); | ||
478 | sta = sta_info_get_bss(sdata, addr); | ||
479 | if (!sta) | ||
480 | goto unlock; | ||
481 | |||
482 | set_bit(tid, sta->ampdu_mlme.tid_rx_timer_expired); | ||
483 | ieee80211_queue_work(&local->hw, &sta->ampdu_mlme.work); | ||
484 | |||
485 | unlock: | ||
486 | rcu_read_unlock(); | ||
487 | } | ||
488 | EXPORT_SYMBOL(ieee80211_rx_ba_timer_expired); | ||