diff mbox

wlcore: ignore dummy packet events in PLT mode

Message ID 1397112633-24486-1-git-send-email-luca@coelho.fi (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Luca Coelho April 10, 2014, 6:50 a.m. UTC
From: Luciano Coelho <luca@coelho.fi>

Sometimes the firmware sends a dummy packet event while we are in PLT
mode.  This doesn't make sense, it's a firmware bug.  Fix this by
ignoring dummy packet events when we're PLT mode.

Reported-by: Yegor Yefremov <yegorslists@googlemail.com>
Reported-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <luca@coelho.fi>
---
 drivers/net/wireless/ti/wlcore/event.c | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Luca Coelho April 10, 2014, 7 a.m. UTC | #1
On Thu, 2014-04-10 at 09:50 +0300, Luca Coelho wrote:
> From: Luciano Coelho <luca@coelho.fi>
> 
> Sometimes the firmware sends a dummy packet event while we are in PLT
> mode.  This doesn't make sense, it's a firmware bug.  Fix this by
> ignoring dummy packet events when we're PLT mode.
> 
> Reported-by: Yegor Yefremov <yegorslists@googlemail.com>
> Reported-by: Arik Nemtsov <arik@wizery.com>
> Signed-off-by: Luciano Coelho <luca@coelho.fi>
> ---
>  drivers/net/wireless/ti/wlcore/event.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/net/wireless/ti/wlcore/event.c b/drivers/net/wireless/ti/wlcore/event.c
> index 1f9a360..8d5174c 100644
> --- a/drivers/net/wireless/ti/wlcore/event.c
> +++ b/drivers/net/wireless/ti/wlcore/event.c
> @@ -158,6 +158,11 @@ EXPORT_SYMBOL_GPL(wlcore_event_channel_switch);
>  
>  void wlcore_event_dummy_packet(struct wl1271 *wl)
>  {
> +	if (wl->plt) {
> +		wl1271_info(DEBUG_EVENT, "Got DUMMY_PACKET event in PLT mode.  FW bug, ignoring.");

Gack! I changed wl1271_debug to wl1271_info and forgot to compile.  This
doesn't compile.  v2 coming in a sec.

--
Luca.

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/wireless/ti/wlcore/event.c b/drivers/net/wireless/ti/wlcore/event.c
index 1f9a360..8d5174c 100644
--- a/drivers/net/wireless/ti/wlcore/event.c
+++ b/drivers/net/wireless/ti/wlcore/event.c
@@ -158,6 +158,11 @@  EXPORT_SYMBOL_GPL(wlcore_event_channel_switch);
 
 void wlcore_event_dummy_packet(struct wl1271 *wl)
 {
+	if (wl->plt) {
+		wl1271_info(DEBUG_EVENT, "Got DUMMY_PACKET event in PLT mode.  FW bug, ignoring.");
+		return;
+	}
+
 	wl1271_debug(DEBUG_EVENT, "DUMMY_PACKET_ID_EVENT_ID");
 	wl1271_tx_dummy_packet(wl);
 }