* [PATCH] ath6kl: Fix target minimum length requirement for WMI_SEND_PROBE_RESPONSE_CMDID
@ 2011-11-09 18:05 Aarthi Thiruvengadam
2011-11-13 10:33 ` Kalle Valo
0 siblings, 1 reply; 2+ messages in thread
From: Aarthi Thiruvengadam @ 2011-11-09 18:05 UTC (permalink / raw)
To: kvalo; +Cc: linux-wireless, Aarthi Thiruvengadam, Aarthi Thiruvengadam
The firmware expects the minimum length of
WMI_SEND_PROBE_RESPONSE_CMDID to be 13. However, when the device is a
P2P GO and it needs to send a probe response to a non-P2P client,
there are no P2P IEs to be added, and therefore the length of the WMI
command is 12. This command gets rejected by the firmware. To fix
this, add an extra byte to satisfy the minimum length requirement.
Signed-off-by: Aarthi Thiruvengadam <athiruve@qca.qualcomm.com>
---
drivers/net/wireless/ath/ath6kl/wmi.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.c b/drivers/net/wireless/ath/ath6kl/wmi.c
index 922344d..4b7856d 100644
--- a/drivers/net/wireless/ath/ath6kl/wmi.c
+++ b/drivers/net/wireless/ath/ath6kl/wmi.c
@@ -3024,8 +3024,12 @@ int ath6kl_wmi_send_probe_response_cmd(struct wmi *wmi, u8 if_idx, u32 freq,
{
struct sk_buff *skb;
struct wmi_p2p_probe_response_cmd *p;
+ size_t cmd_len = sizeof(*p) + data_len;
- skb = ath6kl_wmi_get_new_buf(sizeof(*p) + data_len);
+ if (data_len == 0)
+ cmd_len++; /* work around target minimum length requirement */
+
+ skb = ath6kl_wmi_get_new_buf(cmd_len);
if (!skb)
return -ENOMEM;
--
1.7.0.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ath6kl: Fix target minimum length requirement for WMI_SEND_PROBE_RESPONSE_CMDID
2011-11-09 18:05 [PATCH] ath6kl: Fix target minimum length requirement for WMI_SEND_PROBE_RESPONSE_CMDID Aarthi Thiruvengadam
@ 2011-11-13 10:33 ` Kalle Valo
0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2011-11-13 10:33 UTC (permalink / raw)
To: Aarthi Thiruvengadam; +Cc: linux-wireless
On 11/09/2011 08:05 PM, Aarthi Thiruvengadam wrote:
> The firmware expects the minimum length of
> WMI_SEND_PROBE_RESPONSE_CMDID to be 13. However, when the device is a
> P2P GO and it needs to send a probe response to a non-P2P client,
> there are no P2P IEs to be added, and therefore the length of the WMI
> command is 12. This command gets rejected by the firmware. To fix
> this, add an extra byte to satisfy the minimum length requirement.
>
> Signed-off-by: Aarthi Thiruvengadam <athiruve@qca.qualcomm.com>
Thanks, applied.
Kalle
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-11-13 10:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-09 18:05 [PATCH] ath6kl: Fix target minimum length requirement for WMI_SEND_PROBE_RESPONSE_CMDID Aarthi Thiruvengadam
2011-11-13 10:33 ` 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).