diff options
author | Dan Williams <dcbw@redhat.com> | 2007-08-02 11:40:45 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-10 19:49:48 -0400 |
commit | 8c5127657549d055ac9d709cdea73902a6ef392c (patch) | |
tree | 33e72a0b55165d51652a002ab6929857f0e2facc /drivers/net/wireless/libertas/defs.h | |
parent | e52414728b930f0adcbc38c6498dd03b3568fe99 (diff) |
[PATCH] libertas: simplify and clean up data rate handling
Remove unused/duplicated fields and consolidate static data rate arrays,
for example the libertas_supported_rates[] and datarates[] arrays in
the bss_descriptor structure, and the libertas_supported_rates field
in the wlan_adapter structure.
Introduce libertas_fw_index_to_data_rate and libertas_data_rate_to_fw_index
functions and use them everywhere firmware requires a rate index rather
than a rate array.
The firmware requires the 4 basic rates to have the MSB set, but most
other stuff doesn't, like WEXT and mesh ioctls. Therefore, only set the MSB
on basic rates when pushing rate arrays to firmware instead of doing a ton
of (rate & 0x7f) everywhere.
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/defs.h')
-rw-r--r-- | drivers/net/wireless/libertas/defs.h | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/net/wireless/libertas/defs.h b/drivers/net/wireless/libertas/defs.h index 862292913c2c..a1c6dae1ba46 100644 --- a/drivers/net/wireless/libertas/defs.h +++ b/drivers/net/wireless/libertas/defs.h | |||
@@ -246,10 +246,7 @@ static inline void lbs_dbg_hex(char *prompt, u8 * buf, int len) | |||
246 | ((((int)(AVG) * (N -1)) + ((u16)(SNRNF) * \ | 246 | ((((int)(AVG) * (N -1)) + ((u16)(SNRNF) * \ |
247 | AVG_SCALE)) / N)) | 247 | AVG_SCALE)) / N)) |
248 | 248 | ||
249 | #define B_SUPPORTED_RATES 8 | 249 | #define MAX_RATES 14 |
250 | #define G_SUPPORTED_RATES 14 | ||
251 | |||
252 | #define WLAN_SUPPORTED_RATES 14 | ||
253 | 250 | ||
254 | #define MAX_LEDS 8 | 251 | #define MAX_LEDS 8 |
255 | 252 | ||
@@ -263,11 +260,7 @@ typedef struct _wlan_adapter wlan_adapter; | |||
263 | extern const char libertas_driver_version[]; | 260 | extern const char libertas_driver_version[]; |
264 | extern u16 libertas_region_code_to_index[MRVDRV_MAX_REGION_CODE]; | 261 | extern u16 libertas_region_code_to_index[MRVDRV_MAX_REGION_CODE]; |
265 | 262 | ||
266 | extern u8 libertas_supported_rates[G_SUPPORTED_RATES]; | 263 | extern u8 libertas_bg_rates[MAX_RATES]; |
267 | |||
268 | extern u8 libertas_adhoc_rates_g[G_SUPPORTED_RATES]; | ||
269 | |||
270 | extern u8 libertas_adhoc_rates_b[4]; | ||
271 | 264 | ||
272 | /** ENUM definition*/ | 265 | /** ENUM definition*/ |
273 | /** SNRNF_TYPE */ | 266 | /** SNRNF_TYPE */ |