* [PATCH v2 3.13] mac80211: move "bufferable MMPDU" check to fix AP mode scan
@ 2013-12-16 20:39 Felix Fietkau
2013-12-16 20:44 ` Johannes Berg
0 siblings, 1 reply; 2+ messages in thread
From: Felix Fietkau @ 2013-12-16 20:39 UTC (permalink / raw)
To: linux-wireless; +Cc: johannes
The check needs to apply to both multicast and unicast packets,
otherwise probe requests on AP mode scans are sent through the multicast
buffer queue, which adds long delays (often longer than the scanning
interval).
Cc: stable@vger.kernel.org
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
---
net/mac80211/tx.c | 23 +++++++++++++----------
1 file changed, 13 insertions(+), 10 deletions(-)
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 002ded2..76d54ae 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -464,7 +464,6 @@ ieee80211_tx_h_unicast_ps_buf(struct ieee80211_tx_data *tx)
{
struct sta_info *sta = tx->sta;
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb);
- struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)tx->skb->data;
struct ieee80211_local *local = tx->local;
if (unlikely(!sta))
@@ -475,15 +474,6 @@ ieee80211_tx_h_unicast_ps_buf(struct ieee80211_tx_data *tx)
!(info->flags & IEEE80211_TX_CTL_NO_PS_BUFFER))) {
int ac = skb_get_queue_mapping(tx->skb);
- /* only deauth, disassoc and action are bufferable MMPDUs */
- if (ieee80211_is_mgmt(hdr->frame_control) &&
- !ieee80211_is_deauth(hdr->frame_control) &&
- !ieee80211_is_disassoc(hdr->frame_control) &&
- !ieee80211_is_action(hdr->frame_control)) {
- info->flags |= IEEE80211_TX_CTL_NO_PS_BUFFER;
- return TX_CONTINUE;
- }
-
ps_dbg(sta->sdata, "STA %pM aid %d: PS buffer for AC %d\n",
sta->sta.addr, sta->sta.aid, ac);
if (tx->local->total_ps_buffered >= TOTAL_MAX_TX_BUFFER)
@@ -526,9 +516,22 @@ ieee80211_tx_h_unicast_ps_buf(struct ieee80211_tx_data *tx)
static ieee80211_tx_result debug_noinline
ieee80211_tx_h_ps_buf(struct ieee80211_tx_data *tx)
{
+ struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb);
+ struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)tx->skb->data;
+
if (unlikely(tx->flags & IEEE80211_TX_PS_BUFFERED))
return TX_CONTINUE;
+ /* only deauth, disassoc and action are bufferable MMPDUs */
+ if (ieee80211_is_mgmt(hdr->frame_control) &&
+ !ieee80211_is_deauth(hdr->frame_control) &&
+ !ieee80211_is_disassoc(hdr->frame_control) &&
+ !ieee80211_is_action(hdr->frame_control)) {
+ if (tx->flags & IEEE80211_TX_UNICAST)
+ info->flags |= IEEE80211_TX_CTL_NO_PS_BUFFER;
+ return TX_CONTINUE;
+ }
+
if (tx->flags & IEEE80211_TX_UNICAST)
return ieee80211_tx_h_unicast_ps_buf(tx);
else
--
1.8.3.4 (Apple Git-47)
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2 3.13] mac80211: move "bufferable MMPDU" check to fix AP mode scan
2013-12-16 20:39 [PATCH v2 3.13] mac80211: move "bufferable MMPDU" check to fix AP mode scan Felix Fietkau
@ 2013-12-16 20:44 ` Johannes Berg
0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2013-12-16 20:44 UTC (permalink / raw)
To: Felix Fietkau; +Cc: linux-wireless
On Mon, 2013-12-16 at 21:39 +0100, Felix Fietkau wrote:
> The check needs to apply to both multicast and unicast packets,
> otherwise probe requests on AP mode scans are sent through the multicast
> buffer queue, which adds long delays (often longer than the scanning
> interval).
Applied.
johannes
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-12-16 20:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-16 20:39 [PATCH v2 3.13] mac80211: move "bufferable MMPDU" check to fix AP mode scan Felix Fietkau
2013-12-16 20:44 ` Johannes Berg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).