aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/hostcmd.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/hostcmd.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/hostcmd.h')
-rw-r--r--drivers/net/wireless/libertas/hostcmd.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/wireless/libertas/hostcmd.h b/drivers/net/wireless/libertas/hostcmd.h
index 76c5fdeb256a..44cf39c8d1b8 100644
--- a/drivers/net/wireless/libertas/hostcmd.h
+++ b/drivers/net/wireless/libertas/hostcmd.h
@@ -428,8 +428,8 @@ struct PS_CMD_ConfirmSleep {
428 428
429struct cmd_ds_802_11_data_rate { 429struct cmd_ds_802_11_data_rate {
430 __le16 action; 430 __le16 action;
431 __le16 reserverd; 431 __le16 reserved;
432 u8 datarate[G_SUPPORTED_RATES]; 432 u8 rates[MAX_RATES];
433}; 433};
434 434
435struct cmd_ds_802_11_rate_adapt_rateset { 435struct cmd_ds_802_11_rate_adapt_rateset {
@@ -447,7 +447,7 @@ struct cmd_ds_802_11_ad_hoc_start {
447 union ieeetypes_phyparamset phyparamset; 447 union ieeetypes_phyparamset phyparamset;
448 __le16 probedelay; 448 __le16 probedelay;
449 __le16 capability; 449 __le16 capability;
450 u8 datarate[G_SUPPORTED_RATES]; 450 u8 rates[MAX_RATES];
451 u8 tlv_memory_size_pad[100]; 451 u8 tlv_memory_size_pad[100];
452} __attribute__ ((packed)); 452} __attribute__ ((packed));
453 453
@@ -462,7 +462,7 @@ struct adhoc_bssdesc {
462 union ieeetypes_phyparamset phyparamset; 462 union ieeetypes_phyparamset phyparamset;
463 union IEEEtypes_ssparamset ssparamset; 463 union IEEEtypes_ssparamset ssparamset;
464 __le16 capability; 464 __le16 capability;
465 u8 datarates[G_SUPPORTED_RATES]; 465 u8 rates[MAX_RATES];
466 466
467 /* DO NOT ADD ANY FIELDS TO THIS STRUCTURE. It is used below in the 467 /* DO NOT ADD ANY FIELDS TO THIS STRUCTURE. It is used below in the
468 * Adhoc join command and will cause a binary layout mismatch with 468 * Adhoc join command and will cause a binary layout mismatch with