~ubuntu-branches/ubuntu/quantal/linux-linaro-mx51/quantal

« back to all changes in this revision

Viewing changes to drivers/staging/brcm80211/util/bcmwifi.c

  • Committer: Package Import Robot
  • Author(s): John Rigby, John Rigby
  • Date: 2011-09-26 10:44:23 UTC
  • Revision ID: package-import@ubuntu.com-20110926104423-3o58a3c1bj7x00rs
Tags: 3.0.0-1007.9
[ John Rigby ]

Enable crypto modules and remove crypto-modules from
exclude-module files
LP: #826021

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
 */
16
16
#include <linux/ctype.h>
17
17
#include <linux/kernel.h>
 
18
#include <linux/module.h>
18
19
#include <bcmdefs.h>
19
20
#include <bcmutils.h>
20
21
#include <bcmwifi.h>
25
26
 * combination could be legal given any set of circumstances.
26
27
 * RETURNS: true is the chanspec is malformed, false if it looks good.
27
28
 */
28
 
bool wf_chspec_malformed(chanspec_t chanspec)
 
29
bool bcm_chspec_malformed(chanspec_t chanspec)
29
30
{
30
31
        /* must be 2G or 5G band */
31
32
        if (!CHSPEC_IS5G(chanspec) && !CHSPEC_IS2G(chanspec))
45
46
 
46
47
        return false;
47
48
}
 
49
EXPORT_SYMBOL(bcm_chspec_malformed);
48
50
 
49
51
/*
50
52
 * This function returns the channel number that control traffic is being sent on, for legacy
51
53
 * channels this is just the channel number, for 40MHZ channels it is the upper or lowre 20MHZ
52
54
 * sideband depending on the chanspec selected
53
55
 */
54
 
u8 wf_chspec_ctlchan(chanspec_t chspec)
 
56
u8 bcm_chspec_ctlchan(chanspec_t chspec)
55
57
{
56
58
        u8 ctl_chan;
57
59
 
60
62
                return CHSPEC_CHANNEL(chspec);
61
63
        } else {
62
64
                /* we only support 40MHZ with sidebands */
63
 
                ASSERT(CHSPEC_BW(chspec) == WL_CHANSPEC_BW_40);
64
65
                /* chanspec channel holds the centre frequency, use that and the
65
66
                 * side band information to reconstruct the control channel number
66
67
                 */
68
69
                        /* control chan is the upper 20 MHZ SB of the 40MHZ channel */
69
70
                        ctl_chan = UPPER_20_SB(CHSPEC_CHANNEL(chspec));
70
71
                } else {
71
 
                        ASSERT(CHSPEC_CTL_SB(chspec) ==
72
 
                               WL_CHANSPEC_CTL_SB_LOWER);
73
72
                        /* control chan is the lower 20 MHZ SB of the 40MHZ channel */
74
73
                        ctl_chan = LOWER_20_SB(CHSPEC_CHANNEL(chspec));
75
74
                }
77
76
 
78
77
        return ctl_chan;
79
78
}
 
79
EXPORT_SYMBOL(bcm_chspec_ctlchan);
80
80
 
81
81
/*
82
82
 * Return the channel number for a given frequency and base frequency.
97
97
 *
98
98
 * Reference 802.11 REVma, section 17.3.8.3, and 802.11B section 18.4.6.2
99
99
 */
100
 
int wf_mhz2channel(uint freq, uint start_factor)
 
100
int bcm_mhz2channel(uint freq, uint start_factor)
101
101
{
102
102
        int ch = -1;
103
103
        uint base;
133
133
 
134
134
        return ch;
135
135
}
 
136
EXPORT_SYMBOL(bcm_mhz2channel);
136
137