Skip to contentSkip to conversation

d80211: add radiotap support

PATCH New Michael Wu 1 participant 1 message Dec 16, 2006

Subsystems (2)
lore
Share & tools
lore

Michael Wu

author
#0 lore raw

PATCH 1/1 d80211: add radiotap support

d80211: add radiotap support

This patch adds support for radiotap to d80211. The driver must set IEEE80211_HW_MONITOR_DURING_OPER as well as IEEE80211_HW_RADIOTAP_SUPPORTED, and it must send radiotap frames when there is at least one monitor interface up. Tested with zd1211rw-d80211.

---

 include/net/d80211.h         |    3 +++
 net/d80211/ieee80211.c       |   43 ++++++++++++++++++++++++++++++++----------
 net/d80211/ieee80211_iface.c |    5 ++++-
 3 files changed, 40 insertions(+), 11 deletions(-)
include/net/d80211.h +3 -0
index 30980e1..27b2487 100644
@@ -501,6 +501,9 @@ struct ieee80211_hw {
 	 * per-packet RC4 key with each TX frame when doing hwcrypto */
 #define IEEE80211_HW_TKIP_REQ_PHASE2_KEY (1<<14)
 
+	/* Driver supports radiotap. Temporary until all drivers support it. */
+#define IEEE80211_HW_RADIOTAP_SUPPORTED (1<<20)
+
 	u32 flags;			/* hardware flags defined above */
 
 	/* Set to the size of a needed device specific skb headroom for TX skbs. */
net/d80211/ieee80211.c +33 -10

94 lines not on this page · raw message

net/d80211/ieee80211_iface.c +4 -1
index 3e9d531..c1bb6d0 100644
@@ -198,7 +198,10 @@ void ieee80211_if_set_type(struct net_de
 		break;
 	}
 	case IEEE80211_IF_TYPE_MNTR:
-		dev->type = ARPHRD_IEEE80211_PRISM;
+		if (sdata->local->hw.flags & IEEE80211_HW_RADIOTAP_SUPPORTED)
+			dev->type = ARPHRD_IEEE80211_RADIOTAP;
+		else
+			dev->type = ARPHRD_IEEE80211_PRISM;
 		break;
 	default:
 		printk(KERN_WARNING "%s: %s: Unknown interface type 0x%x",