Search Linux Wireless

[PATCH] ath6kl: Set background scan period.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



After connect command, send scan params WMI command to
set background scan period. If period value is zero
send 0xffff as bg scan period to disable bg scan.

This patch depends on below patch
cfg80211: Add background scan period attribute.

Signed-off-by: Bala Shanmugam <bkamatch@xxxxxxxxxxxxxxxx>
---
 drivers/net/wireless/ath/ath6kl/cfg80211.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c
index a91f521..8e984d7 100644
--- a/drivers/net/wireless/ath/ath6kl/cfg80211.c
+++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
@@ -578,6 +578,15 @@ static int ath6kl_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev,
 					vif->req_bssid, vif->ch_hint,
 					ar->connect_ctrl_flags, nw_subtype);
 
+	if (sme->bg_scan_period >= 0) {
+		/* disable bg scan if period is 0 */
+		if (sme->bg_scan_period == 0)
+			sme->bg_scan_period = 0xffff;
+
+		ath6kl_wmi_scanparams_cmd(ar->wmi, vif->fw_vif_idx, 0, 0,
+			sme->bg_scan_period, 0, 0, 0, 3, 0, 0, 0);
+	}
+
 	up(&ar->sem);
 
 	if (status == -EINVAL) {
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux