]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Android: Pass the vendor events to $(BOARD_WPA_SUPPLICANT_PRIVATE_LIB)
authorSunil Dutt <usdutt@codeaurora.org>
Fri, 11 Dec 2020 14:33:48 +0000 (06:33 -0800)
committerJouni Malinen <j@w1.fi>
Mon, 21 Dec 2020 21:22:56 +0000 (23:22 +0200)
Android has a mechanism to extend the driver interface in vendor
specific ways. This implementation of the vendor interface is done in
$(BOARD_WPA_SUPPLICANT_PRIVATE_LIB). Extend this to allow the vendor
events to be provided to this library to facilitate the event
processing.

Introduce a new board configuration via
$(BOARD_WPA_SUPPLICANT_PRIVATE_LIB_EVENT) rather than reusing
$(BOARD_WPA_SUPPLICANT_PRIVATE_LIB) to enable this event handling in the
private library. This is to avoid compilation issues for
wpa_driver_nl80211_driver_event() with the already existing private
library implementations defined with
$(BOARD_WPA_SUPPLICANT_PRIVATE_LIB).

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
src/drivers/driver_nl80211.h
src/drivers/driver_nl80211_event.c
wpa_supplicant/Android.mk

index 08e82dfa970a3a25f4201f320472b1b4b34d8bce..2926c815ec4021ccd716cc3a245db7214844f23d 100644 (file)
@@ -295,6 +295,10 @@ int android_pno_start(struct i802_bss *bss,
 int android_pno_stop(struct i802_bss *bss);
 extern int wpa_driver_nl80211_driver_cmd(void *priv, char *cmd, char *buf,
                                         size_t buf_len);
+extern int wpa_driver_nl80211_driver_event(struct wpa_driver_nl80211_data *drv,
+                                          u32 vendor_id, u32 subcmd,
+                                          u8 *data, size_t len);
+
 
 #ifdef ANDROID_P2P
 int wpa_driver_set_p2p_noa(void *priv, u8 count, int start, int duration);
index 982bd56734d9d33a5c1d5e8c13da5c0ed570361d..a63059bda26eaca7e40b8166dad1a9b0f76a927f 100644 (file)
@@ -2415,6 +2415,12 @@ static void nl80211_vendor_event(struct wpa_driver_nl80211_data *drv,
                return;
        }
 
+#ifdef ANDROID
+#ifdef ANDROID_LIB_EVENT
+       wpa_driver_nl80211_driver_event(drv, vendor_id, subcmd, data, len);
+#endif /* ANDROID_LIB_EVENT */
+#endif /* ANDROID */
+
        switch (vendor_id) {
        case OUI_QCA:
                nl80211_vendor_event_qca(drv, subcmd, data, len);
index ed7e358ac9900d2fef5800e7b13e08d5dc49e40e..725889d78493f4909b2531bf071f8029f86f1c71 100644 (file)
@@ -32,6 +32,10 @@ ifeq ($(BOARD_WPA_SUPPLICANT_PRIVATE_LIB),)
 L_CFLAGS += -DANDROID_LIB_STUB
 endif
 
+ifneq ($(BOARD_WPA_SUPPLICANT_PRIVATE_LIB_EVENT),)
+L_CFLAGS += -DANDROID_LIB_EVENT
+endif
+
 # Disable roaming in wpa_supplicant
 ifdef CONFIG_NO_ROAMING
 L_CFLAGS += -DCONFIG_NO_ROAMING