diff options
author | Yogesh Ashok Powar <yogeshp@marvell.com> | 2012-03-12 22:35:10 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-03-13 14:54:18 -0400 |
commit | 6685d109f4b60604fd206cff01355094a2e3b419 (patch) | |
tree | af19e8f14a9a1b98a0285a3433d74fff9c806d2a /drivers/net/wireless/mwifiex/scan.c | |
parent | 985d68a3bb7678d6b4d5175f52d70b7f3abb992a (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/scan.c')
-rw-r--r-- | drivers/net/wireless/mwifiex/scan.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/net/wireless/mwifiex/scan.c b/drivers/net/wireless/mwifiex/scan.c index fd0302fe5bd8..0a0c2890adfa 100644 --- a/drivers/net/wireless/mwifiex/scan.c +++ b/drivers/net/wireless/mwifiex/scan.c | |||
@@ -1434,8 +1434,8 @@ int mwifiex_check_network_compatibility(struct mwifiex_private *priv, | |||
1434 | if (!bss_desc) | 1434 | if (!bss_desc) |
1435 | return -1; | 1435 | return -1; |
1436 | 1436 | ||
1437 | if ((mwifiex_get_cfp_by_band_and_channel_from_cfg80211(priv, | 1437 | if ((mwifiex_get_cfp(priv, (u8) bss_desc->bss_band, |
1438 | (u8) bss_desc->bss_band, (u16) bss_desc->channel))) { | 1438 | (u16) bss_desc->channel, 0))) { |
1439 | switch (priv->bss_mode) { | 1439 | switch (priv->bss_mode) { |
1440 | case NL80211_IFTYPE_STATION: | 1440 | case NL80211_IFTYPE_STATION: |
1441 | case NL80211_IFTYPE_ADHOC: | 1441 | case NL80211_IFTYPE_ADHOC: |
@@ -1625,7 +1625,7 @@ int mwifiex_ret_802_11_scan(struct mwifiex_private *priv, | |||
1625 | s32 rssi; | 1625 | s32 rssi; |
1626 | const u8 *ie_buf; | 1626 | const u8 *ie_buf; |
1627 | size_t ie_len; | 1627 | size_t ie_len; |
1628 | int channel = -1; | 1628 | u16 channel = 0; |
1629 | u64 network_tsf = 0; | 1629 | u64 network_tsf = 0; |
1630 | u16 beacon_size = 0; | 1630 | u16 beacon_size = 0; |
1631 | u32 curr_bcn_bytes; | 1631 | u32 curr_bcn_bytes; |
@@ -1723,7 +1723,7 @@ int mwifiex_ret_802_11_scan(struct mwifiex_private *priv, | |||
1723 | &tsf_tlv->tsf_data[idx * TSF_DATA_SIZE], | 1723 | &tsf_tlv->tsf_data[idx * TSF_DATA_SIZE], |
1724 | sizeof(network_tsf)); | 1724 | sizeof(network_tsf)); |
1725 | 1725 | ||
1726 | if (channel != -1) { | 1726 | if (channel) { |
1727 | struct ieee80211_channel *chan; | 1727 | struct ieee80211_channel *chan; |
1728 | u8 band; | 1728 | u8 band; |
1729 | 1729 | ||
@@ -1736,8 +1736,7 @@ int mwifiex_ret_802_11_scan(struct mwifiex_private *priv, | |||
1736 | & (BIT(0) | BIT(1))); | 1736 | & (BIT(0) | BIT(1))); |
1737 | } | 1737 | } |
1738 | 1738 | ||
1739 | cfp = mwifiex_get_cfp_by_band_and_channel_from_cfg80211( | 1739 | cfp = mwifiex_get_cfp(priv, band, channel, 0); |
1740 | priv, (u8)band, (u16)channel); | ||
1741 | 1740 | ||
1742 | freq = cfp ? cfp->freq : 0; | 1741 | freq = cfp ? cfp->freq : 0; |
1743 | 1742 | ||