diff options
author | David S. Miller <davem@davemloft.net> | 2017-03-01 18:08:34 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-03-01 18:08:34 -0500 |
commit | 16c54ac903042aca583e51a40bbe2f5503fe53c7 (patch) | |
tree | eabbc103ecce041108419e5af1c46fe652162488 /net | |
parent | 449809a66c1d0b1563dee84493e14bf3104d2d7e (diff) | |
parent | 19d19e960598161be92a7e4828eb7706c6410ce6 (diff) |
Merge tag 'mac80211-for-davem-2017-02-28' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211
Johannes Berg says:
====================
First round of fixes - details in the commits:
* use a valid hrtimer clock ID in mac80211_hwsim
* don't reorder frames prior to BA session
* flush a delayed work at suspend so the state is all valid before
suspend/resume
* fix packet statistics in fast-RX, the RX packets
counter increment was simply missing
* don't try to re-transmit filtered frames in an aggregation session
* shorten (for tracing) a debug message
* typo fix in another debug message
* fix nul-termination with HWSIM_ATTR_RADIO_NAME in hwsim
* fix mgmt RX processing when station is looked up by driver/device
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/agg-rx.c | 3 | ||||
-rw-r--r-- | net/mac80211/pm.c | 1 | ||||
-rw-r--r-- | net/mac80211/rx.c | 31 | ||||
-rw-r--r-- | net/mac80211/sta_info.c | 4 | ||||
-rw-r--r-- | net/mac80211/sta_info.h | 6 | ||||
-rw-r--r-- | net/mac80211/status.c | 3 |
6 files changed, 34 insertions, 14 deletions
diff --git a/net/mac80211/agg-rx.c b/net/mac80211/agg-rx.c index 3b5fd4188f2a..4456559cb056 100644 --- a/net/mac80211/agg-rx.c +++ b/net/mac80211/agg-rx.c | |||
@@ -85,7 +85,7 @@ void ___ieee80211_stop_rx_ba_session(struct sta_info *sta, u16 tid, | |||
85 | ht_dbg(sta->sdata, | 85 | ht_dbg(sta->sdata, |
86 | "Rx BA session stop requested for %pM tid %u %s reason: %d\n", | 86 | "Rx BA session stop requested for %pM tid %u %s reason: %d\n", |
87 | sta->sta.addr, tid, | 87 | sta->sta.addr, tid, |
88 | initiator == WLAN_BACK_RECIPIENT ? "recipient" : "inititator", | 88 | initiator == WLAN_BACK_RECIPIENT ? "recipient" : "initiator", |
89 | (int)reason); | 89 | (int)reason); |
90 | 90 | ||
91 | if (drv_ampdu_action(local, sta->sdata, ¶ms)) | 91 | if (drv_ampdu_action(local, sta->sdata, ¶ms)) |
@@ -398,6 +398,7 @@ void __ieee80211_start_rx_ba_session(struct sta_info *sta, | |||
398 | tid_agg_rx->timeout = timeout; | 398 | tid_agg_rx->timeout = timeout; |
399 | tid_agg_rx->stored_mpdu_num = 0; | 399 | tid_agg_rx->stored_mpdu_num = 0; |
400 | tid_agg_rx->auto_seq = auto_seq; | 400 | tid_agg_rx->auto_seq = auto_seq; |
401 | tid_agg_rx->started = false; | ||
401 | tid_agg_rx->reorder_buf_filtered = 0; | 402 | tid_agg_rx->reorder_buf_filtered = 0; |
402 | status = WLAN_STATUS_SUCCESS; | 403 | status = WLAN_STATUS_SUCCESS; |
403 | 404 | ||
diff --git a/net/mac80211/pm.c b/net/mac80211/pm.c index 28a3a0957c9e..76a8bcd8ef11 100644 --- a/net/mac80211/pm.c +++ b/net/mac80211/pm.c | |||
@@ -168,6 +168,7 @@ int __ieee80211_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan) | |||
168 | break; | 168 | break; |
169 | } | 169 | } |
170 | 170 | ||
171 | flush_delayed_work(&sdata->dec_tailroom_needed_wk); | ||
171 | drv_remove_interface(local, sdata); | 172 | drv_remove_interface(local, sdata); |
172 | } | 173 | } |
173 | 174 | ||
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 50ca3828b124..e48724a6725e 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c | |||
@@ -4,7 +4,7 @@ | |||
4 | * Copyright 2006-2007 Jiri Benc <jbenc@suse.cz> | 4 | * Copyright 2006-2007 Jiri Benc <jbenc@suse.cz> |
5 | * Copyright 2007-2010 Johannes Berg <johannes@sipsolutions.net> | 5 | * Copyright 2007-2010 Johannes Berg <johannes@sipsolutions.net> |
6 | * Copyright 2013-2014 Intel Mobile Communications GmbH | 6 | * Copyright 2013-2014 Intel Mobile Communications GmbH |
7 | * Copyright(c) 2015 - 2016 Intel Deutschland GmbH | 7 | * Copyright(c) 2015 - 2017 Intel Deutschland GmbH |
8 | * | 8 | * |
9 | * This program is free software; you can redistribute it and/or modify | 9 | * This program is free software; you can redistribute it and/or modify |
10 | * it under the terms of the GNU General Public License version 2 as | 10 | * it under the terms of the GNU General Public License version 2 as |
@@ -1034,6 +1034,18 @@ static bool ieee80211_sta_manage_reorder_buf(struct ieee80211_sub_if_data *sdata | |||
1034 | buf_size = tid_agg_rx->buf_size; | 1034 | buf_size = tid_agg_rx->buf_size; |
1035 | head_seq_num = tid_agg_rx->head_seq_num; | 1035 | head_seq_num = tid_agg_rx->head_seq_num; |
1036 | 1036 | ||
1037 | /* | ||
1038 | * If the current MPDU's SN is smaller than the SSN, it shouldn't | ||
1039 | * be reordered. | ||
1040 | */ | ||
1041 | if (unlikely(!tid_agg_rx->started)) { | ||
1042 | if (ieee80211_sn_less(mpdu_seq_num, head_seq_num)) { | ||
1043 | ret = false; | ||
1044 | goto out; | ||
1045 | } | ||
1046 | tid_agg_rx->started = true; | ||
1047 | } | ||
1048 | |||
1037 | /* frame with out of date sequence number */ | 1049 | /* frame with out of date sequence number */ |
1038 | if (ieee80211_sn_less(mpdu_seq_num, head_seq_num)) { | 1050 | if (ieee80211_sn_less(mpdu_seq_num, head_seq_num)) { |
1039 | dev_kfree_skb(skb); | 1051 | dev_kfree_skb(skb); |
@@ -3880,6 +3892,7 @@ static bool ieee80211_invoke_fast_rx(struct ieee80211_rx_data *rx, | |||
3880 | stats->last_rate = sta_stats_encode_rate(status); | 3892 | stats->last_rate = sta_stats_encode_rate(status); |
3881 | 3893 | ||
3882 | stats->fragments++; | 3894 | stats->fragments++; |
3895 | stats->packets++; | ||
3883 | 3896 | ||
3884 | if (!(status->flag & RX_FLAG_NO_SIGNAL_VAL)) { | 3897 | if (!(status->flag & RX_FLAG_NO_SIGNAL_VAL)) { |
3885 | stats->last_signal = status->signal; | 3898 | stats->last_signal = status->signal; |
@@ -4073,15 +4086,17 @@ static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw, | |||
4073 | ieee80211_is_beacon(hdr->frame_control))) | 4086 | ieee80211_is_beacon(hdr->frame_control))) |
4074 | ieee80211_scan_rx(local, skb); | 4087 | ieee80211_scan_rx(local, skb); |
4075 | 4088 | ||
4076 | if (pubsta) { | 4089 | if (ieee80211_is_data(fc)) { |
4077 | rx.sta = container_of(pubsta, struct sta_info, sta); | ||
4078 | rx.sdata = rx.sta->sdata; | ||
4079 | if (ieee80211_prepare_and_rx_handle(&rx, skb, true)) | ||
4080 | return; | ||
4081 | goto out; | ||
4082 | } else if (ieee80211_is_data(fc)) { | ||
4083 | struct sta_info *sta, *prev_sta; | 4090 | struct sta_info *sta, *prev_sta; |
4084 | 4091 | ||
4092 | if (pubsta) { | ||
4093 | rx.sta = container_of(pubsta, struct sta_info, sta); | ||
4094 | rx.sdata = rx.sta->sdata; | ||
4095 | if (ieee80211_prepare_and_rx_handle(&rx, skb, true)) | ||
4096 | return; | ||
4097 | goto out; | ||
4098 | } | ||
4099 | |||
4085 | prev_sta = NULL; | 4100 | prev_sta = NULL; |
4086 | 4101 | ||
4087 | for_each_sta_info(local, hdr->addr2, sta, tmp) { | 4102 | for_each_sta_info(local, hdr->addr2, sta, tmp) { |
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c index 4774e663a411..3323a2fb289b 100644 --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c | |||
@@ -688,7 +688,7 @@ static void __sta_info_recalc_tim(struct sta_info *sta, bool ignore_pending) | |||
688 | } | 688 | } |
689 | 689 | ||
690 | /* No need to do anything if the driver does all */ | 690 | /* No need to do anything if the driver does all */ |
691 | if (ieee80211_hw_check(&local->hw, AP_LINK_PS)) | 691 | if (ieee80211_hw_check(&local->hw, AP_LINK_PS) && !local->ops->set_tim) |
692 | return; | 692 | return; |
693 | 693 | ||
694 | if (sta->dead) | 694 | if (sta->dead) |
@@ -1264,7 +1264,7 @@ void ieee80211_sta_ps_deliver_wakeup(struct sta_info *sta) | |||
1264 | sta_info_recalc_tim(sta); | 1264 | sta_info_recalc_tim(sta); |
1265 | 1265 | ||
1266 | ps_dbg(sdata, | 1266 | ps_dbg(sdata, |
1267 | "STA %pM aid %d sending %d filtered/%d PS frames since STA not sleeping anymore\n", | 1267 | "STA %pM aid %d sending %d filtered/%d PS frames since STA woke up\n", |
1268 | sta->sta.addr, sta->sta.aid, filtered, buffered); | 1268 | sta->sta.addr, sta->sta.aid, filtered, buffered); |
1269 | 1269 | ||
1270 | ieee80211_check_fast_xmit(sta); | 1270 | ieee80211_check_fast_xmit(sta); |
diff --git a/net/mac80211/sta_info.h b/net/mac80211/sta_info.h index dd06ef0b8861..15599c70a38f 100644 --- a/net/mac80211/sta_info.h +++ b/net/mac80211/sta_info.h | |||
@@ -189,6 +189,7 @@ struct tid_ampdu_tx { | |||
189 | * @auto_seq: used for offloaded BA sessions to automatically pick head_seq_and | 189 | * @auto_seq: used for offloaded BA sessions to automatically pick head_seq_and |
190 | * and ssn. | 190 | * and ssn. |
191 | * @removed: this session is removed (but might have been found due to RCU) | 191 | * @removed: this session is removed (but might have been found due to RCU) |
192 | * @started: this session has started (head ssn or higher was received) | ||
192 | * | 193 | * |
193 | * This structure's lifetime is managed by RCU, assignments to | 194 | * This structure's lifetime is managed by RCU, assignments to |
194 | * the array holding it must hold the aggregation mutex. | 195 | * the array holding it must hold the aggregation mutex. |
@@ -212,8 +213,9 @@ struct tid_ampdu_rx { | |||
212 | u16 ssn; | 213 | u16 ssn; |
213 | u16 buf_size; | 214 | u16 buf_size; |
214 | u16 timeout; | 215 | u16 timeout; |
215 | bool auto_seq; | 216 | u8 auto_seq:1, |
216 | bool removed; | 217 | removed:1, |
218 | started:1; | ||
217 | }; | 219 | }; |
218 | 220 | ||
219 | /** | 221 | /** |
diff --git a/net/mac80211/status.c b/net/mac80211/status.c index 0dd7c351002d..83b8b11f24ea 100644 --- a/net/mac80211/status.c +++ b/net/mac80211/status.c | |||
@@ -51,7 +51,8 @@ static void ieee80211_handle_filtered_frame(struct ieee80211_local *local, | |||
51 | struct ieee80211_hdr *hdr = (void *)skb->data; | 51 | struct ieee80211_hdr *hdr = (void *)skb->data; |
52 | int ac; | 52 | int ac; |
53 | 53 | ||
54 | if (info->flags & IEEE80211_TX_CTL_NO_PS_BUFFER) { | 54 | if (info->flags & (IEEE80211_TX_CTL_NO_PS_BUFFER | |
55 | IEEE80211_TX_CTL_AMPDU)) { | ||
55 | ieee80211_free_txskb(&local->hw, skb); | 56 | ieee80211_free_txskb(&local->hw, skb); |
56 | return; | 57 | return; |
57 | } | 58 | } |