Skip to contentSkip to conversation

zd1211rw: Replace ZD_CS_MULTICAST with ZD_CS_NO_ACK

PATCH Superseded Gábor Stefanik 1 participant 2 messages May 14, 2009 Networking drivers (wireless)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 zd1211rw: Replace ZD_CS_MULTICAST with ZD_CS_NO_ACK

According to my tests, all that ZD_CS_MULTICAST does is to disable retrying/waiting for an ACK. Reflect this by renaming the bit to ZD_CS_NO_ACK and setting it based on IEEE80211_TX_CTL_NO_ACK, instead of is_multicast_ether_addr.

---

drivers/net/wireless/zd1211rw/zd_mac.c |    6 +++---
drivers/net/wireless/zd1211rw/zd_mac.h |    2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
drivers/net/wireless/zd1211rw/zd_mac.c +3 -3
index 85c27ac..d1ec99f 100644
@@ -430,9 +430,9 @@ static void cs_set_control(struct zd_mac *mac, struct zd_ctrlset *cs,
    if (info->flags & IEEE80211_TX_CTL_FIRST_FRAGMENT)
        cs->control |= ZD_CS_NEED_RANDOM_BACKOFF;
 
-    /* Multicast */
-    if (is_multicast_ether_addr(header->addr1))
-        cs->control |= ZD_CS_MULTICAST;
+    /* No ACK expected (multicast, etc.) */
+    if (info->flags & IEEE80211_TX_CTL_NO_ACK)
+        cs->control |= ZD_CS_NO_ACK;
 
    /* PS-POLL */
    if (ieee80211_is_pspoll(header->frame_control))
drivers/net/wireless/zd1211rw/zd_mac.h +0 -0
index 4c05d3e..7c27591 100644
@@ -87,7 +87,7 @@ struct zd_ctrlset {
 

/* zd_ctrlset control field */
#define ZD_CS_NEED_RANDOM_BACKOFF 0x01
-#define ZD_CS_MULTICAST 0x02
+#define ZD_CS_NO_ACK 0x02

#define ZD_CS_FRAME_TYPE_MASK 0x0c
#define ZD_CS_DATA_FRAME 0x00

Signature · 1 line
1.5.6.3
#1 lore raw

2009/5/14 Gábor Stefanik <[email protected]>:

Quoted 45 lines

According to my tests, all that ZD_CS_MULTICAST does is to disable retrying/waiting for an ACK. Reflect this by renaming the bit to ZD_CS_NO_ACK and setting it based on IEEE80211_TX_CTL_NO_ACK, instead of is_multicast_ether_addr.

---
drivers/net/wireless/zd1211rw/zd_mac.c |    6 +++--- drivers/net/wireless/zd1211rw/zd_mac.h |    2 +-

2 files changed, 4 insertions(+), 4 deletions(-)
drivers/net/wireless/zd1211rw/zd_mac.c +3 -3
index 85c27ac..d1ec99f 100644
@@ -430,9 +430,9 @@ static void cs_set_control(struct zd_mac *mac, struct
 zd_ctrlset *cs,
    if (info->flags & IEEE80211_TX_CTL_FIRST_FRAGMENT)
        cs->control |= ZD_CS_NEED_RANDOM_BACKOFF;
 
-    /* Multicast */
-    if (is_multicast_ether_addr(header->addr1))
-        cs->control |= ZD_CS_MULTICAST;
+    /* No ACK expected (multicast, etc.) */
+    if (info->flags & IEEE80211_TX_CTL_NO_ACK)
+        cs->control |= ZD_CS_NO_ACK;
 
    /* PS-POLL */

   if (ieee80211_is_pspoll(header->frame_control))

drivers/net/wireless/zd1211rw/zd_mac.h +1 -2
index 4c05d3e..7c27591 100644
@@ -87,7 +87,7 @@ struct zd_ctrlset {
 
 /* zd_ctrlset control field */
 #define ZD_CS_NEED_RANDOM_BACKOFF    0x01
-#define ZD_CS_MULTICAST            0x02
+#define ZD_CS_NO_ACK            0x02
 
 #define ZD_CS_FRAME_TYPE_MASK        0x0c
 #define ZD_CS_DATA_FRAME        0x00
--
Quoted 3 lines

1.5.6.3

Nah, ignore this, it got wordwrapped. (I thought Thunderbird allows disabling word-wrap... :-( )

Signature · 1 line
Vista: [V]iruses, [I]ntruders, [S]pyware, [T]rojans and [A]dware. :-)