aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex/cfg80211.c
diff options
context:
space:
mode:
authorAvinash Patil <patila@marvell.com>2012-06-15 15:21:51 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-06-20 14:45:36 -0400
commit0abd79e5a87319f0710c8db2ef2a2c5c6479c32b (patch)
treed939ad031862cca6676b3f0423d543e0d5b8bbc4 /drivers/net/wireless/mwifiex/cfg80211.c
parent29a6b508569cc1d04884d3140ccb5973dd7d91fa (diff)
mwifiex: set channel via start_ap handler for AP interface
This patch adds functionality to set channel info received from cfg80211_ap_settings in start_ap handler. Since set_channel cfg80211 handler has been removed and we need not explicitely call mwifiex_uap_set_channel(); hence this function definition is also removed. Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Kiran Divekar <dkiran@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mwifiex/cfg80211.c')
-rw-r--r--drivers/net/wireless/mwifiex/cfg80211.c23
1 files changed, 17 insertions, 6 deletions
diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c
index 015fec3371a..7b4eaf41bfc 100644
--- a/drivers/net/wireless/mwifiex/cfg80211.c
+++ b/drivers/net/wireless/mwifiex/cfg80211.c
@@ -384,13 +384,13 @@ mwifiex_set_rf_channel(struct mwifiex_private *priv,
384 cfp.freq = chan->center_freq; 384 cfp.freq = chan->center_freq;
385 cfp.channel = ieee80211_frequency_to_channel(chan->center_freq); 385 cfp.channel = ieee80211_frequency_to_channel(chan->center_freq);
386 386
387 if (mwifiex_bss_set_channel(priv, &cfp)) 387 if (priv->bss_type == MWIFIEX_BSS_TYPE_STA) {
388 return -EFAULT; 388 if (mwifiex_bss_set_channel(priv, &cfp))
389 389 return -EFAULT;
390 if (priv->bss_type == MWIFIEX_BSS_TYPE_STA)
391 return mwifiex_drv_change_adhoc_chan(priv, cfp.channel); 390 return mwifiex_drv_change_adhoc_chan(priv, cfp.channel);
392 else 391 }
393 return mwifiex_uap_set_channel(priv, cfp.channel); 392
393 return 0;
394} 394}
395 395
396/* 396/*
@@ -961,6 +961,17 @@ static int mwifiex_cfg80211_start_ap(struct wiphy *wiphy,
961 return -EINVAL; 961 return -EINVAL;
962 } 962 }
963 963
964 bss_cfg->channel =
965 (u8)ieee80211_frequency_to_channel(params->channel->center_freq);
966 bss_cfg->band_cfg = BAND_CONFIG_MANUAL;
967
968 if (mwifiex_set_rf_channel(priv, params->channel,
969 params->channel_type)) {
970 kfree(bss_cfg);
971 wiphy_err(wiphy, "Failed to set band config information!\n");
972 return -1;
973 }
974
964 if (mwifiex_set_secure_params(priv, bss_cfg, params)) { 975 if (mwifiex_set_secure_params(priv, bss_cfg, params)) {
965 kfree(bss_cfg); 976 kfree(bss_cfg);
966 wiphy_err(wiphy, "Failed to parse secuirty parameters!\n"); 977 wiphy_err(wiphy, "Failed to parse secuirty parameters!\n");