summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex/cfg80211.c
diff options
context:
space:
mode:
authorAvinash Patil2012-06-15 21:21:51 +0200
committerJohn W. Linville2012-06-20 20:45:36 +0200
commit0abd79e5a87319f0710c8db2ef2a2c5c6479c32b (patch)
treed939ad031862cca6676b3f0423d543e0d5b8bbc4 /drivers/net/wireless/mwifiex/cfg80211.c
parentwireless: rtl818x: rtl8180 add devices ids (diff)
downloadkernel-qcow2-linux-0abd79e5a87319f0710c8db2ef2a2c5c6479c32b.tar.gz
kernel-qcow2-linux-0abd79e5a87319f0710c8db2ef2a2c5c6479c32b.tar.xz
kernel-qcow2-linux-0abd79e5a87319f0710c8db2ef2a2c5c6479c32b.zip
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 015fec3371a0..7b4eaf41bfc0 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,
cfp.freq = chan->center_freq;
cfp.channel = ieee80211_frequency_to_channel(chan->center_freq);
- if (mwifiex_bss_set_channel(priv, &cfp))
- return -EFAULT;
-
- if (priv->bss_type == MWIFIEX_BSS_TYPE_STA)
+ if (priv->bss_type == MWIFIEX_BSS_TYPE_STA) {
+ if (mwifiex_bss_set_channel(priv, &cfp))
+ return -EFAULT;
return mwifiex_drv_change_adhoc_chan(priv, cfp.channel);
- else
- return mwifiex_uap_set_channel(priv, cfp.channel);
+ }
+
+ return 0;
}
/*
@@ -961,6 +961,17 @@ static int mwifiex_cfg80211_start_ap(struct wiphy *wiphy,
return -EINVAL;
}
+ bss_cfg->channel =
+ (u8)ieee80211_frequency_to_channel(params->channel->center_freq);
+ bss_cfg->band_cfg = BAND_CONFIG_MANUAL;
+
+ if (mwifiex_set_rf_channel(priv, params->channel,
+ params->channel_type)) {
+ kfree(bss_cfg);
+ wiphy_err(wiphy, "Failed to set band config information!\n");
+ return -1;
+ }
+
if (mwifiex_set_secure_params(priv, bss_cfg, params)) {
kfree(bss_cfg);
wiphy_err(wiphy, "Failed to parse secuirty parameters!\n");