Add CONFIG_DRIVER_NL80211_SYNA for synaptics wifi Signed-off-by: Andy Kuo <andy.kuo@xxxxxxxxxxxxx> --- hostapd/android.config | 11 ++++++++--- src/drivers/driver_nl80211.c | 14 ++++++++------ src/drivers/driver_nl80211_capa.c | 4 ++-- src/drivers/driver_nl80211_event.c | 8 ++++---- src/drivers/drivers.mak | 4 ++++ src/drivers/drivers.mk | 3 +++ 6 files changed, 29 insertions(+), 15 deletions(-) diff --git a/hostapd/android.config b/hostapd/android.config index c8b3afabe..2fac17dc2 100644 --- a/hostapd/android.config +++ b/hostapd/android.config @@ -25,11 +25,16 @@ #LIBS += -L$(LIBNL)/lib CONFIG_LIBNL20=y +# Broadcom vendor extensions to nl80211 +ifeq ($(BOARD_WLAN_DEVICE),bcmdhd) +CONFIG_DRIVER_NL80211_BRCM=y +# Synaptics vendor extensions to nl80211 +else ifeq ($(BOARD_WLAN_DEVICE),synadhd) +CONFIG_DRIVER_NL80211_SYNA=y +else # QCA vendor extensions to nl80211 CONFIG_DRIVER_NL80211_QCA=y - -# Broadcom vendor extensions to nl80211 -#CONFIG_DRIVER_NL80211_BRCM=y +endif # Driver interface for FreeBSD net80211 layer (e.g., Atheros driver) #CONFIG_DRIVER_BSD=y diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index 78c0658a0..7ab1b4bdf 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -11903,7 +11903,7 @@ fail: #endif /* CONFIG_DRIVER_NL80211_QCA */ -#ifdef CONFIG_DRIVER_NL80211_BRCM +#if defined(CONFIG_DRIVER_NL80211_BRCM) || defined(CONFIG_DRIVER_NL80211_SYNA) static int wpa_driver_do_broadcom_acs(struct wpa_driver_nl80211_data *drv, struct drv_acs_params *params) { @@ -11953,25 +11953,27 @@ fail: nlmsg_free(msg); return ret; } -#endif /* CONFIG_DRIVER_NL80211_BRCM */ +#endif /* CONFIG_DRIVER_NL80211_BRCM || CONFIG_DRIVER_NL80211_SYNA */ static int nl80211_do_acs(void *priv, struct drv_acs_params *params) { -#if defined(CONFIG_DRIVER_NL80211_QCA) || defined(CONFIG_DRIVER_NL80211_BRCM) +#if defined(CONFIG_DRIVER_NL80211_QCA) || defined(CONFIG_DRIVER_NL80211_BRCM) \ + || defined(CONFIG_DRIVER_NL80211_SYNA) struct i802_bss *bss = priv; struct wpa_driver_nl80211_data *drv = bss->drv; -#endif /* CONFIG_DRIVER_NL80211_QCA || CONFIG_DRIVER_NL80211_BRCM */ +#endif /* CONFIG_DRIVER_NL80211_QCA || CONFIG_DRIVER_NL80211_BRCM \ + || defined(CONFIG_DRIVER_NL80211_SYNA) */ #ifdef CONFIG_DRIVER_NL80211_QCA if (drv->qca_do_acs) return nl80211_qca_do_acs(drv, params); #endif /* CONFIG_DRIVER_NL80211_QCA */ -#ifdef CONFIG_DRIVER_NL80211_BRCM +#if defined(CONFIG_DRIVER_NL80211_BRCM) || defined(CONFIG_DRIVER_NL80211_SYNA) if (drv->brcm_do_acs) return wpa_driver_do_broadcom_acs(drv, params); -#endif /* CONFIG_DRIVER_NL80211_BRCM */ +#endif /* CONFIG_DRIVER_NL80211_BRCM || CONFIG_DRIVER_NL80211_SYNA */ return -1; } diff --git a/src/drivers/driver_nl80211_capa.c b/src/drivers/driver_nl80211_capa.c index a0803bad0..b26757519 100644 --- a/src/drivers/driver_nl80211_capa.c +++ b/src/drivers/driver_nl80211_capa.c @@ -1032,7 +1032,7 @@ static int wiphy_info_handler(struct nl_msg *msg, void *arg) break; #endif /* CONFIG_DRIVER_NL80211_QCA */ } -#ifdef CONFIG_DRIVER_NL80211_BRCM +#if defined(CONFIG_DRIVER_NL80211_BRCM) || defined(CONFIG_DRIVER_NL80211_SYNA) } else if (vinfo->vendor_id == OUI_BRCM) { switch (vinfo->subcmd) { case BRCM_VENDOR_SCMD_ACS: @@ -1043,7 +1043,7 @@ static int wiphy_info_handler(struct nl_msg *msg, void *arg) drv->brcm_do_acs = 1; break; } -#endif /* CONFIG_DRIVER_NL80211_BRCM */ +#endif /* CONFIG_DRIVER_NL80211_BRCM || CONFIG_DRIVER_NL80211_SYNA */ } wpa_printf(MSG_DEBUG, "nl80211: Supported vendor command: vendor_id=0x%x subcmd=%u", diff --git a/src/drivers/driver_nl80211_event.c b/src/drivers/driver_nl80211_event.c index 70a10655d..65fb54580 100644 --- a/src/drivers/driver_nl80211_event.c +++ b/src/drivers/driver_nl80211_event.c @@ -2422,7 +2422,7 @@ static void nl80211_vendor_event_qca(struct wpa_driver_nl80211_data *drv, } -#ifdef CONFIG_DRIVER_NL80211_BRCM +#if defined(CONFIG_DRIVER_NL80211_BRCM) || defined(CONFIG_DRIVER_NL80211_SYNA) static void brcm_nl80211_acs_select_ch(struct wpa_driver_nl80211_data *drv, const u8 *data, size_t len) @@ -2500,7 +2500,7 @@ static void nl80211_vendor_event_brcm(struct wpa_driver_nl80211_data *drv, } } -#endif /* CONFIG_DRIVER_NL80211_BRCM */ +#endif /* CONFIG_DRIVER_NL80211_BRCM || CONFIG_DRIVER_NL80211_SYNA */ static void nl80211_vendor_event(struct wpa_driver_nl80211_data *drv, @@ -2547,11 +2547,11 @@ static void nl80211_vendor_event(struct wpa_driver_nl80211_data *drv, case OUI_QCA: nl80211_vendor_event_qca(drv, subcmd, data, len); break; -#ifdef CONFIG_DRIVER_NL80211_BRCM +#if defined(CONFIG_DRIVER_NL80211_BRCM) || defined(CONFIG_DRIVER_NL80211_SYNA) case OUI_BRCM: nl80211_vendor_event_brcm(drv, subcmd, data, len); break; -#endif /* CONFIG_DRIVER_NL80211_BRCM */ +#endif /* CONFIG_DRIVER_NL80211_BRCM || CONFIG_DRIVER_NL80211_SYNA */ default: wpa_printf(MSG_DEBUG, "nl80211: Ignore unsupported vendor event"); break; diff --git a/src/drivers/drivers.mak b/src/drivers/drivers.mak index a03d4a034..018609967 100644 --- a/src/drivers/drivers.mak +++ b/src/drivers/drivers.mak @@ -30,6 +30,10 @@ ifdef CONFIG_DRIVER_NL80211_BRCM DRV_CFLAGS += -DCONFIG_DRIVER_NL80211_BRCM endif +ifdef CONFIG_DRIVER_NL80211_SYNA +DRV_CFLAGS += -DCONFIG_DRIVER_NL80211_SYNA +endif + ifdef CONFIG_DRIVER_MACSEC_QCA DRV_CFLAGS += -DCONFIG_DRIVER_MACSEC_QCA DRV_OBJS += ../src/drivers/driver_macsec_qca.o diff --git a/src/drivers/drivers.mk b/src/drivers/drivers.mk index 10eab6a92..8c58456ff 100644 --- a/src/drivers/drivers.mk +++ b/src/drivers/drivers.mk @@ -44,6 +44,9 @@ endif ifdef CONFIG_DRIVER_NL80211_BRCM DRV_CFLAGS += -DCONFIG_DRIVER_NL80211_BRCM endif +ifdef CONFIG_DRIVER_NL80211_SYNA +DRV_CFLAGS += -DCONFIG_DRIVER_NL80211_SYNA +endif NEED_SME=y NEED_AP_MLME=y NEED_NETLINK=y -- 2.34.1 _______________________________________________ Hostap mailing list Hostap@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/hostap