Skip to content

Commit 685d12a

Browse files
jmberg-intellinvjw
authored andcommitted
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: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
1 parent aa430da commit 685d12a

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

‎net/wireless/nl80211.c‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,8 +1166,8 @@ static int parse_txq_params(struct nlattr *tb[],
11661166
static bool nl80211_can_set_dev_channel(struct wireless_dev *wdev)
11671167
{
11681168
/*
1169-
* You can only set the channel explicitly for AP, mesh
1170-
* and WDS type interfaces; all others have their channel
1169+
* You can only set the channel explicitly for AP and
1170+
* mesh type interfaces; all others have their channel
11711171
* managed via their respective "establish a connection"
11721172
* command (connect, join, ...)
11731173
*
@@ -1180,7 +1180,6 @@ static bool nl80211_can_set_dev_channel(struct wireless_dev *wdev)
11801180
*/
11811181
return !wdev ||
11821182
wdev->iftype == NL80211_IFTYPE_AP ||
1183-
wdev->iftype == NL80211_IFTYPE_WDS ||
11841183
wdev->iftype == NL80211_IFTYPE_MESH_POINT ||
11851184
wdev->iftype == NL80211_IFTYPE_MONITOR ||
11861185
wdev->iftype == NL80211_IFTYPE_P2P_GO;

‎net/wireless/wext-compat.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -796,7 +796,6 @@ static int cfg80211_wext_siwfreq(struct net_device *dev,
796796
case NL80211_IFTYPE_ADHOC:
797797
return cfg80211_ibss_wext_siwfreq(dev, info, wextfreq, extra);
798798
case NL80211_IFTYPE_MONITOR:
799-
case NL80211_IFTYPE_WDS:
800799
case NL80211_IFTYPE_MESH_POINT:
801800
freq = cfg80211_wext_freq(wdev->wiphy, wextfreq);
802801
if (freq < 0)

0 commit comments

Comments
 (0)