aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/driver-ops.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-04-03 14:35:57 +0200
committerJohn W. Linville <linville@tuxdriver.com>2012-04-11 16:23:49 -0400
commit4b6f1dd6a6faf4ed8d209bbd548e78b15e55aee8 (patch)
tree7d79667ca414d70b99cb82a646d1a3c2cc466670 /net/mac80211/driver-ops.h
parentmac80211: manage AP netdev carrier state (diff)
downloadlinux-dev-4b6f1dd6a6faf4ed8d209bbd548e78b15e55aee8.tar.xz
linux-dev-4b6f1dd6a6faf4ed8d209bbd548e78b15e55aee8.zip
mac80211: add explicit monitor interface if needed
The queue mapping redesign that I'm planning to do will break pure injection unless we handle monitor interfaces explicitly. One possible option would be to have the driver tell mac80211 about monitor mode queues etc., but that would duplicate the API since we already need to have queue assignments handled per virtual interface. So in order to solve this, have a virtual monitor interface that is added whenever all active vifs are monitors. We could also use the state of one of the monitor interfaces, but managing that would be complicated, so allocate separate state. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/driver-ops.h')
-rw-r--r--net/mac80211/driver-ops.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h
index 8ad40f68f2c3..492c08c27c5f 100644
--- a/net/mac80211/driver-ops.h
+++ b/net/mac80211/driver-ops.h
@@ -101,7 +101,8 @@ static inline int drv_add_interface(struct ieee80211_local *local,
might_sleep();
if (WARN_ON(sdata->vif.type == NL80211_IFTYPE_AP_VLAN ||
- sdata->vif.type == NL80211_IFTYPE_MONITOR))
+ (sdata->vif.type == NL80211_IFTYPE_MONITOR &&
+ !(local->hw.flags & IEEE80211_HW_WANT_MONITOR_VIF))))
return -EINVAL;
trace_drv_add_interface(local, sdata);