Skip to contentSkip to conversation

mwifiex: fix self-assignment in mwifiex_uap_recv_packet

PATCH Dave Jones 2 participants 2 messages May 31, 2016 Marvell mwifiex wireless driver

lore
Share & tools
lore

Dave Jones

author
#0 lore raw

This function wants to operate on the adapter pointer in the priv struct, not on itself which makes no sense.

drivers/net/wireless/marvell/mwifiex/uap_txrx.c +1 -1
index 666e91af59d7..bf5660eb27d3 100644
@@ -272,7 +272,7 @@ int mwifiex_handle_uap_rx_forward(struct mwifiex_private *priv,
 int mwifiex_uap_recv_packet(struct mwifiex_private *priv,
 			    struct sk_buff *skb)
 {
-	struct mwifiex_adapter *adapter = adapter;
+	struct mwifiex_adapter *adapter = priv->adapter;
 	struct mwifiex_sta_node *src_node;
 	struct ethhdr *p_ethhdr;
 	struct sk_buff *skb_uap;
#1 lore raw

Hi Dave,

Quoted 19 lines

From: Dave Jones [mailto:[email protected]]
Sent: Tuesday, May 31, 2016 8:47 PM
To: Linux Kernel
Cc: Xinming Hu; Cathy Luo; Amitkumar Karwar; Kalle Valo
Subject: mwifiex: fix self-assignment in mwifiex_uap_recv_packet

This function wants to operate on the adapter pointer in the priv struct, not on itself which makes no sense.

drivers/net/wireless/marvell/mwifiex/uap_txrx.c +0 -0
index 666e91af59d7..bf5660eb27d3 100644
@@ -272,7 +272,7 @@ int mwifiex_handle_uap_rx_forward(struct

mwifiex_private *priv, int mwifiex_uap_recv_packet(struct mwifiex_private *priv,

drivers/net/wireless/marvell/mwifiex/uap_txrx.c int mwifiex_handle_uap_rx_forward(struct mwifiex_private *priv, · line 278

Quoted 7 lines
drivers/net/wireless/marvell/mwifiex/uap_txrx.c +1 -1
 			    struct sk_buff *skb)
 {
-	struct mwifiex_adapter *adapter = adapter;
+	struct mwifiex_adapter *adapter = priv->adapter;
 	struct mwifiex_sta_node *src_node;
 	struct ethhdr *p_ethhdr;
 	struct sk_buff *skb_uap;

Thanks for the patch. This has been already taken cared by below patch submitted recently.
https://patchwork.kernel.org/patch/9115501/

Regards,
Amitkumar