[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>
This commit is contained in:
committed by
David S. Miller
parent
e52414728b
commit
8c51276575
@ -152,14 +152,14 @@ struct bss_descriptor {
|
||||
u32 atimwindow;
|
||||
|
||||
u8 mode;
|
||||
u8 libertas_supported_rates[WLAN_SUPPORTED_RATES];
|
||||
/* zero-terminated array of supported data rates */
|
||||
u8 rates[MAX_RATES + 1];
|
||||
|
||||
__le64 timestamp; //!< TSF value included in the beacon/probe response
|
||||
unsigned long last_scanned;
|
||||
|
||||
union ieeetypes_phyparamset phyparamset;
|
||||
union IEEEtypes_ssparamset ssparamset;
|
||||
u8 datarates[WLAN_SUPPORTED_RATES];
|
||||
|
||||
u64 networktsf; //!< TSF timestamp from the current firmware TSF
|
||||
|
||||
|
Reference in New Issue
Block a user