提交 ac4d82fa 编写于 作者: P Pontus Fuchs 提交者: Johannes Berg

mac80211: Disallow changing chan type on monitor when CHAN_MODE_FIXED

If you add a monitor interface in parallel to a normal interface
mac80211 will let you to change the channel type on the monitor
interface even if you are connected. Add an explicit check to
disallow this.
Signed-off-by: NPontus Fuchs <pontus.fuchs@gmail.com>
[fix typo in commit log, use sdata instead of netdev]
Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
上级 e979e33c
......@@ -689,7 +689,8 @@ static int ieee80211_set_channel(struct wiphy *wiphy,
case CHAN_MODE_HOPPING:
return -EBUSY;
case CHAN_MODE_FIXED:
if (local->oper_channel != chan)
if (local->oper_channel != chan ||
(!sdata && local->_oper_channel_type != channel_type))
return -EBUSY;
if (!sdata && local->_oper_channel_type == channel_type)
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册