summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath6kl/wmi.c
diff options
context:
space:
mode:
authorThomas Pedersen <c_tpeder@qca.qualcomm.com>2012-08-15 16:51:24 -0700
committerKalle Valo <kvalo@qca.qualcomm.com>2012-10-24 11:49:46 +0300
commitb1f47e3a962b8b69612d1eecf4d50082b402fcc5 (patch)
tree0e7d9fc72282e9ac0e78ec8c3106cecb17176cff /drivers/net/wireless/ath/ath6kl/wmi.c
parenta3b3842c2e27ba07f8f7944a76013425d182c47b (diff)
downloadlinux-b1f47e3a962b8b69612d1eecf4d50082b402fcc5.tar.bz2
ath6kl: rework scheduled scan
This patch reflects changes in the firmware scheduled scan implementation to behave better in cases with multiple concurrent vifs. Major changes: - scheduled scan filters and state are now programmed per-vif. - decouple scheduled scan from host sleep. To maintain graceful failure with old firmwares, a new firmware capability bit is introduced: ATH6KL_FW_CAPABILITY_SCHED_SCAN_V2. ath6kl simply won't advertise scheduled scan to cfg80211 if the SCHED_SCAN_V2 is not supported. Since firmwares from here on out won't support the previous implicit API for scheduled scan (set WoW filters and host sleep), bump the firmware API to protect old drivers. Unfortunately, due to firmware RAM constraints ath6kl still cannot expect a scan complete event at the end of a scheduled scan results cycle, so the sched_scan_timer is retained. Signed-off-by: Thomas Pedersen <c_tpeder@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.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.c b/drivers/net/wireless/ath/ath6kl/wmi.c
index 373751f9177f..e95b035168ad 100644
--- a/drivers/net/wireless/ath/ath6kl/wmi.c
+++ b/drivers/net/wireless/ath/ath6kl/wmi.c
@@ -1116,7 +1116,7 @@ static int ath6kl_wmi_bssinfo_event_rx(struct wmi *wmi, u8 *datap, int len,
* the timer would not ever fire if the scan interval is short
* enough.
*/
- if (ar->state == ATH6KL_STATE_SCHED_SCAN &&
+ if (test_bit(SCHED_SCANNING, &vif->flags) &&
!timer_pending(&vif->sched_scan_timer)) {
mod_timer(&vif->sched_scan_timer, jiffies +
msecs_to_jiffies(ATH6KL_SCHED_SCAN_RESULT_DELAY));
@@ -2027,6 +2027,27 @@ int ath6kl_wmi_beginscan_cmd(struct wmi *wmi, u8 if_idx,
return ret;
}
+int ath6kl_wmi_enable_sched_scan_cmd(struct wmi *wmi, u8 if_idx, bool enable)
+{
+ struct sk_buff *skb;
+ struct wmi_enable_sched_scan_cmd *sc;
+ int ret;
+
+ skb = ath6kl_wmi_get_new_buf(sizeof(*sc));
+ if (!skb)
+ return -ENOMEM;
+
+ ath6kl_dbg(ATH6KL_DBG_WMI, "%s scheduled scan on vif %d\n",
+ enable ? "enabling" : "disabling", if_idx);
+ sc = (struct wmi_enable_sched_scan_cmd *) skb->data;
+ sc->enable = enable ? 1 : 0;
+
+ ret = ath6kl_wmi_cmd_send(wmi, if_idx, skb,
+ WMI_ENABLE_SCHED_SCAN_CMDID,
+ NO_SYNC_WMIFLAG);
+ return ret;
+}
+
int ath6kl_wmi_scanparams_cmd(struct wmi *wmi, u8 if_idx,
u16 fg_start_sec,
u16 fg_end_sec, u16 bg_sec,