diff options
author | Raja Mani <rmani@qca.qualcomm.com> | 2012-02-20 19:08:07 +0530 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2012-03-07 09:38:25 +0200 |
commit | 8f46fccd6cd0d7ba70ba1636e59e98ca17dd2239 (patch) | |
tree | 401252e6260bff1aa29a0530d660e7d9db9fa9ee /drivers/net/wireless/ath/ath6kl/debug.c | |
parent | 390a8c8fae2e7072579198414e631984a61c485e (diff) | |
download | op-kernel-dev-8f46fccd6cd0d7ba70ba1636e59e98ca17dd2239.zip op-kernel-dev-8f46fccd6cd0d7ba70ba1636e59e98ca17dd2239.tar.gz |
ath6kl: Maintain the listen interval per VIF specific
Firmware has the option to support the listen interval
per vif specific. Fix this.
Listen interval can be set by the TUs or by the number
of beacons. Current code enables the user to configure
the listen interval in the unit of 'number of beacons'
using debugfs entry "listen_interval". Going forward,
we need to alter the listen interval in the unit of TUs
to get good power numbers while going to WOW suspend/resume.
Allowing the user to change the listen interval in
the unit of "number of beacons" in debugfs and changing
listen interval in wow suspend/resume in the unit of
time (TUs) would lead us to confuse.
This patch make sures the listen interval is changed only
in the unit of time (TUs).
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')
-rwxr-xr-x | drivers/net/wireless/ath/ath6kl/debug.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/debug.c b/drivers/net/wireless/ath/ath6kl/debug.c index 645f923..56e1cb1 100755 --- a/drivers/net/wireless/ath/ath6kl/debug.c +++ b/drivers/net/wireless/ath/ath6kl/debug.c @@ -1631,12 +1631,12 @@ static ssize_t ath6kl_listen_int_write(struct file *file, if (kstrtou16(buf, 0, &listen_interval)) return -EINVAL; - if ((listen_interval < 1) || (listen_interval > 50)) + if ((listen_interval < 15) || (listen_interval > 3000)) return -EINVAL; - ar->listen_intvl_b = listen_interval; - ath6kl_wmi_listeninterval_cmd(ar->wmi, vif->fw_vif_idx, 0, - ar->listen_intvl_b); + vif->listen_intvl_t = listen_interval; + ath6kl_wmi_listeninterval_cmd(ar->wmi, vif->fw_vif_idx, + vif->listen_intvl_t, 0); return count; } @@ -1646,10 +1646,15 @@ static ssize_t ath6kl_listen_int_read(struct file *file, size_t count, loff_t *ppos) { struct ath6kl *ar = file->private_data; + struct ath6kl_vif *vif; char buf[32]; int len; - len = scnprintf(buf, sizeof(buf), "%u\n", ar->listen_intvl_b); + vif = ath6kl_vif_first(ar); + if (!vif) + return -EIO; + + len = scnprintf(buf, sizeof(buf), "%u\n", vif->listen_intvl_t); return simple_read_from_buffer(user_buf, count, ppos, buf, len); } |