Skip to contentSkip to conversation

zd1211rw: Fix data padding for QoS

RFC PATCH New Michael Buesch 1 participant 1 message Jun 4, 2008 Networking drivers (wireless)

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 zd1211rw: Fix data padding for QoS

I was wondering whether the data padding was broken in zd1211 for QoS frames. The IEEE80211_STYPE_QOS_DATA is a bit that can be used as indicator for the presence of the 2 byte QoS control field.

This patch is neither tested, nor did I see any runtime breakage. It just seems to me that this is a bug anyway.

drivers/net/wireless/zd1211rw/zd_mac.c +1 -1
Index: wireless-testing/drivers/net/wireless/zd1211rw/zd_mac.c
===================================================================
@@ -719,7 +719,7 @@ int zd_mac_rx(struct ieee80211_hw *hw, c
 	fc = le16_to_cpu(*((__le16 *) buffer));
 
 	is_qos = ((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_DATA) &&
-		 ((fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_QOS_DATA);
+		 (fc & IEEE80211_STYPE_QOS_DATA);
 	is_4addr = (fc & (IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS)) ==
 		   (IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS);
 	need_padding = is_qos ^ is_4addr;
Signature · 1 line
Greetings Michael.