aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex/sta_ioctl.c
diff options
context:
space:
mode:
authorYogesh Ashok Powar <yogeshp@marvell.com>2012-03-12 22:35:10 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-03-13 14:54:18 -0400
commit6685d109f4b60604fd206cff01355094a2e3b419 (patch)
treeaf19e8f14a9a1b98a0285a3433d74fff9c806d2a /drivers/net/wireless/mwifiex/sta_ioctl.c
parent985d68a3bb7678d6b4d5175f52d70b7f3abb992a (diff)
mwifiex: merge functions to derive cfp by chan & freq in one
There exist different functions with very long names to derive the channel frequency and power tripplet based on band and channel/freq. Signed-off-by: Yogesh Ashok Powar <yogeshp@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/sta_ioctl.c')
-rw-r--r--drivers/net/wireless/mwifiex/sta_ioctl.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/net/wireless/mwifiex/sta_ioctl.c b/drivers/net/wireless/mwifiex/sta_ioctl.c
index 0ae1209646c1..a3d79f4a6192 100644
--- a/drivers/net/wireless/mwifiex/sta_ioctl.c
+++ b/drivers/net/wireless/mwifiex/sta_ioctl.c
@@ -529,11 +529,10 @@ int mwifiex_bss_set_channel(struct mwifiex_private *priv,
529 adapter->adhoc_start_band = BAND_G | BAND_B; 529 adapter->adhoc_start_band = BAND_G | BAND_B;
530 if (chan->channel) { 530 if (chan->channel) {
531 if (chan->channel <= MAX_CHANNEL_BAND_BG) 531 if (chan->channel <= MAX_CHANNEL_BAND_BG)
532 cfp = mwifiex_get_cfp_by_band_and_channel_from_cfg80211 532 cfp = mwifiex_get_cfp(priv, 0, (u16) chan->channel, 0);
533 (priv, 0, (u16) chan->channel);
534 if (!cfp) { 533 if (!cfp) {
535 cfp = mwifiex_get_cfp_by_band_and_channel_from_cfg80211 534 cfp = mwifiex_get_cfp(priv, BAND_A,
536 (priv, BAND_A, (u16) chan->channel); 535 (u16) chan->channel, 0);
537 if (cfp) { 536 if (cfp) {
538 if (adapter->adhoc_11n_enabled) 537 if (adapter->adhoc_11n_enabled)
539 adapter->adhoc_start_band = BAND_A 538 adapter->adhoc_start_band = BAND_A
@@ -544,11 +543,9 @@ int mwifiex_bss_set_channel(struct mwifiex_private *priv,
544 } 543 }
545 } else { 544 } else {
546 if (chan->freq <= MAX_FREQUENCY_BAND_BG) 545 if (chan->freq <= MAX_FREQUENCY_BAND_BG)
547 cfp = mwifiex_get_cfp_by_band_and_freq_from_cfg80211( 546 cfp = mwifiex_get_cfp(priv, 0, 0, chan->freq);
548 priv, 0, chan->freq);
549 if (!cfp) { 547 if (!cfp) {
550 cfp = mwifiex_get_cfp_by_band_and_freq_from_cfg80211 548 cfp = mwifiex_get_cfp(priv, BAND_A, 0, chan->freq);
551 (priv, BAND_A, chan->freq);
552 if (cfp) { 549 if (cfp) {
553 if (adapter->adhoc_11n_enabled) 550 if (adapter->adhoc_11n_enabled)
554 adapter->adhoc_start_band = BAND_A 551 adapter->adhoc_start_band = BAND_A