提交 685d12a1 编写于 作者: J Johannes Berg 提交者: John W. Linville

cfg80211: disallow setting channel on WDS interfaces

If it worked (Felix says it doesn't right now), the
typical use-case for WDS interfaces would be to be
slaved to AP mode interfaces. Therefore, it isn't
necessary to set the channel on WDS interfaces. As
they don't support powersave or anything like that,
they also couldn't use a different channel anyway.
Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 aa430da4
...@@ -1166,8 +1166,8 @@ static int parse_txq_params(struct nlattr *tb[], ...@@ -1166,8 +1166,8 @@ static int parse_txq_params(struct nlattr *tb[],
static bool nl80211_can_set_dev_channel(struct wireless_dev *wdev) static bool nl80211_can_set_dev_channel(struct wireless_dev *wdev)
{ {
/* /*
* You can only set the channel explicitly for AP, mesh * You can only set the channel explicitly for AP and
* and WDS type interfaces; all others have their channel * mesh type interfaces; all others have their channel
* managed via their respective "establish a connection" * managed via their respective "establish a connection"
* command (connect, join, ...) * command (connect, join, ...)
* *
...@@ -1180,7 +1180,6 @@ static bool nl80211_can_set_dev_channel(struct wireless_dev *wdev) ...@@ -1180,7 +1180,6 @@ static bool nl80211_can_set_dev_channel(struct wireless_dev *wdev)
*/ */
return !wdev || return !wdev ||
wdev->iftype == NL80211_IFTYPE_AP || wdev->iftype == NL80211_IFTYPE_AP ||
wdev->iftype == NL80211_IFTYPE_WDS ||
wdev->iftype == NL80211_IFTYPE_MESH_POINT || wdev->iftype == NL80211_IFTYPE_MESH_POINT ||
wdev->iftype == NL80211_IFTYPE_MONITOR || wdev->iftype == NL80211_IFTYPE_MONITOR ||
wdev->iftype == NL80211_IFTYPE_P2P_GO; wdev->iftype == NL80211_IFTYPE_P2P_GO;
......
...@@ -796,7 +796,6 @@ static int cfg80211_wext_siwfreq(struct net_device *dev, ...@@ -796,7 +796,6 @@ static int cfg80211_wext_siwfreq(struct net_device *dev,
case NL80211_IFTYPE_ADHOC: case NL80211_IFTYPE_ADHOC:
return cfg80211_ibss_wext_siwfreq(dev, info, wextfreq, extra); return cfg80211_ibss_wext_siwfreq(dev, info, wextfreq, extra);
case NL80211_IFTYPE_MONITOR: case NL80211_IFTYPE_MONITOR:
case NL80211_IFTYPE_WDS:
case NL80211_IFTYPE_MESH_POINT: case NL80211_IFTYPE_MESH_POINT:
freq = cfg80211_wext_freq(wdev->wiphy, wextfreq); freq = cfg80211_wext_freq(wdev->wiphy, wextfreq);
if (freq < 0) if (freq < 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册