* [PATCH 1/4] mwifiex: correction in wakeup timer handling
@ 2015-01-30 8:40 Amitkumar Karwar
2015-01-30 8:40 ` [PATCH 2/4] mwifiex: fix memory leak in mwifiex_send_processed_packet() Amitkumar Karwar
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Amitkumar Karwar @ 2015-01-30 8:40 UTC (permalink / raw)
To: linux-wireless; +Cc: Cathy Luo, Avinash Patil, Amitkumar Karwar
Wakeup timer is in sync with 'pm_wakeup_fw_try' flag. It
has been started instead of cancelling at one place. This
patch corrects it.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
---
drivers/net/wireless/mwifiex/sta_event.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/wireless/mwifiex/sta_event.c b/drivers/net/wireless/mwifiex/sta_event.c
index c03b82c..80ffe741 100644
--- a/drivers/net/wireless/mwifiex/sta_event.c
+++ b/drivers/net/wireless/mwifiex/sta_event.c
@@ -312,8 +312,7 @@ int mwifiex_process_sta_event(struct mwifiex_private *priv)
adapter->ps_state = PS_STATE_AWAKE;
adapter->pm_wakeup_card_req = false;
adapter->pm_wakeup_fw_try = false;
- mod_timer(&adapter->wakeup_timer,
- jiffies + (HZ*3));
+ del_timer_sync(&adapter->wakeup_timer);
break;
}
if (!mwifiex_send_null_packet
--
1.8.1.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/4] mwifiex: fix memory leak in mwifiex_send_processed_packet()
2015-01-30 8:40 [PATCH 1/4] mwifiex: correction in wakeup timer handling Amitkumar Karwar
@ 2015-01-30 8:40 ` Amitkumar Karwar
2015-01-30 8:40 ` [PATCH 3/4] mwifiex: fix NULL packet downloading issues Amitkumar Karwar
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Amitkumar Karwar @ 2015-01-30 8:40 UTC (permalink / raw)
To: linux-wireless; +Cc: Cathy Luo, Avinash Patil, Amitkumar Karwar
Memory is leaked after downloading already processed packet. This
patch fixes the problem by freeing returned skb. Other transmit
paths don't have this problem.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
---
drivers/net/wireless/mwifiex/wmm.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/wireless/mwifiex/wmm.c b/drivers/net/wireless/mwifiex/wmm.c
index ffffd2c..ef717ac 100644
--- a/drivers/net/wireless/mwifiex/wmm.c
+++ b/drivers/net/wireless/mwifiex/wmm.c
@@ -1228,6 +1228,9 @@ mwifiex_send_processed_packet(struct mwifiex_private *priv,
case -EINPROGRESS:
if (adapter->iface_type != MWIFIEX_PCIE)
adapter->data_sent = false;
+ break;
+ case 0:
+ mwifiex_write_data_complete(adapter, skb, 0, ret);
default:
break;
}
--
1.8.1.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/4] mwifiex: fix NULL packet downloading issues
2015-01-30 8:40 [PATCH 1/4] mwifiex: correction in wakeup timer handling Amitkumar Karwar
2015-01-30 8:40 ` [PATCH 2/4] mwifiex: fix memory leak in mwifiex_send_processed_packet() Amitkumar Karwar
@ 2015-01-30 8:40 ` Amitkumar Karwar
2015-01-30 8:40 ` [PATCH 4/4] mwifiex: disable UAPSD mode when AP starts Amitkumar Karwar
2015-02-03 13:29 ` [1/4] mwifiex: correction in wakeup timer handling Kalle Valo
3 siblings, 0 replies; 5+ messages in thread
From: Amitkumar Karwar @ 2015-01-30 8:40 UTC (permalink / raw)
To: linux-wireless; +Cc: Cathy Luo, Avinash Patil, Amitkumar Karwar
This patch makes sure that skb is freed after downloading
NULL packet in error cases. Also, USB chipsets return
-EINPROGRESS after downloading packets, they are freed in
USB completion handler later. We will add missing change
to set tx_lock_flag for USB which blocks further packets.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
---
drivers/net/wireless/mwifiex/sta_tx.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/mwifiex/sta_tx.c b/drivers/net/wireless/mwifiex/sta_tx.c
index 1debe76..5ce2d9a 100644
--- a/drivers/net/wireless/mwifiex/sta_tx.c
+++ b/drivers/net/wireless/mwifiex/sta_tx.c
@@ -183,9 +183,13 @@ int mwifiex_send_null_packet(struct mwifiex_private *priv, u8 flags)
}
switch (ret) {
case -EBUSY:
- adapter->data_sent = true;
- /* Fall through FAILURE handling */
+ dev_kfree_skb_any(skb);
+ dev_err(adapter->dev, "%s: host_to_card failed: ret=%d\n",
+ __func__, ret);
+ adapter->dbg.num_tx_host_to_card_failure++;
+ break;
case -1:
+ adapter->data_sent = false;
dev_kfree_skb_any(skb);
dev_err(adapter->dev, "%s: host_to_card failed: ret=%d\n",
__func__, ret);
@@ -198,6 +202,7 @@ int mwifiex_send_null_packet(struct mwifiex_private *priv, u8 flags)
adapter->tx_lock_flag = true;
break;
case -EINPROGRESS:
+ adapter->tx_lock_flag = true;
break;
default:
break;
--
1.8.1.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 4/4] mwifiex: disable UAPSD mode when AP starts
2015-01-30 8:40 [PATCH 1/4] mwifiex: correction in wakeup timer handling Amitkumar Karwar
2015-01-30 8:40 ` [PATCH 2/4] mwifiex: fix memory leak in mwifiex_send_processed_packet() Amitkumar Karwar
2015-01-30 8:40 ` [PATCH 3/4] mwifiex: fix NULL packet downloading issues Amitkumar Karwar
@ 2015-01-30 8:40 ` Amitkumar Karwar
2015-02-03 13:29 ` [1/4] mwifiex: correction in wakeup timer handling Kalle Valo
3 siblings, 0 replies; 5+ messages in thread
From: Amitkumar Karwar @ 2015-01-30 8:40 UTC (permalink / raw)
To: linux-wireless; +Cc: Cathy Luo, Avinash Patil, Amitkumar Karwar
When AP is started, firmware exits power save mode. This
means power save manager of AP takes priority over station.
Firmware stop sending periodic AWAKE events to host.
We may have UAPSD enabled on station which buffers data
packets until AWAKE event from firmware. Data path is
unnecessarily blocked in this case. This patch disables
UAPSD mode to reenable transmit data path.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
---
drivers/net/wireless/mwifiex/sta_cmdresp.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/wireless/mwifiex/sta_cmdresp.c b/drivers/net/wireless/mwifiex/sta_cmdresp.c
index 39f3176..5f8da59 100644
--- a/drivers/net/wireless/mwifiex/sta_cmdresp.c
+++ b/drivers/net/wireless/mwifiex/sta_cmdresp.c
@@ -1105,6 +1105,9 @@ int mwifiex_process_sta_cmdresp(struct mwifiex_private *priv, u16 cmdresp_no,
case HostCmd_CMD_UAP_SYS_CONFIG:
break;
case HostCmd_CMD_UAP_BSS_START:
+ adapter->tx_lock_flag = false;
+ adapter->pps_uapsd_mode = false;
+ adapter->delay_null_pkt = false;
priv->bss_started = 1;
break;
case HostCmd_CMD_UAP_BSS_STOP:
--
1.8.1.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [1/4] mwifiex: correction in wakeup timer handling
2015-01-30 8:40 [PATCH 1/4] mwifiex: correction in wakeup timer handling Amitkumar Karwar
` (2 preceding siblings ...)
2015-01-30 8:40 ` [PATCH 4/4] mwifiex: disable UAPSD mode when AP starts Amitkumar Karwar
@ 2015-02-03 13:29 ` Kalle Valo
3 siblings, 0 replies; 5+ messages in thread
From: Kalle Valo @ 2015-02-03 13:29 UTC (permalink / raw)
To: Amitkumar Karwar
Cc: linux-wireless, Cathy Luo, Avinash Patil, Amitkumar Karwar
> Wakeup timer is in sync with 'pm_wakeup_fw_try' flag. It
> has been started instead of cancelling at one place. This
> patch corrects it.
>
> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
> Signed-off-by: Cathy Luo <cluo@marvell.com>
Thanks, 4 patches applied to wireless-drivers-next.git:
ee6f0dd8a836 mwifiex: correction in wakeup timer handling
7a1f4e61eb64 mwifiex: fix memory leak in mwifiex_send_processed_packet()
0ea3186ce03c mwifiex: fix NULL packet downloading issues
fc8f0456dcce mwifiex: disable UAPSD mode when AP starts
Kalle Valo
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-02-03 13:29 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-30 8:40 [PATCH 1/4] mwifiex: correction in wakeup timer handling Amitkumar Karwar
2015-01-30 8:40 ` [PATCH 2/4] mwifiex: fix memory leak in mwifiex_send_processed_packet() Amitkumar Karwar
2015-01-30 8:40 ` [PATCH 3/4] mwifiex: fix NULL packet downloading issues Amitkumar Karwar
2015-01-30 8:40 ` [PATCH 4/4] mwifiex: disable UAPSD mode when AP starts Amitkumar Karwar
2015-02-03 13:29 ` [1/4] mwifiex: correction in wakeup timer handling 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).