dect
/
linux-2.6
Archived
13
0
Fork 0

mac80211: fix monitor mode injection

Channel contexts are not always used with monitor interfaces. If no channel
context is set, use the oper channel, otherwise tx fails.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
[check local->use_chanctx]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
Felix Fietkau 2013-01-13 23:10:26 +01:00 committed by Johannes Berg
parent aacde9ee45
commit b4a7ff75ba
1 changed files with 6 additions and 3 deletions

View File

@ -1673,10 +1673,13 @@ netdev_tx_t ieee80211_monitor_start_xmit(struct sk_buff *skb,
chanctx_conf =
rcu_dereference(tmp_sdata->vif.chanctx_conf);
}
if (!chanctx_conf)
goto fail_rcu;
chan = chanctx_conf->def.chan;
if (chanctx_conf)
chan = chanctx_conf->def.chan;
else if (!local->use_chanctx)
chan = local->_oper_channel;
else
goto fail_rcu;
/*
* Frame injection is not allowed if beaconing is not allowed