提交 7a725f73 编写于 作者: J Johannes Berg 提交者: John W. Linville

mac80211: warn on some invalid vlan operations

These should never happen, but better warn about them than
crashing a driver, the fact that they never happen is rather
subtle throughout mac80211.
Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 0d143fe1
......@@ -156,6 +156,9 @@ int ieee80211_if_config(struct ieee80211_sub_if_data *sdata, u32 changed)
if (WARN_ON(!netif_running(sdata->dev)))
return 0;
if (WARN_ON(sdata->vif.type == NL80211_IFTYPE_AP_VLAN))
return -EINVAL;
if (!local->ops->config_interface)
return 0;
......@@ -321,6 +324,9 @@ void ieee80211_bss_info_change_notify(struct ieee80211_sub_if_data *sdata,
{
struct ieee80211_local *local = sdata->local;
if (WARN_ON(sdata->vif.type == NL80211_IFTYPE_AP_VLAN))
return;
if (!changed)
return;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册