From 96fa353e79fa03c36f19c760aba02deb5521c5e7 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Mon, 8 Oct 2018 10:39:24 +0200 Subject: [PATCH] mt76: do not store aggregation sequence number for null-data frames Fixes a rare corner case where a BlockAckReq might get the wrong sequence number. Signed-off-by: Felix Fietkau --- tx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tx.c b/tx.c index bf0e9e66..7cbce03a 100644 --- a/tx.c +++ b/tx.c @@ -96,7 +96,8 @@ mt76_check_agg_ssn(struct mt76_txq *mtxq, struct sk_buff *skb) { struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; - if (!ieee80211_is_data_qos(hdr->frame_control)) + if (!ieee80211_is_data_qos(hdr->frame_control) || + !ieee80211_is_data_present(hdr->frame_control)) return; mtxq->agg_ssn = le16_to_cpu(hdr->seq_ctrl) + 0x10;