ATH10K Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] extract seqno from sta->last_seq_ctrl
@ 2014-07-27 17:51 Denton Gentry
  2014-07-28  8:12 ` Kalle Valo
  2014-07-28 10:13 ` Michal Kazior
  0 siblings, 2 replies; 3+ messages in thread
From: Denton Gentry @ 2014-07-27 17:51 UTC (permalink / raw)
  To: ath10k@lists.infradead.org; +Cc: Michal Kazior

[Sending to ath10k list as I think ath10k is the only impacted driver right now]

I believe there is a minor problem in
[PATCH v2] mac80211: add support for Rx reordering offloading
http://www.spinics.net/lists/linux-wireless/msg124812.html

sta->last_seq_ctrl is the seq_ctrl field from the last seen packet. To
get the sequence number it needs to be byteswapped and shifted 4 bits;
patch below.

This mostly impacts Windows clients, because Windows sends 100-200
frames before sending ADDBA. This results in a starting seqno which is
quite large due to the 4 bit shift, and the ieee80211_sn_less() check
at the top of ieee80211_sta_manage_reorder_buf drops subsequent frames
until the sequence number catches up.


From d0647db58d13533e5441c07f95b23e912976c87b Mon Sep 17 00:00:00 2001
From: Denton Gentry <denton.gentry@gmail.com>
Date: Sun, 27 Jul 2014 08:24:36 -0700
Subject: [PATCH] extract seqno from sta->last_seq_ctrl

This depends on:
* [PATCH v2] mac80211: add support for Rx reordering offloading

sta->last_seq_ctrl is the seq_ctrl field from the last
header seen, need to byteswap and shift it 4 bits to
extract the sequence number.

 net/mac80211/iface.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index 77cd025..1903220 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -1171,7 +1171,7 @@ static void ieee80211_iface_work(struct work_struct *work)
                        mutex_lock(&local->sta_mtx);
                        sta = sta_info_get_bss(sdata, rx_agg->addr);
                        if (sta) {
-                               u16 last_seq = sta->last_seq_ctrl[rx_agg->tid];
+                               u16 last_seq =
le16_to_cpu(sta->last_seq_ctrl[rx_agg->tid]) >> 4;

                                __ieee80211_start_rx_ba_session(sta,
                                                0, 0,
-- 
2.0.0.526.g5318336

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-07-28 10:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-27 17:51 [RFC] extract seqno from sta->last_seq_ctrl Denton Gentry
2014-07-28  8:12 ` Kalle Valo
2014-07-28 10:13 ` Michal Kazior

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox