aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2014-07-25 02:22:15 -0400
committerDavid S. Miller <davem@davemloft.net>2014-07-25 02:22:15 -0400
commite62f77579cb6fbb05a703ffa1f9e9f81076e69aa (patch)
tree4dbde4571696cfc7357c803203e19a06fc3022fa
parenta88a7be6a2efcc4d3ea4543feb1b0d71d0100541 (diff)
parentc01fac1c77a00227f706a1654317023e3f4ac7f0 (diff)
Merge tag 'master-2014-07-23' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
John W. Linville says: ==================== pull request: wireless 2014-07-24 Please pull this batch of fixes intended for the 3.16 stream... For the mac80211 fixes, Johannes says: "I have two fixes: one for tracing that fixes a long-standing NULL pointer dereference, and one for a mac80211 issue that causes iwlmvm to send invalid frames during authentication/association." and, "One more fix - for a bug in the newly introduced code that obtains rate control information for stations." For the iwlwifi fixes, Emmanuel says: "It includes a merge damage fix. This region has been changed in -next and -fixes quite a few times and apparently, I failed to handle it properly, so here the fix. Along with that I have a fix from Eliad to properly handle overlapping BSS in AP mode." On top of that, Felix provides and ath9k fix for Tx stalls that happen after an aggregation session failure. Please let me know if there are problems! There are some changes here that will cause merge conflicts in -next. Once you merge this I can pull it into wireless-next and resolve those issues. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/wireless/ath/ath9k/xmit.c9
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c15
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/mac80211.c7
-rw-r--r--net/mac80211/cfg.c5
-rw-r--r--net/mac80211/tx.c20
-rw-r--r--net/wireless/trace.h3
6 files changed, 38 insertions, 21 deletions
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
index 66acb2cbd9df..7c28cb55610b 100644
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -887,6 +887,15 @@ ath_tx_get_tid_subframe(struct ath_softc *sc, struct ath_txq *txq,
887 887
888 tx_info = IEEE80211_SKB_CB(skb); 888 tx_info = IEEE80211_SKB_CB(skb);
889 tx_info->flags &= ~IEEE80211_TX_CTL_CLEAR_PS_FILT; 889 tx_info->flags &= ~IEEE80211_TX_CTL_CLEAR_PS_FILT;
890
891 /*
892 * No aggregation session is running, but there may be frames
893 * from a previous session or a failed attempt in the queue.
894 * Send them out as normal data frames
895 */
896 if (!tid->active)
897 tx_info->flags &= ~IEEE80211_TX_CTL_AMPDU;
898
890 if (!(tx_info->flags & IEEE80211_TX_CTL_AMPDU)) { 899 if (!(tx_info->flags & IEEE80211_TX_CTL_AMPDU)) {
891 bf->bf_state.bf_type = 0; 900 bf->bf_state.bf_type = 0;
892 return bf; 901 return bf;
diff --git a/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c b/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c
index 725ba49576bf..8b79081d4885 100644
--- a/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c
+++ b/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c
@@ -1072,8 +1072,12 @@ static int iwl_mvm_mac_ctxt_cmd_ap(struct iwl_mvm *mvm,
1072 /* Fill the common data for all mac context types */ 1072 /* Fill the common data for all mac context types */
1073 iwl_mvm_mac_ctxt_cmd_common(mvm, vif, &cmd, action); 1073 iwl_mvm_mac_ctxt_cmd_common(mvm, vif, &cmd, action);
1074 1074
1075 /* Also enable probe requests to pass */ 1075 /*
1076 cmd.filter_flags |= cpu_to_le32(MAC_FILTER_IN_PROBE_REQUEST); 1076 * pass probe requests and beacons from other APs (needed
1077 * for ht protection)
1078 */
1079 cmd.filter_flags |= cpu_to_le32(MAC_FILTER_IN_PROBE_REQUEST |
1080 MAC_FILTER_IN_BEACON);
1077 1081
1078 /* Fill the data specific for ap mode */ 1082 /* Fill the data specific for ap mode */
1079 iwl_mvm_mac_ctxt_cmd_fill_ap(mvm, vif, &cmd.ap, 1083 iwl_mvm_mac_ctxt_cmd_fill_ap(mvm, vif, &cmd.ap,
@@ -1094,6 +1098,13 @@ static int iwl_mvm_mac_ctxt_cmd_go(struct iwl_mvm *mvm,
1094 /* Fill the common data for all mac context types */ 1098 /* Fill the common data for all mac context types */
1095 iwl_mvm_mac_ctxt_cmd_common(mvm, vif, &cmd, action); 1099 iwl_mvm_mac_ctxt_cmd_common(mvm, vif, &cmd, action);
1096 1100
1101 /*
1102 * pass probe requests and beacons from other APs (needed
1103 * for ht protection)
1104 */
1105 cmd.filter_flags |= cpu_to_le32(MAC_FILTER_IN_PROBE_REQUEST |
1106 MAC_FILTER_IN_BEACON);
1107
1097 /* Fill the data specific for GO mode */ 1108 /* Fill the data specific for GO mode */
1098 iwl_mvm_mac_ctxt_cmd_fill_ap(mvm, vif, &cmd.go.ap, 1109 iwl_mvm_mac_ctxt_cmd_fill_ap(mvm, vif, &cmd.go.ap,
1099 action == FW_CTXT_ACTION_ADD); 1110 action == FW_CTXT_ACTION_ADD);
diff --git a/drivers/net/wireless/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/iwlwifi/mvm/mac80211.c
index 9bfb90680cdc..98556d03c1ed 100644
--- a/drivers/net/wireless/iwlwifi/mvm/mac80211.c
+++ b/drivers/net/wireless/iwlwifi/mvm/mac80211.c
@@ -303,13 +303,6 @@ int iwl_mvm_mac_setup_register(struct iwl_mvm *mvm)
303 hw->uapsd_max_sp_len = IWL_UAPSD_MAX_SP; 303 hw->uapsd_max_sp_len = IWL_UAPSD_MAX_SP;
304 } 304 }
305 305
306 if (mvm->fw->ucode_capa.flags & IWL_UCODE_TLV_FLAGS_UAPSD_SUPPORT &&
307 !iwlwifi_mod_params.uapsd_disable) {
308 hw->flags |= IEEE80211_HW_SUPPORTS_UAPSD;
309 hw->uapsd_queues = IWL_UAPSD_AC_INFO;
310 hw->uapsd_max_sp_len = IWL_UAPSD_MAX_SP;
311 }
312
313 hw->sta_data_size = sizeof(struct iwl_mvm_sta); 306 hw->sta_data_size = sizeof(struct iwl_mvm_sta);
314 hw->vif_data_size = sizeof(struct iwl_mvm_vif); 307 hw->vif_data_size = sizeof(struct iwl_mvm_vif);
315 hw->chanctx_data_size = sizeof(u16); 308 hw->chanctx_data_size = sizeof(u16);
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index d7513a503be1..592f4b152ba8 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -472,12 +472,15 @@ static void sta_set_sinfo(struct sta_info *sta, struct station_info *sinfo)
472{ 472{
473 struct ieee80211_sub_if_data *sdata = sta->sdata; 473 struct ieee80211_sub_if_data *sdata = sta->sdata;
474 struct ieee80211_local *local = sdata->local; 474 struct ieee80211_local *local = sdata->local;
475 struct rate_control_ref *ref = local->rate_ctrl; 475 struct rate_control_ref *ref = NULL;
476 struct timespec uptime; 476 struct timespec uptime;
477 u64 packets = 0; 477 u64 packets = 0;
478 u32 thr = 0; 478 u32 thr = 0;
479 int i, ac; 479 int i, ac;
480 480
481 if (test_sta_flag(sta, WLAN_STA_RATE_CONTROL))
482 ref = local->rate_ctrl;
483
481 sinfo->generation = sdata->local->sta_generation; 484 sinfo->generation = sdata->local->sta_generation;
482 485
483 sinfo->filled = STATION_INFO_INACTIVE_TIME | 486 sinfo->filled = STATION_INFO_INACTIVE_TIME |
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 5214686d9fd1..1a252c606ad0 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -414,6 +414,9 @@ ieee80211_tx_h_multicast_ps_buf(struct ieee80211_tx_data *tx)
414 if (ieee80211_has_order(hdr->frame_control)) 414 if (ieee80211_has_order(hdr->frame_control))
415 return TX_CONTINUE; 415 return TX_CONTINUE;
416 416
417 if (ieee80211_is_probe_req(hdr->frame_control))
418 return TX_CONTINUE;
419
417 if (tx->local->hw.flags & IEEE80211_HW_QUEUE_CONTROL) 420 if (tx->local->hw.flags & IEEE80211_HW_QUEUE_CONTROL)
418 info->hw_queue = tx->sdata->vif.cab_queue; 421 info->hw_queue = tx->sdata->vif.cab_queue;
419 422
@@ -463,6 +466,7 @@ ieee80211_tx_h_unicast_ps_buf(struct ieee80211_tx_data *tx)
463{ 466{
464 struct sta_info *sta = tx->sta; 467 struct sta_info *sta = tx->sta;
465 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb); 468 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb);
469 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)tx->skb->data;
466 struct ieee80211_local *local = tx->local; 470 struct ieee80211_local *local = tx->local;
467 471
468 if (unlikely(!sta)) 472 if (unlikely(!sta))
@@ -473,6 +477,12 @@ ieee80211_tx_h_unicast_ps_buf(struct ieee80211_tx_data *tx)
473 !(info->flags & IEEE80211_TX_CTL_NO_PS_BUFFER))) { 477 !(info->flags & IEEE80211_TX_CTL_NO_PS_BUFFER))) {
474 int ac = skb_get_queue_mapping(tx->skb); 478 int ac = skb_get_queue_mapping(tx->skb);
475 479
480 if (ieee80211_is_mgmt(hdr->frame_control) &&
481 !ieee80211_is_bufferable_mmpdu(hdr->frame_control)) {
482 info->flags |= IEEE80211_TX_CTL_NO_PS_BUFFER;
483 return TX_CONTINUE;
484 }
485
476 ps_dbg(sta->sdata, "STA %pM aid %d: PS buffer for AC %d\n", 486 ps_dbg(sta->sdata, "STA %pM aid %d: PS buffer for AC %d\n",
477 sta->sta.addr, sta->sta.aid, ac); 487 sta->sta.addr, sta->sta.aid, ac);
478 if (tx->local->total_ps_buffered >= TOTAL_MAX_TX_BUFFER) 488 if (tx->local->total_ps_buffered >= TOTAL_MAX_TX_BUFFER)
@@ -531,19 +541,9 @@ ieee80211_tx_h_unicast_ps_buf(struct ieee80211_tx_data *tx)
531static ieee80211_tx_result debug_noinline 541static ieee80211_tx_result debug_noinline
532ieee80211_tx_h_ps_buf(struct ieee80211_tx_data *tx) 542ieee80211_tx_h_ps_buf(struct ieee80211_tx_data *tx)
533{ 543{
534 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb);
535 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)tx->skb->data;
536
537 if (unlikely(tx->flags & IEEE80211_TX_PS_BUFFERED)) 544 if (unlikely(tx->flags & IEEE80211_TX_PS_BUFFERED))
538 return TX_CONTINUE; 545 return TX_CONTINUE;
539 546
540 if (ieee80211_is_mgmt(hdr->frame_control) &&
541 !ieee80211_is_bufferable_mmpdu(hdr->frame_control)) {
542 if (tx->flags & IEEE80211_TX_UNICAST)
543 info->flags |= IEEE80211_TX_CTL_NO_PS_BUFFER;
544 return TX_CONTINUE;
545 }
546
547 if (tx->flags & IEEE80211_TX_UNICAST) 547 if (tx->flags & IEEE80211_TX_UNICAST)
548 return ieee80211_tx_h_unicast_ps_buf(tx); 548 return ieee80211_tx_h_unicast_ps_buf(tx);
549 else 549 else
diff --git a/net/wireless/trace.h b/net/wireless/trace.h
index 560ed77084e9..7cc887f9da11 100644
--- a/net/wireless/trace.h
+++ b/net/wireless/trace.h
@@ -2094,7 +2094,8 @@ TRACE_EVENT(cfg80211_michael_mic_failure,
2094 MAC_ASSIGN(addr, addr); 2094 MAC_ASSIGN(addr, addr);
2095 __entry->key_type = key_type; 2095 __entry->key_type = key_type;
2096 __entry->key_id = key_id; 2096 __entry->key_id = key_id;
2097 memcpy(__entry->tsc, tsc, 6); 2097 if (tsc)
2098 memcpy(__entry->tsc, tsc, 6);
2098 ), 2099 ),
2099 TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT ", key type: %d, key id: %d, tsc: %pm", 2100 TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT ", key type: %d, key id: %d, tsc: %pm",
2100 NETDEV_PR_ARG, MAC_PR_ARG(addr), __entry->key_type, 2101 NETDEV_PR_ARG, MAC_PR_ARG(addr), __entry->key_type,