diff options
author | Dmitry Shmidt <dimitrysh@google.com> | 2011-09-28 13:29:53 -0700 |
---|---|---|
committer | Dmitry Shmidt <dimitrysh@google.com> | 2011-09-28 13:29:53 -0700 |
commit | fc41cadcff448cdd2b60e376fc6e7378e2e57b5e (patch) | |
tree | a4409808cd5df51019e8125839ee01ad6907793b /wpa_supplicant/p2p_supplicant.c | |
parent | 6e933c1e09094a8972ef1e782c57f8b3c55c91d0 (diff) | |
download | external_wpa_supplicant_8-fc41cadcff448cdd2b60e376fc6e7378e2e57b5e.zip external_wpa_supplicant_8-fc41cadcff448cdd2b60e376fc6e7378e2e57b5e.tar.gz external_wpa_supplicant_8-fc41cadcff448cdd2b60e376fc6e7378e2e57b5e.tar.bz2 |
nl80211: Add get_noa() support for WFD certification (BRCM)
BUG: b/5367351
Change-Id: I14ed79e10ade205c5dd4cdc0d2e888ed1279d1bb
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Diffstat (limited to 'wpa_supplicant/p2p_supplicant.c')
-rw-r--r-- | wpa_supplicant/p2p_supplicant.c | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c index 12dae34..f4c5a53 100644 --- a/wpa_supplicant/p2p_supplicant.c +++ b/wpa_supplicant/p2p_supplicant.c @@ -4168,10 +4168,49 @@ int wpas_p2p_set_noa(struct wpa_supplicant *wpa_s, u8 count, int start, { if (!wpa_s->ap_iface) return -1; + +#ifdef ANDROID_BRCM_P2P_PATCH +#define NOA_BUF_LEN 50 + /* Now get the NOA descriptor from the driver */ + hostapd_p2p_set_noa(wpa_s->ap_iface->bss[0], count, start, + duration); + if(count > 0) { + u8 noa[NOA_BUF_LEN]; + int noa_len = 0; + wpa_printf(MSG_DEBUG, "P2P: Get NOA attribute from driver"); + noa_len = wpa_drv_get_noa(wpa_s, noa, NOA_BUF_LEN); + if (noa_len) { + wpa_printf(MSG_DEBUG, "P2P: Now Update NOA attributes in Beacons/ProbeRsps noa_len %d", noa_len); + return p2p_group_notif_noa(wpa_s->p2p_group, noa, noa_len); + } + else + return 0; + } + else + return 0; +#else return hostapd_p2p_set_noa(wpa_s->ap_iface->bss[0], count, start, duration); +#endif } +#ifdef ANDROID_BRCM_P2P_PATCH +int wpas_drv_set_p2p_powersave(struct wpa_supplicant *wpa_s, int legacy_ps, int opp_ps, int ctwindow) +{ +#define NOA_BUF_LEN 50 + u8 noa[NOA_BUF_LEN]; + int noa_len = 0; + wpa_drv_set_p2p_powersave(wpa_s, legacy_ps, opp_ps, ctwindow); + wpa_printf(MSG_DEBUG, "P2P: Get NOA attribute from driver"); + noa_len = wpa_drv_get_noa(wpa_s, noa, NOA_BUF_LEN); + if (noa_len) { + wpa_printf(MSG_DEBUG, "P2P: Now Update NOA attributes in Beacons/ProbeRsps noa_len %d", noa_len); + return p2p_group_notif_noa(wpa_s->p2p_group, noa, noa_len); + } + else + return 0; +} +#endif int wpas_p2p_set_cross_connect(struct wpa_supplicant *wpa_s, int enabled) { |