aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorRaja Mani <rmani@qca.qualcomm.com>2012-04-16 06:39:56 -0400
committerKalle Valo <kvalo@qca.qualcomm.com>2012-04-18 05:56:38 -0400
commiteb38987e899369d936c55f93f631062c417435d2 (patch)
treec766c5cfa542d93a60402efe47703c5ba049af39 /drivers
parentebc6a5332f69c3ce2b071015817fb1cb149217c1 (diff)
ath6kl: Retain bg scan period value modified by the user
Added a new member bg_scan_period in struct ath6kl_vif to retain background scan period value configured via debugfs entry 'bgscan_interval'. This backup is needed in schedule scan path while configuring scan parameters. Signed-off-by: Raja Mani <rmani@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/ath/ath6kl/cfg80211.c1
-rw-r--r--drivers/net/wireless/ath/ath6kl/core.h1
-rw-r--r--drivers/net/wireless/ath/ath6kl/debug.c7
3 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 c5e90d30c672..20881334da60 100644
--- a/drivers/net/wireless/ath/ath6kl/cfg80211.c
+++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
@@ -3370,6 +3370,7 @@ struct net_device *ath6kl_interface_add(struct ath6kl *ar, char *name,
3370 vif->next_mode = nw_type; 3370 vif->next_mode = nw_type;
3371 vif->listen_intvl_t = ATH6KL_DEFAULT_LISTEN_INTVAL; 3371 vif->listen_intvl_t = ATH6KL_DEFAULT_LISTEN_INTVAL;
3372 vif->bmiss_time_t = ATH6KL_DEFAULT_BMISS_TIME; 3372 vif->bmiss_time_t = ATH6KL_DEFAULT_BMISS_TIME;
3373 vif->bg_scan_period = 0;
3373 vif->htcap.ht_enable = true; 3374 vif->htcap.ht_enable = true;
3374 3375
3375 memcpy(ndev->dev_addr, ar->mac_addr, ETH_ALEN); 3376 memcpy(ndev->dev_addr, ar->mac_addr, ETH_ALEN);
diff --git a/drivers/net/wireless/ath/ath6kl/core.h b/drivers/net/wireless/ath/ath6kl/core.h
index 280f305e599d..a97cb836106a 100644
--- a/drivers/net/wireless/ath/ath6kl/core.h
+++ b/drivers/net/wireless/ath/ath6kl/core.h
@@ -557,6 +557,7 @@ struct ath6kl_vif {
557 u16 assoc_bss_beacon_int; 557 u16 assoc_bss_beacon_int;
558 u16 listen_intvl_t; 558 u16 listen_intvl_t;
559 u16 bmiss_time_t; 559 u16 bmiss_time_t;
560 u16 bg_scan_period;
560 u8 assoc_bss_dtim_period; 561 u8 assoc_bss_dtim_period;
561 struct net_device_stats net_stats; 562 struct net_device_stats net_stats;
562 struct target_stats target_stats; 563 struct target_stats target_stats;
diff --git a/drivers/net/wireless/ath/ath6kl/debug.c b/drivers/net/wireless/ath/ath6kl/debug.c
index 496382f472de..acb6430d8e7e 100644
--- a/drivers/net/wireless/ath/ath6kl/debug.c
+++ b/drivers/net/wireless/ath/ath6kl/debug.c
@@ -1578,10 +1578,15 @@ static ssize_t ath6kl_bgscan_int_write(struct file *file,
1578 size_t count, loff_t *ppos) 1578 size_t count, loff_t *ppos)
1579{ 1579{
1580 struct ath6kl *ar = file->private_data; 1580 struct ath6kl *ar = file->private_data;
1581 struct ath6kl_vif *vif;
1581 u16 bgscan_int; 1582 u16 bgscan_int;
1582 char buf[32]; 1583 char buf[32];
1583 ssize_t len; 1584 ssize_t len;
1584 1585
1586 vif = ath6kl_vif_first(ar);
1587 if (!vif)
1588 return -EIO;
1589
1585 len = min(count, sizeof(buf) - 1); 1590 len = min(count, sizeof(buf) - 1);
1586 if (copy_from_user(buf, user_buf, len)) 1591 if (copy_from_user(buf, user_buf, len))
1587 return -EFAULT; 1592 return -EFAULT;
@@ -1593,6 +1598,8 @@ static ssize_t ath6kl_bgscan_int_write(struct file *file,
1593 if (bgscan_int == 0) 1598 if (bgscan_int == 0)
1594 bgscan_int = 0xffff; 1599 bgscan_int = 0xffff;
1595 1600
1601 vif->bg_scan_period = bgscan_int;
1602
1596 ath6kl_wmi_scanparams_cmd(ar->wmi, 0, 0, 0, bgscan_int, 0, 0, 0, 3, 1603 ath6kl_wmi_scanparams_cmd(ar->wmi, 0, 0, 0, bgscan_int, 0, 0, 0, 3,
1597 0, 0, 0); 1604 0, 0, 0);
1598 1605