Skip to contentSkip to conversation

mac80211: fix start_seq_num in Rx reorder offload

PATCH In review Denton Gentry 2 participants 2 messages Jul 29, 2014 mac80211

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mac80211: fix start_seq_num in Rx reorder offload

sta->last_seq_ctrl is the seq_ctrl field from the last header seen, need to shift it 4 bits to extract the sequence number. Otherwise the ieee80211_sn_less() check at the top of ieee80211_sta_manage_reorder_buf drops frames until the sequence number catches up.

---
 net/mac80211/iface.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
net/mac80211/iface.c +2 -2
index 7e5afaa..7434ffe 100644
@@ -1195,8 +1195,8 @@ static void ieee80211_iface_work(struct work_struct *work)
 			if (sta) {
 				u16 last_seq;
 
-				last_seq = le16_to_cpu(
-					sta->last_seq_ctrl[rx_agg->tid]);
+				last_seq = IEEE80211_SEQ_TO_SN(le16_to_cpu(
+					sta->last_seq_ctrl[rx_agg->tid]));
 
 				__ieee80211_start_rx_ba_session(sta,
 						0, 0,
Signature · 1 line
2.0.0.526.g5318336
maintainer
#1 lore raw
Quoted 5 lines · Denton Gentry

sta->last_seq_ctrl is the seq_ctrl field from the last header seen, need to shift it 4 bits to extract the sequence number. Otherwise the ieee80211_sn_less() check at the top of ieee80211_sta_manage_reorder_buf drops frames until the sequence number catches up.

Makes sense, applied, thanks.

johannes