diff options
Diffstat (limited to 'drivers/net/wireless/mwifiex/cfg80211.c')
-rw-r--r-- | drivers/net/wireless/mwifiex/cfg80211.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c index e27b3168862c..7276a3449e17 100644 --- a/drivers/net/wireless/mwifiex/cfg80211.c +++ b/drivers/net/wireless/mwifiex/cfg80211.c | |||
@@ -349,7 +349,6 @@ mwifiex_set_rf_channel(struct mwifiex_private *priv, | |||
349 | struct ieee80211_channel *chan, | 349 | struct ieee80211_channel *chan, |
350 | enum nl80211_channel_type channel_type) | 350 | enum nl80211_channel_type channel_type) |
351 | { | 351 | { |
352 | struct mwifiex_chan_freq_power cfp; | ||
353 | u32 config_bands = 0; | 352 | u32 config_bands = 0; |
354 | struct wiphy *wiphy = priv->wdev->wiphy; | 353 | struct wiphy *wiphy = priv->wdev->wiphy; |
355 | struct mwifiex_adapter *adapter = priv->adapter; | 354 | struct mwifiex_adapter *adapter = priv->adapter; |
@@ -389,24 +388,14 @@ mwifiex_set_rf_channel(struct mwifiex_private *priv, | |||
389 | mwifiex_cfg80211_channel_type_to_sec_chan_offset | 388 | mwifiex_cfg80211_channel_type_to_sec_chan_offset |
390 | (channel_type); | 389 | (channel_type); |
391 | adapter->channel_type = channel_type; | 390 | adapter->channel_type = channel_type; |
391 | priv->adhoc_channel = | ||
392 | ieee80211_frequency_to_channel(chan->center_freq); | ||
392 | 393 | ||
393 | mwifiex_send_domain_info_cmd_fw(wiphy); | 394 | mwifiex_send_domain_info_cmd_fw(wiphy); |
394 | } | 395 | } |
395 | 396 | ||
396 | wiphy_dbg(wiphy, "info: setting band %d, chan offset %d, mode %d\n", | 397 | wiphy_dbg(wiphy, "info: setting band %d, chan offset %d, mode %d\n", |
397 | config_bands, adapter->sec_chan_offset, priv->bss_mode); | 398 | config_bands, adapter->sec_chan_offset, priv->bss_mode); |
398 | if (!chan) | ||
399 | return 0; | ||
400 | |||
401 | memset(&cfp, 0, sizeof(cfp)); | ||
402 | cfp.freq = chan->center_freq; | ||
403 | cfp.channel = ieee80211_frequency_to_channel(chan->center_freq); | ||
404 | |||
405 | if (priv->bss_type == MWIFIEX_BSS_TYPE_STA) { | ||
406 | if (mwifiex_bss_set_channel(priv, &cfp)) | ||
407 | return -EFAULT; | ||
408 | return mwifiex_drv_change_adhoc_chan(priv, cfp.channel); | ||
409 | } | ||
410 | 399 | ||
411 | return 0; | 400 | return 0; |
412 | } | 401 | } |