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>
} __packed;
struct tx_beacon_header {
- u8 len_changed;
u8 vif_index;
+ u8 len_changed;
u16 rev;
} __packed;
struct wmi_cmd_hdr *hdr;
u16 cmd_id;
void *wmi_event;
+ struct wmi_event_swba *swba;
#ifdef CONFIG_ATH9K_HTC_DEBUGFS
__be32 txrate;
#endif
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:
__be16 minor;
} __packed;
+
+struct wmi_event_swba {
+ __be64 tsf;
+ u8 beacon_pending;
+};
enum wmi_cmd_id {
WMI_ECHO_CMDID = 0x0001,
WMI_ACCESS_MEMORY_CMDID,
u32 cmd_rsp_len;
bool stopped;
+ u64 tsf;
u8 beacon_pending;
spinlock_t wmi_lock;