Android: Pass the vendor events to $(BOARD_WPA_SUPPLICANT_PRIVATE_LIB)

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>
This commit is contained in:
Sunil Dutt 2020-12-11 06:33:48 -08:00 committed by Jouni Malinen
parent 7b121af26a
commit b6947f01a1
3 changed files with 14 additions and 0 deletions

View 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);

View 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);

View 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