aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/brcm80211/util/bcmwifi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/brcm80211/util/bcmwifi.c')
-rw-r--r--drivers/staging/brcm80211/util/bcmwifi.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/staging/brcm80211/util/bcmwifi.c b/drivers/staging/brcm80211/util/bcmwifi.c
index d82c2b29816d..955a3ab1a827 100644
--- a/drivers/staging/brcm80211/util/bcmwifi.c
+++ b/drivers/staging/brcm80211/util/bcmwifi.c
@@ -15,6 +15,7 @@
*/
#include <linux/ctype.h>
#include <linux/kernel.h>
+#include <linux/module.h>
#include <bcmdefs.h>
#include <bcmutils.h>
#include <bcmwifi.h>
@@ -25,7 +26,7 @@
* combination could be legal given any set of circumstances.
* RETURNS: true is the chanspec is malformed, false if it looks good.
*/
-bool wf_chspec_malformed(chanspec_t chanspec)
+bool bcm_chspec_malformed(chanspec_t chanspec)
{
/* must be 2G or 5G band */
if (!CHSPEC_IS5G(chanspec) && !CHSPEC_IS2G(chanspec))
@@ -45,13 +46,14 @@ bool wf_chspec_malformed(chanspec_t chanspec)
return false;
}
+EXPORT_SYMBOL(bcm_chspec_malformed);
/*
* This function returns the channel number that control traffic is being sent on, for legacy
* channels this is just the channel number, for 40MHZ channels it is the upper or lowre 20MHZ
* sideband depending on the chanspec selected
*/
-u8 wf_chspec_ctlchan(chanspec_t chspec)
+u8 bcm_chspec_ctlchan(chanspec_t chspec)
{
u8 ctl_chan;
@@ -60,7 +62,6 @@ u8 wf_chspec_ctlchan(chanspec_t chspec)
return CHSPEC_CHANNEL(chspec);
} else {
/* we only support 40MHZ with sidebands */
- ASSERT(CHSPEC_BW(chspec) == WL_CHANSPEC_BW_40);
/* chanspec channel holds the centre frequency, use that and the
* side band information to reconstruct the control channel number
*/
@@ -68,8 +69,6 @@ u8 wf_chspec_ctlchan(chanspec_t chspec)
/* control chan is the upper 20 MHZ SB of the 40MHZ channel */
ctl_chan = UPPER_20_SB(CHSPEC_CHANNEL(chspec));
} else {
- ASSERT(CHSPEC_CTL_SB(chspec) ==
- WL_CHANSPEC_CTL_SB_LOWER);
/* control chan is the lower 20 MHZ SB of the 40MHZ channel */
ctl_chan = LOWER_20_SB(CHSPEC_CHANNEL(chspec));
}
@@ -77,6 +76,7 @@ u8 wf_chspec_ctlchan(chanspec_t chspec)
return ctl_chan;
}
+EXPORT_SYMBOL(bcm_chspec_ctlchan);
/*
* Return the channel number for a given frequency and base frequency.
@@ -97,7 +97,7 @@ u8 wf_chspec_ctlchan(chanspec_t chspec)
*
* Reference 802.11 REVma, section 17.3.8.3, and 802.11B section 18.4.6.2
*/
-int wf_mhz2channel(uint freq, uint start_factor)
+int bcm_mhz2channel(uint freq, uint start_factor)
{
int ch = -1;
uint base;
@@ -133,4 +133,5 @@ int wf_mhz2channel(uint freq, uint start_factor)
return ch;
}
+EXPORT_SYMBOL(bcm_mhz2channel);