| 1 |
diff -uNr linux-2.6.32.2/include/net/ieee80211_radiotap.h linux-2.6.32.2-wl_frag-ack/include/net/ieee80211_radiotap.h |
| 2 |
--- linux-2.6.32.2/include/net/ieee80211_radiotap.h 2009-12-18 14:27:07.000000000 -0800 |
| 3 |
+++ linux-2.6.32.2-wl_frag-ack/include/net/ieee80211_radiotap.h 2009-12-19 16:04:22.721448723 -0800 |
| 4 |
@@ -240,6 +240,9 @@ |
| 5 |
* retries */ |
| 6 |
#define IEEE80211_RADIOTAP_F_TX_CTS 0x0002 /* used cts 'protection' */ |
| 7 |
#define IEEE80211_RADIOTAP_F_TX_RTS 0x0004 /* used rts/cts handshake */ |
| 8 |
+#define IEEE80211_RADIOTAP_F_TX_NOACK 0x0008 /* frame should not be ACKed */ |
| 9 |
+#define IEEE80211_RADIOTAP_F_TX_NOSEQ 0x0010 /* sequence number handled |
| 10 |
+ * by userspace */ |
| 11 |
|
| 12 |
/* Ugly macro to convert literal channel numbers into their mhz equivalents |
| 13 |
* There are certianly some conditions that will break this (like feeding it '30') |
| 14 |
diff -uNr linux-2.6.32.2/net/mac80211/tx.c linux-2.6.32.2-wl_frag-ack/net/mac80211/tx.c |
| 15 |
--- linux-2.6.32.2/net/mac80211/tx.c 2009-12-18 14:27:07.000000000 -0800 |
| 16 |
+++ linux-2.6.32.2-wl_frag-ack/net/mac80211/tx.c 2009-12-19 16:12:31.782448438 -0800 |
| 17 |
@@ -678,6 +678,10 @@ |
| 18 |
u8 *qc; |
| 19 |
int tid; |
| 20 |
|
| 21 |
+ if (unlikely(!(info->flags & IEEE80211_TX_CTL_ASSIGN_SEQ))) |
| 22 |
+ return TX_CONTINUE; |
| 23 |
+ info->flags &= ~IEEE80211_TX_CTL_ASSIGN_SEQ; |
| 24 |
+ |
| 25 |
/* |
| 26 |
* Packet injection may want to control the sequence |
| 27 |
* number, if we have no matching interface then we |
| 28 |
@@ -974,6 +978,12 @@ |
| 29 |
if (*iterator.this_arg & IEEE80211_RADIOTAP_F_FRAG) |
| 30 |
tx->flags |= IEEE80211_TX_FRAGMENTED; |
| 31 |
break; |
| 32 |
+ case IEEE80211_RADIOTAP_TX_FLAGS: |
| 33 |
+ if (*iterator.this_arg & IEEE80211_RADIOTAP_F_TX_NOACK) |
| 34 |
+ info->flags |= IEEE80211_TX_CTL_NO_ACK; |
| 35 |
+ if (*iterator.this_arg & IEEE80211_RADIOTAP_F_TX_NOSEQ) |
| 36 |
+ info->flags &= ~IEEE80211_TX_CTL_ASSIGN_SEQ; |
| 37 |
+ break; |
| 38 |
|
| 39 |
/* |
| 40 |
* Please update the file |
| 41 |
@@ -1025,6 +1035,8 @@ |
| 42 |
* it will be cleared/left by radiotap as desired. |
| 43 |
*/ |
| 44 |
tx->flags |= IEEE80211_TX_FRAGMENTED; |
| 45 |
+ /* Same here, controlled by radiotap and the stack */ |
| 46 |
+ info->flags |= IEEE80211_TX_CTL_ASSIGN_SEQ; |
| 47 |
|
| 48 |
/* process and remove the injection radiotap header */ |
| 49 |
if (unlikely(info->flags & IEEE80211_TX_CTL_INJECTED)) { |
| 50 |
@@ -1088,16 +1100,10 @@ |
| 51 |
return TX_QUEUED; |
| 52 |
} |
| 53 |
|
| 54 |
- if (is_multicast_ether_addr(hdr->addr1)) { |
| 55 |
- tx->flags &= ~IEEE80211_TX_UNICAST; |
| 56 |
+ if (is_multicast_ether_addr(hdr->addr1)) |
| 57 |
info->flags |= IEEE80211_TX_CTL_NO_ACK; |
| 58 |
- } else { |
| 59 |
+ else |
| 60 |
tx->flags |= IEEE80211_TX_UNICAST; |
| 61 |
- if (unlikely(local->wifi_wme_noack_test)) |
| 62 |
- info->flags |= IEEE80211_TX_CTL_NO_ACK; |
| 63 |
- else |
| 64 |
- info->flags &= ~IEEE80211_TX_CTL_NO_ACK; |
| 65 |
- } |
| 66 |
|
| 67 |
if (tx->flags & IEEE80211_TX_FRAGMENTED) { |
| 68 |
if ((tx->flags & IEEE80211_TX_UNICAST) && |