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 16:49:48 -0700 |
commit | 8c5127657549d055ac9d709cdea73902a6ef392c (patch) | |
tree | 33e72a0b55165d51652a002ab6929857f0e2facc /drivers/net/wireless/libertas/fw.c | |
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/fw.c')
-rw-r--r-- | drivers/net/wireless/libertas/fw.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/net/wireless/libertas/fw.c b/drivers/net/wireless/libertas/fw.c index d214692eb20..6c259878da9 100644 --- a/drivers/net/wireless/libertas/fw.c +++ b/drivers/net/wireless/libertas/fw.c @@ -214,7 +214,10 @@ static void wlan_init_adapter(wlan_private * priv) adapter->txantenna = RF_ANTENNA_2; adapter->rxantenna = RF_ANTENNA_AUTO; - adapter->is_datarate_auto = 1; + adapter->auto_rate = 1; + adapter->cur_rate = 0; + adapter->adhoc_grate_enabled = 0; + adapter->beaconperiod = MRVDRV_BEACON_INTERVAL; // set default capabilities @@ -229,10 +232,6 @@ static void wlan_init_adapter(wlan_private * priv) adapter->needtowakeup = 0; adapter->locallisteninterval = 0; /* default value in firmware will be used */ - adapter->datarate = 0; // Initially indicate the rate as auto - - adapter->adhoc_grate_enabled = 0; - adapter->intcounter = 0; adapter->currenttxskb = NULL; |