summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/wmi.c
diff options
context:
space:
mode:
authorSujith Manoharan <Sujith.Manoharan@atheros.com>2011-04-13 11:22:59 +0530
committerJohn W. Linville <linville@tuxdriver.com>2011-04-13 15:22:11 -0400
commit1c165c972b040f9ce199b8d8d3cc4f619872cba5 (patch)
treeb3c6e46d5c070037d9231f2d278cb00aee05b521 /drivers/net/wireless/ath/ath9k/wmi.c
parent29bbfb2491316f9a3888e74b0de7fccdbde67aaa (diff)
ath9k_htc: Fix WMI and beacon header
Match the beacon header with that of the firmware. Also, the firmware reports the TSF for an SWBA, so store it. Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/wmi.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/wmi.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/wmi.c b/drivers/net/wireless/ath/ath9k/wmi.c
index 267a98fcf5f..96171a2c687 100644
--- a/drivers/net/wireless/ath/ath9k/wmi.c
+++ b/drivers/net/wireless/ath/ath9k/wmi.c
@@ -156,6 +156,7 @@ static void ath9k_wmi_ctrl_rx(void *priv, struct sk_buff *skb,
struct wmi_cmd_hdr *hdr;
u16 cmd_id;
void *wmi_event;
+ struct wmi_event_swba *swba;
#ifdef CONFIG_ATH9K_HTC_DEBUGFS
__be32 txrate;
#endif
@@ -170,7 +171,11 @@ static void ath9k_wmi_ctrl_rx(void *priv, struct sk_buff *skb,
wmi_event = skb_pull(skb, sizeof(struct wmi_cmd_hdr));
switch (cmd_id) {
case WMI_SWBA_EVENTID:
- wmi->beacon_pending = *(u8 *)wmi_event;
+ swba = (struct wmi_event_swba *) wmi_event;
+
+ wmi->tsf = be64_to_cpu(swba->tsf);
+ wmi->beacon_pending = swba->beacon_pending;
+
tasklet_schedule(&wmi->drv_priv->swba_tasklet);
break;
case WMI_FATAL_EVENTID: