All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] mwifiex: using right aid value for tdls action frame
@ 2015-07-22 11:53 Amitkumar Karwar
  2015-07-22 11:53 ` [PATCH 2/4] mwifiex: fix command timeout for PCIe chipsets Amitkumar Karwar
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Amitkumar Karwar @ 2015-07-22 11:53 UTC (permalink / raw)
  To: linux-wireless; +Cc: Cathy Luo, Xinming Hu, Amitkumar Karwar

From: Xinming Hu <huxm@marvell.com>

Variable pos is u8 here, so memcpy is needed to store u16 aid.
At the same time, aid should be platform independent, upper layer
utility(wpa_supplicant,etc.,) parse it as le16, so keep it le16
here.

Signed-off-by: Xinming Hu <huxm@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
---
 drivers/net/wireless/mwifiex/tdls.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/mwifiex/tdls.c b/drivers/net/wireless/mwifiex/tdls.c
index aa3d3c5..b3e163d 100644
--- a/drivers/net/wireless/mwifiex/tdls.c
+++ b/drivers/net/wireless/mwifiex/tdls.c
@@ -164,7 +164,7 @@ static void mwifiex_tdls_add_aid(struct mwifiex_private *priv,
 	pos = (void *)skb_put(skb, 4);
 	*pos++ = WLAN_EID_AID;
 	*pos++ = 2;
-	*pos++ = le16_to_cpu(assoc_rsp->a_id);
+	memcpy(pos, &assoc_rsp->a_id, sizeof(assoc_rsp->a_id));
 
 	return;
 }
-- 
1.8.1.4


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

end of thread, other threads:[~2015-08-06  7:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-22 11:53 [PATCH 1/4] mwifiex: using right aid value for tdls action frame Amitkumar Karwar
2015-07-22 11:53 ` [PATCH 2/4] mwifiex: fix command timeout for PCIe chipsets Amitkumar Karwar
2015-07-22 11:53 ` [PATCH 3/4] mwifiex: fix system crash observed during initialisation Amitkumar Karwar
2015-07-22 11:53 ` [PATCH 4/4] mwifiex: corrections in PCIe event skb handling Amitkumar Karwar
2015-08-06  7:17 ` [1/4] mwifiex: using right aid value for tdls action frame 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.