diff --git a/net/wireless/chan.c b/net/wireless/chan.c index bc00c9a06b3d4ded2e1110e9140da09930c2c755..a46ac6c9b3655dbc056b8a20846a972b2bba9fdb 100644 --- a/net/wireless/chan.c +++ b/net/wireless/chan.c @@ -42,13 +42,14 @@ rdev_fixed_channel(struct cfg80211_registered_device *rdev, } int rdev_set_freq(struct cfg80211_registered_device *rdev, + struct wireless_dev *for_wdev, int freq, enum nl80211_channel_type channel_type) { struct ieee80211_channel *chan; struct ieee80211_sta_ht_cap *ht_cap; int result; - if (rdev_fixed_channel(rdev, NULL)) + if (rdev_fixed_channel(rdev, for_wdev)) return -EBUSY; if (!rdev->ops->set_channel) diff --git a/net/wireless/core.h b/net/wireless/core.h index 639db52eeff75ecaeaf631e5a7049cbb3da40922..f7be3a9b427e712dd86d0cbec5873c676462a09f 100644 --- a/net/wireless/core.h +++ b/net/wireless/core.h @@ -374,6 +374,7 @@ struct ieee80211_channel * rdev_fixed_channel(struct cfg80211_registered_device *rdev, struct wireless_dev *for_wdev); int rdev_set_freq(struct cfg80211_registered_device *rdev, + struct wireless_dev *for_wdev, int freq, enum nl80211_channel_type channel_type); #endif /* __NET_WIRELESS_CORE_H */ diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 667a87d307da8dd7e140df2cb03d4cfa18c9fda4..a8aaadeb67735830b50a551de9ba3fcc8cf27cab 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -721,7 +721,7 @@ static int nl80211_set_wiphy(struct sk_buff *skb, struct genl_info *info) freq = nla_get_u32(info->attrs[NL80211_ATTR_WIPHY_FREQ]); mutex_lock(&rdev->devlist_mtx); - result = rdev_set_freq(rdev, freq, channel_type); + result = rdev_set_freq(rdev, NULL, freq, channel_type); mutex_unlock(&rdev->devlist_mtx); if (result) goto bad_res; diff --git a/net/wireless/wext-compat.c b/net/wireless/wext-compat.c index 17648dc79867f98523be4f358bf93f0793194e08..c449174922108efe61c3ba6b96b6d243ee2b2633 100644 --- a/net/wireless/wext-compat.c +++ b/net/wireless/wext-compat.c @@ -766,7 +766,7 @@ int cfg80211_wext_siwfreq(struct net_device *dev, if (freq == 0) return -EINVAL; mutex_lock(&rdev->devlist_mtx); - err = rdev_set_freq(rdev, freq, NL80211_CHAN_NO_HT); + err = rdev_set_freq(rdev, NULL, freq, NL80211_CHAN_NO_HT); mutex_unlock(&rdev->devlist_mtx); return err; } diff --git a/net/wireless/wext-sme.c b/net/wireless/wext-sme.c index 907470063f22a042f9dc7082369b432f422b92a7..d16cd9ea4d002a2cf47b7b265d6c124a84a4e1b4 100644 --- a/net/wireless/wext-sme.c +++ b/net/wireless/wext-sme.c @@ -106,7 +106,7 @@ int cfg80211_mgd_wext_siwfreq(struct net_device *dev, /* SSID is not set, we just want to switch channel */ if (chan && !wdev->wext.connect.ssid_len) { - err = rdev_set_freq(rdev, freq, NL80211_CHAN_NO_HT); + err = rdev_set_freq(rdev, wdev, freq, NL80211_CHAN_NO_HT); goto out; }