提交 b4a7ff75 编写于 作者: F Felix Fietkau 提交者: Johannes Berg

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: NFelix Fietkau <nbd@openwrt.org>
[check local->use_chanctx]
Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
上级 aacde9ee
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册