d80211: add radiotap support
Subsystems (2)
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.
Signed-off-by Michael Wu <[email protected]>
---
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
@@ -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
@@ -198,7 +198,10 @@ void ieee80211_if_set_type(struct net_debreak ; }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",