diff options
| author | Santosh Sajjan <ssajjan@codeaurora.org> | 2012-07-14 22:39:36 +0530 |
|---|---|---|
| committer | Ricardo Cerqueira <cyanogenmod@cerqueira.org> | 2012-07-29 15:38:48 +0100 |
| commit | 824ef55658a7b79b12725a63a30fdc41506b78d4 (patch) | |
| tree | 3ec2a6e76dc89d2cbdf1d888a50e75a991cfbfae | |
| parent | 9fb98405130c2da07cfdbabc2774922851de96de (diff) | |
| download | android_external_wpa_supplicant_8-824ef55658a7b79b12725a63a30fdc41506b78d4.tar.gz android_external_wpa_supplicant_8-824ef55658a7b79b12725a63a30fdc41506b78d4.tar.bz2 android_external_wpa_supplicant_8-824ef55658a7b79b12725a63a30fdc41506b78d4.zip | |
Changes done for qcom Wifi bringup on JB.
Defined ANDROID_P2P and ANDROID_QCOM_P2P_PATCH flag. Added missing
driver commands.
Change-Id: Ib2f6c304406ad288c7a9d8e4f6e943ff803e605f
| -rw-r--r-- | hostapd/Android.mk | 5 | ||||
| -rw-r--r-- | src/ap/ap_config.c | 8 | ||||
| -rw-r--r-- | src/drivers/driver_nl80211.c | 37 | ||||
| -rw-r--r-- | wpa_supplicant/Android.mk | 5 |
4 files changed, 53 insertions, 2 deletions
diff --git a/hostapd/Android.mk b/hostapd/Android.mk index c1e5d8be..640e6e01 100644 --- a/hostapd/Android.mk +++ b/hostapd/Android.mk @@ -28,6 +28,11 @@ ifeq ($(BOARD_WLAN_DEVICE), bcmdhd) L_CFLAGS += -DANDROID_P2P endif +ifeq ($(BOARD_WLAN_DEVICE), qcwcn) +L_CFLAGS += -DANDROID_QCOM_PATCH +L_CFLAGS += -DANDROID_P2P +endif + # To force sizeof(enum) = 4 ifeq ($(TARGET_ARCH),arm) L_CFLAGS += -mabi=aapcs-linux diff --git a/src/ap/ap_config.c b/src/ap/ap_config.c index b9f59941..4395de9a 100644 --- a/src/ap/ap_config.c +++ b/src/ap/ap_config.c @@ -156,6 +156,14 @@ struct hostapd_config * hostapd_config_defaults(void) conf->ht_capab = HT_CAP_INFO_SMPS_DISABLED; +#ifdef ANDROID_QCOM_PATCH + conf->ieee80211n = 1; + + /* Enable ieee80211d and set US as default country */ + conf->ieee80211d = 1; + os_memcpy(conf->country, "US ", 3); +#endif + return conf; } diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index 8e27df6a..c8eddaa4 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -308,12 +308,17 @@ static int android_pno_stop(struct i802_bss *bss); static void mlme_event_deauth_disassoc(struct wpa_driver_nl80211_data *drv, enum wpa_event_type type, const u8 *frame, size_t len); +#ifdef ANDROID_QCOM_PATCH +static int wpa_driver_set_p2p_noa(void *priv, u8 count, int start, int duration); +static int wpa_driver_set_p2p_ps(void *priv, int legacy_ps, int opp_ps, int ctwindow); +#else int wpa_driver_set_p2p_noa(void *priv, u8 count, int start, int duration); int wpa_driver_get_p2p_noa(void *priv, u8 *buf, size_t len); int wpa_driver_set_p2p_ps(void *priv, int legacy_ps, int opp_ps, int ctwindow); int wpa_driver_set_ap_wps_p2p_ie(void *priv, const struct wpabuf *beacon, - const struct wpabuf *proberesp, - const struct wpabuf *assocresp); + const struct wpabuf *proberesp, + const struct wpabuf *assocresp); +#endif #endif #ifdef HOSTAPD @@ -9081,6 +9086,32 @@ static int wpa_driver_nl80211_driver_cmd(void *priv, char *cmd, char *buf, } #endif /* ANDROID */ +#ifdef ANDROID_QCOM_PATCH +#ifdef ANDROID_P2P +static int wpa_driver_set_p2p_noa(void *priv, u8 count, int start, + int duration) +{ + char buf[MAX_DRV_CMD_SIZE]; + + memset(buf, 0, sizeof(buf)); + wpa_printf(MSG_DEBUG, "%s: Entry", __func__); + os_snprintf(buf, sizeof(buf), "P2P_SET_NOA %d %d %d", count, start, + duration); + return wpa_driver_nl80211_driver_cmd(priv, buf, buf, strlen(buf) + 1); +} + +static int wpa_driver_set_p2p_ps(void *priv, int legacy_ps, int opp_ps, int ctwindow) +{ + char buf[MAX_DRV_CMD_SIZE]; + + memset(buf, 0, sizeof(buf)); + wpa_printf(MSG_DEBUG, "%s: Entry", __func__); + snprintf(buf, sizeof(buf), "P2P_SET_PS %d %d %d", legacy_ps, opp_ps, ctwindow); + return wpa_driver_nl80211_driver_cmd(priv, buf, buf, strlen(buf) + 1); +} +#endif /* ANDROID_P2P */ +#endif /* ANDROID_QCOM_PATCH */ + const struct wpa_driver_ops wpa_driver_nl80211_ops = { .name = "nl80211", .desc = "Linux nl80211/cfg80211", @@ -9158,9 +9189,11 @@ const struct wpa_driver_ops wpa_driver_nl80211_ops = { #endif /* CONFIG_TDLS */ #ifdef ANDROID_P2P .set_noa = wpa_driver_set_p2p_noa, +#ifndef ANDROID_QCOM_PATCH .get_noa = wpa_driver_get_p2p_noa, .set_ap_wps_ie = wpa_driver_set_ap_wps_p2p_ie, #endif +#endif #ifdef ANDROID .driver_cmd = wpa_driver_nl80211_driver_cmd, #endif diff --git a/wpa_supplicant/Android.mk b/wpa_supplicant/Android.mk index c6cf80b8..6b685ece 100644 --- a/wpa_supplicant/Android.mk +++ b/wpa_supplicant/Android.mk @@ -33,6 +33,11 @@ ifeq ($(BOARD_WLAN_DEVICE), bcmdhd) L_CFLAGS += -DANDROID_P2P endif +ifeq ($(BOARD_WLAN_DEVICE), qcwcn) +L_CFLAGS += -DANDROID_QCOM_PATCH +L_CFLAGS += -DANDROID_P2P +endif + # Use Android specific directory for control interface sockets L_CFLAGS += -DCONFIG_CTRL_IFACE_CLIENT_DIR=\"/data/misc/wifi/sockets\" L_CFLAGS += -DCONFIG_CTRL_IFACE_DIR=\"/data/system/wpa_supplicant\" |
