diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 195cb6d..31aeacd 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -280,6 +280,15 @@ static ieee80211_tx_result ieee80211_tx_h_sequence(struct ieee80211_tx_data *tx) { struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)tx->skb->data; + struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb); + + /* + * don't touch sequence numbers on raw monitor interfaces + */ + if (unlikely((info->flags & IEEE80211_TX_CTL_INJECTED) && + (tx->sdata->vif.type == IEEE80211_IF_TYPE_MNTR) && + !(tx->sdata->u.mntr_flags & MONITOR_FLAG_COOK_FRAMES))) + return TX_CONTINUE; if (ieee80211_get_hdrlen(le16_to_cpu(hdr->frame_control)) >= 24) ieee80211_include_sequence(tx->sdata, hdr);