All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] ath6kl: Retain bg scan period value modified by the user
@ 2012-04-16 10:39 rmani
  2012-04-16 10:39 ` [PATCH 2/2] ath6kl: Fix bug in bg scan configuration in schedule scan rmani
  2012-04-18 10:05 ` [PATCH 1/2] ath6kl: Retain bg scan period value modified by the user Kalle Valo
  0 siblings, 2 replies; 4+ messages in thread
From: rmani @ 2012-04-16 10:39 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless, ath6kl-devel, Raja Mani

From: Raja Mani <rmani@qca.qualcomm.com>

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>
---
 drivers/net/wireless/ath/ath6kl/cfg80211.c |    1 +
 drivers/net/wireless/ath/ath6kl/core.h     |    1 +
 drivers/net/wireless/ath/ath6kl/debug.c    |    7 +++++++
 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 c5e90d3..2088133 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,
 	vif->next_mode = nw_type;
 	vif->listen_intvl_t = ATH6KL_DEFAULT_LISTEN_INTVAL;
 	vif->bmiss_time_t = ATH6KL_DEFAULT_BMISS_TIME;
+	vif->bg_scan_period = 0;
 	vif->htcap.ht_enable = true;
 
 	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 280f305..a97cb83 100644
--- a/drivers/net/wireless/ath/ath6kl/core.h
+++ b/drivers/net/wireless/ath/ath6kl/core.h
@@ -557,6 +557,7 @@ struct ath6kl_vif {
 	u16 assoc_bss_beacon_int;
 	u16 listen_intvl_t;
 	u16 bmiss_time_t;
+	u16 bg_scan_period;
 	u8 assoc_bss_dtim_period;
 	struct net_device_stats net_stats;
 	struct target_stats target_stats;
diff --git a/drivers/net/wireless/ath/ath6kl/debug.c b/drivers/net/wireless/ath/ath6kl/debug.c
index a62c976..fed3232 100644
--- a/drivers/net/wireless/ath/ath6kl/debug.c
+++ b/drivers/net/wireless/ath/ath6kl/debug.c
@@ -1572,10 +1572,15 @@ static ssize_t ath6kl_bgscan_int_write(struct file *file,
 				size_t count, loff_t *ppos)
 {
 	struct ath6kl *ar = file->private_data;
+	struct ath6kl_vif *vif;
 	u16 bgscan_int;
 	char buf[32];
 	ssize_t len;
 
+	vif = ath6kl_vif_first(ar);
+	if (!vif)
+		return -EIO;
+
 	len = min(count, sizeof(buf) - 1);
 	if (copy_from_user(buf, user_buf, len))
 		return -EFAULT;
@@ -1587,6 +1592,8 @@ static ssize_t ath6kl_bgscan_int_write(struct file *file,
 	if (bgscan_int == 0)
 		bgscan_int = 0xffff;
 
+	vif->bg_scan_period = bgscan_int;
+
 	ath6kl_wmi_scanparams_cmd(ar->wmi, 0, 0, 0, bgscan_int, 0, 0, 0, 3,
 				  0, 0, 0);
 
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] ath6kl: Fix bug in bg scan configuration in schedule scan
  2012-04-16 10:39 [PATCH 1/2] ath6kl: Retain bg scan period value modified by the user rmani
@ 2012-04-16 10:39 ` rmani
  2012-04-16 12:31   ` Kalle Valo
  2012-04-18 10:05 ` [PATCH 1/2] ath6kl: Retain bg scan period value modified by the user Kalle Valo
  1 sibling, 1 reply; 4+ messages in thread
From: rmani @ 2012-04-16 10:39 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless, ath6kl-devel, Subramania Sharma Thandaveswaran

From: Subramania Sharma Thandaveswaran <sharmat@qca.qualcomm.com>

Background scan interval should not be modified while starting
schedule scanning, use the currently configured one instead.

Signed-off-by: Subramania Sharma <sharmat@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath6kl/cfg80211.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c
index 2088133..a5f4fd9 100644
--- a/drivers/net/wireless/ath/ath6kl/cfg80211.c
+++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
@@ -3121,7 +3121,7 @@ static int ath6kl_cfg80211_sscan_start(struct wiphy *wiphy,
 
 	ath6kl_wmi_scanparams_cmd(ar->wmi, vif->fw_vif_idx,
 				  interval, interval,
-				  10, 0, 0, 0, 3, 0, 0, 0);
+				  vif->bg_scan_period, 0, 0, 0, 3, 0, 0, 0);
 
 	if (request->n_ssids && request->ssids[0].ssid_len) {
 		for (i = 0; i < request->n_ssids; i++) {
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] ath6kl: Fix bug in bg scan configuration in schedule scan
  2012-04-16 10:39 ` [PATCH 2/2] ath6kl: Fix bug in bg scan configuration in schedule scan rmani
@ 2012-04-16 12:31   ` Kalle Valo
  0 siblings, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2012-04-16 12:31 UTC (permalink / raw)
  To: rmani; +Cc: linux-wireless, ath6kl-devel, Subramania Sharma Thandaveswaran

On 04/16/2012 01:39 PM, rmani@qca.qualcomm.com wrote:
> From: Subramania Sharma Thandaveswaran <sharmat@qca.qualcomm.com>
> 
> Background scan interval should not be modified while starting
> schedule scanning, use the currently configured one instead.
> 
> Signed-off-by: Subramania Sharma <sharmat@qca.qualcomm.com>

This should really describe the bug more verbosely, but this time I can
add that when I commit the patch.

Kalle

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] ath6kl: Retain bg scan period value modified by the user
  2012-04-16 10:39 [PATCH 1/2] ath6kl: Retain bg scan period value modified by the user rmani
  2012-04-16 10:39 ` [PATCH 2/2] ath6kl: Fix bug in bg scan configuration in schedule scan rmani
@ 2012-04-18 10:05 ` Kalle Valo
  1 sibling, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2012-04-18 10:05 UTC (permalink / raw)
  To: rmani; +Cc: linux-wireless, ath6kl-devel

On 04/16/2012 01:39 PM, rmani@qca.qualcomm.com wrote:
> From: Raja Mani <rmani@qca.qualcomm.com>
> 
> 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>

Thanks, both patches applied. But I did minor improvements to the commit
log in patch 2.

Kalle

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-04-18 10:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-16 10:39 [PATCH 1/2] ath6kl: Retain bg scan period value modified by the user rmani
2012-04-16 10:39 ` [PATCH 2/2] ath6kl: Fix bug in bg scan configuration in schedule scan rmani
2012-04-16 12:31   ` Kalle Valo
2012-04-18 10:05 ` [PATCH 1/2] ath6kl: Retain bg scan period value modified by the user Kalle Valo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.