summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath6kl/wmi.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2011-09-19 19:15:07 +0300
committerKalle Valo <kvalo@qca.qualcomm.com>2011-09-22 10:08:00 +0300
commit32c1087460626f9cfa2b397eafd247bf039bacac (patch)
treea18779264bf721ee4b8cd6451bcd2024ef744e6a /drivers/net/wireless/ath/ath6kl/wmi.c
parent551185ca0a97a11917edc3ad8e11d68912795902 (diff)
downloadblackbird-op-linux-32c1087460626f9cfa2b397eafd247bf039bacac.tar.gz
blackbird-op-linux-32c1087460626f9cfa2b397eafd247bf039bacac.zip
ath6kl: Export beacon interval and DTIM period through STA info
Now that we allow the first Beacon frame after each connection to be processed at the host, we can figure out the DTIM period and expose it with Beacon interval through STA info BSS parameters to user space. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath6kl/wmi.c')
-rw-r--r--drivers/net/wireless/ath/ath6kl/wmi.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.c b/drivers/net/wireless/ath/ath6kl/wmi.c
index f7dcb56ab354..b90d116c018c 100644
--- a/drivers/net/wireless/ath/ath6kl/wmi.c
+++ b/drivers/net/wireless/ath/ath6kl/wmi.c
@@ -930,6 +930,17 @@ static int ath6kl_wmi_bssinfo_event_rx(struct wmi *wmi, u8 *datap, int len)
if (len < 8 + 2 + 2)
return -EINVAL;
+ if (bih->frame_type == BEACON_FTYPE && test_bit(CONNECTED, &ar->flag) &&
+ memcmp(bih->bssid, ar->bssid, ETH_ALEN) == 0) {
+ const u8 *tim;
+ tim = cfg80211_find_ie(WLAN_EID_TIM, buf + 8 + 2 + 2,
+ len - 8 - 2 - 2);
+ if (tim && tim[1] >= 2) {
+ ar->assoc_bss_dtim_period = tim[3];
+ set_bit(DTIM_PERIOD_AVAIL, &ar->flag);
+ }
+ }
+
/*
* In theory, use of cfg80211_inform_bss() would be more natural here
* since we do not have the full frame. However, at least for now,
OpenPOWER on IntegriCloud