]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
cfg80211: disallow setting channel on WDS interfaces
authorJohannes Berg <johannes.berg@intel.com>
Wed, 16 May 2012 21:50:19 +0000 (23:50 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 5 Jun 2012 19:32:17 +0000 (15:32 -0400)
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: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/wireless/nl80211.c
net/wireless/wext-compat.c

index 74f4a8f939356e52c97432dbfb512f7fd35e583c..089a5204dad5aa4ce75e5853240f35340831bd71 100644 (file)
@@ -1166,8 +1166,8 @@ static int parse_txq_params(struct nlattr *tb[],
 static bool nl80211_can_set_dev_channel(struct wireless_dev *wdev)
 {
        /*
-        * You can only set the channel explicitly for AP, mesh
-        * and WDS type interfaces; all others have their channel
+        * You can only set the channel explicitly for AP and
+        * mesh type interfaces; all others have their channel
         * managed via their respective "establish a connection"
         * command (connect, join, ...)
         *
@@ -1180,7 +1180,6 @@ static bool nl80211_can_set_dev_channel(struct wireless_dev *wdev)
         */
        return !wdev ||
                wdev->iftype == NL80211_IFTYPE_AP ||
-               wdev->iftype == NL80211_IFTYPE_WDS ||
                wdev->iftype == NL80211_IFTYPE_MESH_POINT ||
                wdev->iftype == NL80211_IFTYPE_MONITOR ||
                wdev->iftype == NL80211_IFTYPE_P2P_GO;
index 6a6181a673ca07a378a4b524f88249de78b661e4..b082fcc26f06f24790261374f0fda244956a9aa0 100644 (file)
@@ -796,7 +796,6 @@ static int cfg80211_wext_siwfreq(struct net_device *dev,
        case NL80211_IFTYPE_ADHOC:
                return cfg80211_ibss_wext_siwfreq(dev, info, wextfreq, extra);
        case NL80211_IFTYPE_MONITOR:
-       case NL80211_IFTYPE_WDS:
        case NL80211_IFTYPE_MESH_POINT:
                freq = cfg80211_wext_freq(wdev->wiphy, wextfreq);
                if (freq < 0)