• Dan Williams's avatar
    [PATCH] libertas: simplify and clean up data rate handling · 8c512765
    Dan Williams authored
    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: default avatarDan Williams <dcbw@redhat.com>
    Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
    8c512765
scan.c 55.9 KB