diff options
author | Raja Mani <rmani@qca.qualcomm.com> | 2012-04-16 06:39:56 -0400 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2012-04-18 05:56:38 -0400 |
commit | eb38987e899369d936c55f93f631062c417435d2 (patch) | |
tree | c766c5cfa542d93a60402efe47703c5ba049af39 /drivers/net/wireless/ath/ath6kl/debug.c | |
parent | ebc6a5332f69c3ce2b071015817fb1cb149217c1 (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/net/wireless/ath/ath6kl/debug.c')
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/debug.c | 7 |
1 files changed, 7 insertions, 0 deletions
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 | ||