linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ath6kl: support changing dtim period on AP mode
@ 2012-05-30  7:43 Kalle Valo
  2012-05-30  7:44 ` Kalle Valo
  2012-05-30  8:14 ` Joe Perches
  0 siblings, 2 replies; 7+ messages in thread
From: Kalle Valo @ 2012-05-30  7:43 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless, ath6kl-devel, Etay Luz

From: Etay Luz <eluz@qca.qualcomm.com>

This patch adds support for dtim_period configuration in beacon.

kvalo: add a comment about ignoring the error

Signed-off-by: Etay Luz <eluz@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath6kl/cfg80211.c |    7 ++++++-
 drivers/net/wireless/ath/ath6kl/wmi.c      |   16 ++++++++++++++++
 drivers/net/wireless/ath/ath6kl/wmi.h      |    5 +++++
 3 files changed, 27 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c
index 6f20998..4f48c1a 100644
--- a/drivers/net/wireless/ath/ath6kl/cfg80211.c
+++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
@@ -2783,9 +2783,14 @@ static int ath6kl_start_ap(struct wiphy *wiphy, struct net_device *dev,
 
 	/* TODO:
 	 * info->interval
-	 * info->dtim_period
 	 */
 
+	ret = ath6kl_wmi_ap_set_dtim_cmd(ar->wmi, info->dtim_period);
+
+	/* ignore error, just print a warning and continue normally */
+	if (ret)
+		ath6kl_warn("Failed to set dtim_period in beacon: %d", ret);
+
 	if (info->beacon.head == NULL)
 		return -EINVAL;
 	mgmt = (struct ieee80211_mgmt *) info->beacon.head;
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.c b/drivers/net/wireless/ath/ath6kl/wmi.c
index 43bce9c..e156443 100644
--- a/drivers/net/wireless/ath/ath6kl/wmi.c
+++ b/drivers/net/wireless/ath/ath6kl/wmi.c
@@ -752,6 +752,22 @@ int ath6kl_wmi_force_roam_cmd(struct wmi *wmi, const u8 *bssid)
 				   NO_SYNC_WMIFLAG);
 }
 
