aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/dev.h
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2007-08-02 11:40:45 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:49:48 -0400
commit8c5127657549d055ac9d709cdea73902a6ef392c (patch)
tree33e72a0b55165d51652a002ab6929857f0e2facc /drivers/net/wireless/libertas/dev.h
parente52414728b930f0adcbc38c6498dd03b3568fe99 (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/dev.h')
-rw-r--r--drivers/net/wireless/libertas/dev.h16
1 files changed, 5 insertions, 11 deletions
diff --git a/drivers/net/wireless/libertas/dev.h b/drivers/net/wireless/libertas/dev.h
index c6fb703f665b..6acb8fb8733e 100644
--- a/drivers/net/wireless/libertas/dev.h
+++ b/drivers/net/wireless/libertas/dev.h
@@ -72,10 +72,8 @@ struct current_bss_params {
72 u8 band; 72 u8 band;
73 /** channel */ 73 /** channel */
74 u8 channel; 74 u8 channel;
75 /** number of rates supported */ 75 /** zero-terminated array of supported data rates */
76 int numofrates; 76 u8 rates[MAX_RATES + 1];
77 /** supported rates*/
78 u8 datarates[WLAN_SUPPORTED_RATES];
79}; 77};
80 78
81/** sleep_params */ 79/** sleep_params */
@@ -296,9 +294,6 @@ struct _wlan_adapter {
296 u32 fragthsd; 294 u32 fragthsd;
297 u32 rtsthsd; 295 u32 rtsthsd;
298 296
299 u32 datarate;
300 u8 is_datarate_auto;
301
302 u16 listeninterval; 297 u16 listeninterval;
303 u16 prescan; 298 u16 prescan;
304 u8 txretrycount; 299 u8 txretrycount;
@@ -364,10 +359,9 @@ struct _wlan_adapter {
364 u8 radioon; 359 u8 radioon;
365 u32 preamble; 360 u32 preamble;
366 361
367 /** Multi bands Parameter*/ 362 /** data rate stuff */
368 u8 libertas_supported_rates[G_SUPPORTED_RATES]; 363 u8 cur_rate;
369 364 u8 auto_rate;
370 /** Blue Tooth Co-existence Arbitration */
371 365
372 /** sleep_params */ 366 /** sleep_params */
373 struct sleep_params sp; 367 struct sleep_params sp;