]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] libertas: ignore spurious mesh autostart events
authorDan Williams <dcbw@redhat.com>
Thu, 2 Aug 2007 17:20:12 +0000 (13:20 -0400)
committerDavid S. Miller <davem@sunset.davemloft.net>
Wed, 10 Oct 2007 23:50:16 +0000 (16:50 -0700)
Don't trust the firmware to always send them at the right time,
ignore them when the driver thinks mesh autostart is disabled.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/libertas/cmdresp.c

index 93bf63bad0f69a94ea8aa16f605475e2d143706c..c43b2725e5bca1bacdcf2505dae5eed25ee946eb 100644 (file)
@@ -968,6 +968,11 @@ int libertas_process_event(wlan_private * priv)
                break;
 
        case MACREG_INT_CODE_MESH_AUTO_STARTED:
+               /* Ignore spurious autostart events if autostart is disabled */
+               if (!priv->mesh_autostart_enabled) {
+                       lbs_pr_info("EVENT: MESH_AUTO_STARTED (ignoring)\n");
+                       break;
+               }
                lbs_pr_info("EVENT: MESH_AUTO_STARTED\n");
                adapter->connect_status = LIBERTAS_CONNECTED;
                if (priv->mesh_open == 1) {