diff options
author | Christian Lamparter <chunkeey@web.de> | 2008-12-14 14:45:30 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-12-19 15:23:17 -0500 |
commit | 69ba3e5d74a467a64248cd90ccafb524b1fddcb5 (patch) | |
tree | 81d1dcf8216a132cce176321612cab6b6d36e601 /drivers/net/wireless/p54/p54common.h | |
parent | da9f57eade0a743450a201645db7fc5ac0809900 (diff) | |
download | talos-op-linux-69ba3e5d74a467a64248cd90ccafb524b1fddcb5.tar.gz talos-op-linux-69ba3e5d74a467a64248cd90ccafb524b1fddcb5.zip |
p54: more accurate rssi to dBm conversion
This patch replaces the static rssi auto calibration data
with more precise values out of the device's eeprom.
Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/p54/p54common.h')
-rw-r--r-- | drivers/net/wireless/p54/p54common.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/net/wireless/p54/p54common.h b/drivers/net/wireless/p54/p54common.h index 06e1643cc295..6c824e40f3ba 100644 --- a/drivers/net/wireless/p54/p54common.h +++ b/drivers/net/wireless/p54/p54common.h @@ -178,6 +178,11 @@ struct pda_pa_curve_data { u8 data[0]; } __attribute__ ((packed)); +struct pda_rssi_cal_entry { + __le16 mul; + __le16 add; +} __attribute__ ((packed)); + /* * this defines the PDR codes used to build PDAs as defined in document * number 553155. The current implementation mirrors version 1.1 of the @@ -429,22 +434,18 @@ struct p54_scan { u8 dup_16qam; u8 dup_64qam; union { - struct { - __le16 rssical_mul; - __le16 rssical_add; - } v1 __attribute__ ((packed)); + struct pda_rssi_cal_entry v1_rssi; struct { __le32 basic_rate_mask; u8 rts_rates[8]; - __le16 rssical_mul; - __le16 rssical_add; + struct pda_rssi_cal_entry rssi; } v2 __attribute__ ((packed)); } __attribute__ ((packed)); } __attribute__ ((packed)); -#define P54_SCAN_V1_LEN (sizeof(struct p54_scan)-12) -#define P54_SCAN_V2_LEN (sizeof(struct p54_scan)) +#define P54_SCAN_V1_LEN 0x70 +#define P54_SCAN_V2_LEN 0x7c struct p54_led { __le16 mode; |