From 581ae3aa1c037b6bc752eae5e35ca204bd7d2b11 Mon Sep 17 00:00:00 2001 From: Emerson Pinter Date: Thu, 17 Jan 2013 19:20:14 -0200 Subject: nl80211: add ifndef on AP SME condition The condition causes problems on driver initialization if the NL80211_ATTR_DEVICE_AP_SME is not available. Needs BOARD_NO_APSME_ATTR:=true. Change-Id: I88e91996d8e6a70f46a5a84d6540bf3d3b628ddd --- hostapd/Android.mk | 4 ++++ src/drivers/driver_nl80211.c | 2 ++ wpa_supplicant/Android.mk | 4 ++++ 3 files changed, 10 insertions(+) diff --git a/hostapd/Android.mk b/hostapd/Android.mk index fefc40b..2e12012 100644 --- a/hostapd/Android.mk +++ b/hostapd/Android.mk @@ -32,6 +32,10 @@ ifeq ($(BOARD_LEGACY_NL80211_STA_EVENTS),true) L_CFLAGS += -DLEGACY_STA_EVENTS endif +ifeq ($(BOARD_NO_APSME_ATTR),true) +L_CFLAGS += -DNO_APSME_ATTR +endif + ifeq ($(BOARD_WLAN_DEVICE), qcwcn) L_CFLAGS += -DANDROID_QCOM_WCN L_CFLAGS += -DANDROID_P2P diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index 5be2d48..b085e3b 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -2621,7 +2621,9 @@ broken_combination: } } +#ifndef NO_APSME_ATTR if (tb[NL80211_ATTR_DEVICE_AP_SME]) +#endif info->device_ap_sme = 1; if (tb[NL80211_ATTR_FEATURE_FLAGS]) { diff --git a/wpa_supplicant/Android.mk b/wpa_supplicant/Android.mk index 6d94cb2..4215646 100644 --- a/wpa_supplicant/Android.mk +++ b/wpa_supplicant/Android.mk @@ -33,6 +33,10 @@ ifeq ($(BOARD_WLAN_DEVICE), bcmdhd) L_CFLAGS += -DANDROID_P2P endif +ifeq ($(BOARD_NO_APSME_ATTR),true) +L_CFLAGS += -DNO_APSME_ATTR +endif + ifeq ($(BOARD_WLAN_DEVICE), qcwcn) L_CFLAGS += -DANDROID_QCOM_WCN L_CFLAGS += -DANDROID_P2P -- cgit v1.1