Hi! Injecting cooked frames in monitor mode (default ath5k in 2.6.32) does
not
preserve sequence numbers even though IEEE80211_TX_CTL_ASSIGN_SEQ is not
set.
I'm not sure if this has been fixed in newer releases and if so, please
ignore
me. The patch is attached below.

--- linux-2.6.32/drivers/net/wireless/ath/ath5k/base.c  2009-12-03
14:51:21.000000000 +1100
+++ linux/drivers/net/wireless/ath/ath5k/base.c 2010-01-12
12:12:06.000000000 +1100
@@ -1236,6 +1236,7 @@
       u16 cts_rate = 0;
       u16 duration = 0;
       u8 rc_flags;
+       u32 staid;

       flags = AR5K_TXDESC_INTREQ | AR5K_TXDESC_CLRDMASK;

@@ -1248,6 +1249,19 @@
       if (info->flags & IEEE80211_TX_CTL_NO_ACK)
               flags |= AR5K_TXDESC_NOACK;

+       /* Don't assign sequence numbers when
+        * IEEE80211_TX_CTL_ASSIGN_SEQ is not set
+        * (required for monitor mode)
+        */
+       if (!(info->flags & IEEE80211_TX_CTL_ASSIGN_SEQ)) {
+               staid = ath5k_hw_reg_read(ah, AR5K_STA_ID1);
+
+               if (!(staid & AR5K_STA_ID1_PRESERVE_SEQ_NUM)) {
+                       staid |= AR5K_STA_ID1_PRESERVE_SEQ_NUM;
+                       ath5k_hw_reg_write(ah, staid, AR5K_STA_ID1);
+               }
+       }
+
       rc_flags = info->control.rates[0].flags;
       hw_rate = (rc_flags & IEEE80211_TX_RC_USE_SHORT_PREAMBLE) ?
               rate->hw_value_short : rate->hw_value;



-- 
-- Bell Labs Unix - Reach out and grep someone
_______________________________________________
ath5k-devel mailing list
ath5k-devel@lists.ath5k.org
https://lists.ath5k.org/mailman/listinfo/ath5k-devel

Reply via email to