events: Custom event for broadcom proprietary driver
authorarron.wang <arron.wang@intel.com>
Fri, 8 Jun 2012 00:23:38 +0000 (08:23 +0800)
committerarron.wang <arron.wang@intel.com>
Fri, 8 Jun 2012 00:23:38 +0000 (08:23 +0800)
src/drivers/driver.h
src/drivers/driver_wext.c
wpa_supplicant/events.c

index c7b7363..bf18c34 100644 (file)
@@ -2887,7 +2887,15 @@ enum wpa_event_type {
         * This event indicates that the station responded to the poll
         * initiated with @poll_client.
         */
-       EVENT_DRIVER_CLIENT_POLL_OK
+       EVENT_DRIVER_CLIENT_POLL_OK,
+
+       /**
+        * EVENT_BROADCOM_CUSTOM - Broadcom custom event
+        *
+        * This event is sent when failing to associate while running the
+        * initial scan.
+        */
+       EVENT_BROADCOM_CUSTOM
 };
 
 
index b980c15..c837d88 100644 (file)
@@ -302,6 +302,9 @@ wpa_driver_wext_event_wireless_custom(void *ctx, char *custom)
                }
                wpa_supplicant_event(ctx, EVENT_STKSTART, &data);
 #endif /* CONFIG_PEERKEY */
+       } else if (os_strncmp(custom, "Conn NoNetworks", 15) == 0) {
+               wpa_printf(MSG_DEBUG, "WEXT: Broadcom custom event");
+               wpa_supplicant_event(ctx, EVENT_BROADCOM_CUSTOM, &data);
        }
 }
 
index 1c3b9eb..570f51e 100644 (file)
@@ -2490,6 +2490,15 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
                wpas_wps_start_pbc(wpa_s, NULL, 0);
 #endif /* CONFIG_WPS */
                break;
+       case EVENT_BROADCOM_CUSTOM:
+               wpa_printf(MSG_DEBUG, "Broadcom event in state %d",
+                       wpa_s->wpa_state);
+               if (wpa_s->wpa_state == WPA_SCANNING) {
+                       /* Force scanning */
+                       wpa_s->scan_req = 1;
+                       wpa_supplicant_req_scan(wpa_s, 0, 0);
+               }
+               break;
        default:
                wpa_msg(wpa_s, MSG_INFO, "Unknown event %d", event);
                break;