All the mail mirrored from 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

* [PATCH 2/4] mwifiex: fix command timeout for PCIe chipsets
  2015-07-22 11:53 [PATCH 1/4] mwifiex: using right aid value for tdls action frame Amitkumar Karwar
@ 2015-07-22 11:53 ` Amitkumar Karwar
  2015-07-22 11:53 ` [PATCH 3/4] mwifiex: fix system crash observed during initialisation Amitkumar Karwar
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Amitkumar Karwar @ 2015-07-22 11:53 UTC (permalink / raw
  To: linux-wireless; +Cc: Cathy Luo, Zhaoyang Liu, Amitkumar Karwar

From: Zhaoyang Liu <liuzy@marvell.com>

When WLAN interface is up and running, driver unload and
load was causing command timeout error.

We enable Rx data by updating RX ring read pointer in
init_fw_port(). It should be done when FW is completely
intialialised. Command timeout is fixed in this patch by
moving init_fw_port() call to mwifiex_init_fw_complete().

Signed-off-by: Zhaoyang Liu <liuzy@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
---
 drivers/net/wireless/mwifiex/init.c | 5 -----
 drivers/net/wireless/mwifiex/util.c | 4 ++++
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/mwifiex/init.c b/drivers/net/wireless/mwifiex/init.c
index 8fa363a..7a970c2 100644
--- a/drivers/net/wireless/mwifiex/init.c
+++ b/drivers/net/wireless/mwifiex/init.c
@@ -551,11 +551,6 @@ int mwifiex_init_fw(struct mwifiex_adapter *adapter)
 		}
 	}
 
-	if (adapter->if_ops.init_fw_port) {
-		if (adapter->if_ops.init_fw_port(adapter))
-			return -1;
-	}
-
 	for (i = 0; i < adapter->priv_num; i++) {
 		if (adapter->priv[i]) {
 			ret = mwifiex_sta_init_cmd(adapter->priv[i], first_sta,
diff --git a/drivers/net/wireless/mwifiex/util.c b/drivers/net/wireless/mwifiex/util.c
index 2504e42..46f12d3 100644
--- a/drivers/net/wireless/mwifiex/util.c
+++ b/drivers/net/wireless/mwifiex/util.c
@@ -126,6 +126,10 @@ static int num_of_items = ARRAY_SIZE(items);
 int mwifiex_init_fw_complete(struct mwifiex_adapter *adapter)
 {
 
+	if (adapter->hw_status == MWIFIEX_HW_STATUS_READY)
+		if (adapter->if_ops.init_fw_port)
+			adapter->if_ops.init_fw_port(adapter);
+
 	adapter->init_wait_q_woken = true;
 	wake_up_interruptible(&adapter->init_wait_q);
 	return 0;
-- 
1.8.1.4


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

* [PATCH 3/4] mwifiex: fix system crash observed during initialisation
  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 ` 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
  3 siblings, 0 replies; 5+ messages in thread
From: Amitkumar Karwar @ 2015-07-22 11:53 UTC (permalink / raw
  To: linux-wireless; +Cc: Cathy Luo, Zhaoyang Liu, Amitkumar Karwar

From: Zhaoyang Liu <liuzy@marvell.com>

System crash was observed if one of the driver initialisation
commands is timed out. The reason is our timeout handler triggers
firmware dump, meanwhile driver initialisation error paths have
already freed the adapter structure.

Firmware hasn't yet completely initialized. So collecting firmware
dump is not needed in this case. Command timeout handler is
modified in this patch to fix the crash issue.

Signed-off-by: Zhaoyang Liu <liuzy@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
---
 drivers/net/wireless/mwifiex/cmdevt.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/mwifiex/cmdevt.c b/drivers/net/wireless/mwifiex/cmdevt.c
index 207da40..dbfbbdf 100644
--- a/drivers/net/wireless/mwifiex/cmdevt.c
+++ b/drivers/net/wireless/mwifiex/cmdevt.c
@@ -993,8 +993,10 @@ mwifiex_cmd_timeout_func(unsigned long function_context)
 			mwifiex_cancel_pending_ioctl(adapter);
 		}
 	}
-	if (adapter->hw_status == MWIFIEX_HW_STATUS_INITIALIZING)
+	if (adapter->hw_status == MWIFIEX_HW_STATUS_INITIALIZING) {
 		mwifiex_init_fw_complete(adapter);
+		return;
+	}
 
 	if (adapter->if_ops.device_dump)
 		adapter->if_ops.device_dump(adapter);
-- 
1.8.1.4


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

* [PATCH 4/4] mwifiex: corrections in PCIe event skb handling
  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 ` Amitkumar Karwar
  2015-08-06  7:17 ` [1/4] mwifiex: using right aid value for tdls action frame Kalle Valo
  3 siblings, 0 replies; 5+ messages in thread
From: Amitkumar Karwar @ 2015-07-22 11:53 UTC (permalink / raw
  To: linux-wireless; +Cc: Cathy Luo, Amitkumar Karwar, Zhaoyang Liu

Preallocated event SKBs are getting reused for PCIe chipset.
Their physical addresses are shared with firmware so that
firmware can write data into them.

This patch makes sure that SKB is cleared and length is set to
default while submitting it to firmware.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Zhaoyang Liu <liuzy@marvell.com>
---
 drivers/net/wireless/mwifiex/pcie.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/wireless/mwifiex/pcie.c b/drivers/net/wireless/mwifiex/pcie.c
index 77b9055..33c75d7 100644
--- a/drivers/net/wireless/mwifiex/pcie.c
+++ b/drivers/net/wireless/mwifiex/pcie.c
@@ -1807,6 +1807,8 @@ static int mwifiex_pcie_event_complete(struct mwifiex_adapter *adapter,
 
 	if (!card->evt_buf_list[rdptr]) {
 		skb_push(skb, INTF_HEADER_LEN);
+		skb_put(skb, MAX_EVENT_SIZE - skb->len);
+		memset(skb->data, 0, MAX_EVENT_SIZE);
 		if (mwifiex_map_pci_memory(adapter, skb,
 					   MAX_EVENT_SIZE,
 					   PCI_DMA_FROMDEVICE))
-- 
1.8.1.4


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

* Re: [1/4] mwifiex: using right aid value for tdls action frame
  2015-07-22 11:53 [PATCH 1/4] mwifiex: using right aid value for tdls action frame Amitkumar Karwar
                   ` (2 preceding siblings ...)
  2015-07-22 11:53 ` [PATCH 4/4] mwifiex: corrections in PCIe event skb handling Amitkumar Karwar
@ 2015-08-06  7:17 ` Kalle Valo
  3 siblings, 0 replies; 5+ messages in thread
From: Kalle Valo @ 2015-08-06  7:17 UTC (permalink / raw
  To: Amitkumar Karwar; +Cc: linux-wireless, 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>

Thanks, 4 patches applied to wireless-drivers-next.git:

3afafd6dcc0c mwifiex: using right aid value for tdls action frame
398750992ebe mwifiex: fix command timeout for PCIe chipsets
d788ac29793a mwifiex: fix system crash observed during initialisation
2728cecdc7d6 mwifiex: corrections in PCIe event skb handling

Kalle Valo

^ permalink raw reply	[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.