aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/ibss.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/wireless/ibss.c')
-rw-r--r--net/wireless/ibss.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/net/wireless/ibss.c b/net/wireless/ibss.c
index 89baa3328411..ca5672f6ee2f 100644
--- a/net/wireless/ibss.c
+++ b/net/wireless/ibss.c
@@ -113,10 +113,21 @@ int __cfg80211_join_ibss(struct cfg80211_registered_device *rdev,
113 kfree(wdev->connect_keys); 113 kfree(wdev->connect_keys);
114 wdev->connect_keys = connkeys; 114 wdev->connect_keys = connkeys;
115 115
116 wdev->ibss_fixed = params->channel_fixed;
116#ifdef CONFIG_CFG80211_WEXT 117#ifdef CONFIG_CFG80211_WEXT
117 wdev->wext.ibss.channel = params->channel; 118 wdev->wext.ibss.channel = params->channel;
118#endif 119#endif
119 wdev->sme_state = CFG80211_SME_CONNECTING; 120 wdev->sme_state = CFG80211_SME_CONNECTING;
121
122 err = cfg80211_can_use_chan(rdev, wdev, params->channel,
123 params->channel_fixed
124 ? CHAN_MODE_SHARED
125 : CHAN_MODE_EXCLUSIVE);
126 if (err) {
127 wdev->connect_keys = NULL;
128 return err;
129 }
130
120 err = rdev->ops->join_ibss(&rdev->wiphy, dev, params); 131 err = rdev->ops->join_ibss(&rdev->wiphy, dev, params);
121 if (err) { 132 if (err) {
122 wdev->connect_keys = NULL; 133 wdev->connect_keys = NULL;