diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/wmi.c | 13 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/wmi.h | 3 |
2 files changed, 15 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.c b/drivers/net/wireless/ath/ath6kl/wmi.c index e95b035168ad..cd2db42c0989 100644 --- a/drivers/net/wireless/ath/ath6kl/wmi.c +++ b/drivers/net/wireless/ath/ath6kl/wmi.c | |||
@@ -3263,10 +3263,21 @@ int ath6kl_wmi_set_regdomain_cmd(struct wmi *wmi, const char *alpha2) | |||
3263 | 3263 | ||
3264 | s32 ath6kl_wmi_get_rate(s8 rate_index) | 3264 | s32 ath6kl_wmi_get_rate(s8 rate_index) |
3265 | { | 3265 | { |
3266 | u8 sgi = 0; | ||
3267 | |||
3266 | if (rate_index == RATE_AUTO) | 3268 | if (rate_index == RATE_AUTO) |
3267 | return 0; | 3269 | return 0; |
3268 | 3270 | ||
3269 | return wmi_rate_tbl[(u32) rate_index][0]; | 3271 | /* SGI is stored as the MSB of the rate_index */ |
3272 | if (rate_index & RATE_INDEX_MSB) { | ||
3273 | rate_index &= RATE_INDEX_WITHOUT_SGI_MASK; | ||
3274 | sgi = 1; | ||
3275 | } | ||
3276 | |||
3277 | if (WARN_ON(rate_index > RATE_MCS_7_40)) | ||
3278 | rate_index = RATE_MCS_7_40; | ||
3279 | |||
3280 | return wmi_rate_tbl[(u32) rate_index][sgi]; | ||
3270 | } | 3281 | } |
3271 | 3282 | ||
3272 | static int ath6kl_wmi_get_pmkid_list_event_rx(struct wmi *wmi, u8 *datap, | 3283 | static int ath6kl_wmi_get_pmkid_list_event_rx(struct wmi *wmi, u8 *datap, |
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.h b/drivers/net/wireless/ath/ath6kl/wmi.h index a638151cf861..e916e57c9d9a 100644 --- a/drivers/net/wireless/ath/ath6kl/wmi.h +++ b/drivers/net/wireless/ath/ath6kl/wmi.h | |||
@@ -1792,6 +1792,9 @@ struct rx_stats { | |||
1792 | a_sle32 ucast_rate; | 1792 | a_sle32 ucast_rate; |
1793 | } __packed; | 1793 | } __packed; |
1794 | 1794 | ||
1795 | #define RATE_INDEX_WITHOUT_SGI_MASK 0x7f | ||
1796 | #define RATE_INDEX_MSB 0x80 | ||
1797 | |||
1795 | struct tkip_ccmp_stats { | 1798 | struct tkip_ccmp_stats { |
1796 | __le32 tkip_local_mic_fail; | 1799 | __le32 tkip_local_mic_fail; |
1797 | __le32 tkip_cnter_measures_invoked; | 1800 | __le32 tkip_cnter_measures_invoked; |