48 #define BRCMS_MAXMCS 32
49 #define MCS_TABLE_SIZE 33
52 #define MCS_TXS_MASK 0xc0
53 #define MCS_TXS_SHIFT 6
56 static inline u8 mcs_2_txstreams(
u8 mcs)
61 static inline uint mcs_2_rate(
u8 mcs,
bool is40,
bool sgi)
75 #define BRCMS_RATE_MASK_FULL 0xff
87 #define RSPEC_RATE_MASK 0x0000007F
89 #define RSPEC_MIMORATE 0x08000000
91 #define RSPEC_BW_MASK 0x00000700
93 #define RSPEC_BW_SHIFT 8
95 #define RSPEC_STF_MASK 0x00003800
97 #define RSPEC_STF_SHIFT 11
99 #define RSPEC_CT_MASK 0x0000C000
101 #define RSPEC_CT_SHIFT 14
103 #define RSPEC_STC_MASK 0x00300000
105 #define RSPEC_STC_SHIFT 20
107 #define RSPEC_LDPC_CODING 0x00400000
109 #define RSPEC_SHORT_GI 0x00800000
111 #define RSPEC_OVERRIDE 0x80000000
113 #define RSPEC_OVERRIDE_MCS_ONLY 0x40000000
115 static inline bool rspec_active(
u32 rspec)
120 static inline u8 rspec_phytxbyte2(
u32 rspec)
122 return (rspec & 0xff00) >> 8;
125 static inline u32 rspec_get_bw(
u32 rspec)
130 static inline bool rspec_issgi(
u32 rspec)
135 static inline bool rspec_is40mhz(
u32 rspec)
137 u32 bw = rspec_get_bw(rspec);
142 static inline uint rspec2rate(
u32 rspec)
150 static inline u8 rspec_mimoplcp3(
u32 rspec)
152 return (rspec & 0xf00000) >> 16;
155 static inline bool plcp3_issgi(
u8 plcp)
160 static inline uint rspec_stc(
u32 rspec)
165 static inline uint rspec_stf(
u32 rspec)
170 static inline bool is_mcs_rate(
u32 ratespec)
172 return (ratespec & RSPEC_MIMORATE) != 0;
175 static inline bool is_ofdm_rate(
u32 ratespec)
177 return !is_mcs_rate(ratespec) &&
181 static inline bool is_cck_rate(
u32 ratespec)
185 return !is_mcs_rate(ratespec) && (
190 static inline bool is_single_stream(
u8 mcs)
195 static inline u8 cck_rspec(
u8 cck)
202 static inline u8 ofdm_phy2mac_rate(
u8 rlpt)
207 static inline u8 cck_phy2mac_rate(
u8 signal)
213 #define BRCMS_RATES_CCK_OFDM 0
214 #define BRCMS_RATES_CCK 1
215 #define BRCMS_RATES_OFDM 2
222 bool check_brate,
u8 txstreams);
237 int bandtype,
bool cck_only,
uint rate_mask,
238 bool mcsallow,
u8 bw,
u8 txstreams);