+int ath6kl_wmi_ap_set_dtim_cmd(struct wmi *wmi, u32 dtim_period)
+{
+	struct sk_buff *skb;
+	struct set_dtim_cmd *cmd;
+
+	skb = ath6kl_wmi_get_new_buf(sizeof(*cmd));
+	if (!skb)
+		return -ENOMEM;
+
+	cmd = (struct set_dtim_cmd *) skb->data;
+
+	cmd->dtim_period = cpu_to_le32(dtim_period);
+	return ath6kl_wmi_cmd_send(wmi, 0, skb, WMI_AP_SET_DTIM_CMDID,
+				   NO_SYNC_WMIFLAG);
+}
+
 int ath6kl_wmi_set_roam_mode_cmd(struct wmi *wmi, enum wmi_roam_mode mode)
 {
 	struct sk_buff *skb;
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.h b/drivers/net/wireless/ath/ath6kl/wmi.h
index 7c94fe3..a63b549 100644
--- a/drivers/net/wireless/ath/ath6kl/wmi.h
+++ b/drivers/net/wireless/ath/ath6kl/wmi.h
@@ -1617,6 +1617,10 @@ struct roam_ctrl_cmd {
 	u8 roam_ctrl;
 } __packed;
 
+struct set_dtim_cmd {
+	__le32 dtim_period;
+} __packed;
+
 /* BSS INFO HDR version 2.0 */
 struct wmi_bss_info_hdr2 {
 	__le16 ch; /* frequency in MHz */
@@ -2589,6 +2593,7 @@ int ath6kl_wmi_add_wow_pattern_cmd(struct wmi *wmi, u8 if_idx,
 int ath6kl_wmi_del_wow_pattern_cmd(struct wmi *wmi, u8 if_idx,
 				   u16 list_id, u16 filter_id);
 int ath6kl_wmi_set_roam_lrssi_cmd(struct wmi *wmi, u8 lrssi);
+int ath6kl_wmi_ap_set_dtim_cmd(struct wmi *wmi, u32 dtim_period);
 int ath6kl_wmi_force_roam_cmd(struct wmi *wmi, const u8 *bssid);
 int ath6kl_wmi_set_roam_mode_cmd(struct wmi *wmi, enum wmi_roam_mode mode);
 int ath6kl_wmi_mcast_filter_cmd(struct wmi *wmi, u8 if_idx, bool mc_all_on);
-- 
1.7.1


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

* Re: [PATCH] ath6kl: support changing dtim period on AP mode
  2012-05-30  7:43 [PATCH] ath6kl: support changing dtim period on AP mode Kalle Valo
@ 2012-05-30  7:44 ` Kalle Valo
  2012-05-30  8:26   ` Kalle Valo
  2012-05-30  8:14 ` Joe Perches
  1 sibling, 1 reply; 7+ messages in thread
From: Kalle Valo @ 2012-05-30  7:44 UTC (permalink / raw)
  To: Etay Luz; +Cc: linux-wireless, ath6kl-devel

On 05/30/2012 10:43 AM, Kalle Valo wrote:
> From: Etay Luz <eluz@qca.qualcomm.com>
> 
> This patch adds support for dtim_period configuration in beacon.
> 
> kvalo: add a comment about ignoring the error
> 
> Signed-off-by: Etay Luz <eluz@qca.qualcomm.com>
> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>

Applied, thanks.

Kalle

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

* Re: [PATCH] ath6kl: support changing dtim period on AP mode
  2012-05-30  7:43 [PATCH] ath6kl: support changing dtim period on AP mode Kalle Valo
  2012-05-30  7:44 ` Kalle Valo
@ 2012-05-30  8:14 ` Joe Perches
  2012-05-30  8:15   ` Kalle Valo
  1 sibling, 1 reply; 7+ messages in thread
From: Joe Perches @ 2012-05-30  8:14 UTC (permalink / raw)
  To: Kalle Valo; +Cc: linux-wireless, ath6kl-devel, Etay Luz

On Wed, 2012-05-30 at 10:43 +0300, Kalle Valo wrote:
> +	ret = ath6kl_wmi_ap_set_dtim_cmd(ar->wmi, info->dtim_period);
> +
> +	/* ignore error, just print a warning and continue normally */
> +	if (ret)
> +		ath6kl_warn("Failed to set dtim_period in beacon: %d", ret);

missing newline termination



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

* Re: [PATCH] ath6kl: support changing dtim period on AP mode
  2012-05-30  8:14 ` Joe Perches
@ 2012-05-30  8:15   ` Kalle Valo
  2012-05-30  8:58     ` [PATCH] ath6kl: Add missing newline terminations Joe Perches
  0 siblings, 1 reply; 7+ messages in thread
From: Kalle Valo @ 2012-05-30  8:15 UTC (permalink / raw)
  To: Joe Perches; +Cc: linux-wireless, ath6kl-devel, Etay Luz

On 05/30/2012 11:14 AM, Joe Perches wrote:
> On Wed, 2012-05-30 at 10:43 +0300, Kalle Valo wrote:
>> +	ret = ath6kl_wmi_ap_set_dtim_cmd(ar->wmi, info->dtim_period);
>> +
>> +	/* ignore error, just print a warning and continue normally */
>> +	if (ret)
>> +		ath6kl_warn("Failed to set dtim_period in beacon: %d", ret);
> 
> missing newline termination

Oh yeah, I missed that. Thanks.

I haven't pushed the patch so I'll just amend the fix.

Kalle

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

* Re: [PATCH] ath6kl: support changing dtim period on AP mode
  2012-05-30  7:44 ` Kalle Valo
@ 2012-05-30  8:26   ` Kalle Valo
  0 siblings, 0 replies; 7+ messages in thread
From: Kalle Valo @ 2012-05-30  8:26 UTC (permalink / raw)
  To: Etay Luz; +Cc: linux-wireless, ath6kl-devel

On 05/30/2012 10:44 AM, Kalle Valo wrote:
> On 05/30/2012 10:43 AM, Kalle Valo wrote:
>> From: Etay Luz <eluz@qca.qualcomm.com>
>>
>> This patch adds support for dtim_period configuration in beacon.
>>
>> kvalo: add a comment about ignoring the error
>>
>> Signed-off-by: Etay Luz <eluz@qca.qualcomm.com>
>> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
> 
> Applied, thanks.

Actually, I withdraw that. Joe found an issue and Vasanth privately
reported me about vif index problem.

I'll send v2 instead.

Kalle

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

* [PATCH] ath6kl: Add missing newline terminations
  2012-05-30  8:15   ` Kalle Valo
@ 2012-05-30  8:58     ` Joe Perches
  2012-06-11 13:07       ` Kalle Valo
  0 siblings, 1 reply; 7+ messages in thread
From: Joe Perches @ 2012-05-30  8:58 UTC (permalink / raw)
  To: Kalle Valo; +Cc: linux-wireless, ath6kl-devel, Etay Luz

Messages without newlines can be interleaved.
Avoid this by adding terminations.

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/net/wireless/ath/ath6kl/cfg80211.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c
index b869a35..d1a5436 100644
--- a/drivers/net/wireless/ath/ath6kl/cfg80211.c
+++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
@@ -943,7 +943,7 @@ static int ath6kl_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev,
 				       WMI_FRAME_PROBE_REQ,
 				       request->ie, request->ie_len);
 	if (ret) {
-		ath6kl_err("failed to set Probe Request appie for scan");
+		ath6kl_err("failed to set Probe Request appie for scan\n");
 		return ret;
 	}
 
@@ -3185,7 +3185,7 @@ static int ath6kl_cfg80211_sscan_start(struct wiphy *wiphy,
 				       WMI_FRAME_PROBE_REQ,
 				       request->ie, request->ie_len);
 	if (ret) {
-		ath6kl_warn("Failed to set probe request IE for scheduled scan: %d",
+		ath6kl_warn("Failed to set probe request IE for scheduled scan: %d\n",
 			    ret);
 		return ret;
 	}



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

* Re: [PATCH] ath6kl: Add missing newline terminations
  2012-05-30  8:58     ` [PATCH] ath6kl: Add missing newline terminations Joe Perches
@ 2012-06-11 13:07       ` Kalle Valo
  0 siblings, 0 replies; 7+ messages in thread
From: Kalle Valo @ 2012-06-11 13:07 UTC (permalink / raw)
  To: Joe Perches; +Cc: linux-wireless, ath6kl-devel, Etay Luz

On 05/30/2012 11:58 AM, Joe Perches wrote:
> Messages without newlines can be interleaved.
> Avoid this by adding terminations.
> 
> Signed-off-by: Joe Perches <joe@perches.com>

Thanks, applied.

Kalle

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

end of thread, other threads:[~2012-06-11 13:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-30  7:43 [PATCH] ath6kl: support changing dtim period on AP mode Kalle Valo
2012-05-30  7:44 ` Kalle Valo
2012-05-30  8:26   ` Kalle Valo
2012-05-30  8:14 ` Joe Perches
2012-05-30  8:15   ` Kalle Valo
2012-05-30  8:58     ` [PATCH] ath6kl: Add missing newline terminations Joe Perches
2012-06-11 13:07       ` Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).