]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
AOSP: driver_nl80211.c private library
authorJouni Malinen <j@w1.fi>
Fri, 1 Nov 2013 09:45:23 +0000 (11:45 +0200)
committerJouni Malinen <j@w1.fi>
Fri, 1 Nov 2013 14:35:04 +0000 (16:35 +0200)
src/drivers/driver_nl80211.c

index 567b3aab47ed5f91afd83d1d60f3b9dc62104bd4..94e3673e0ac83f89e63123586470e3486cdcdd9f 100644 (file)
@@ -321,7 +321,15 @@ static int android_pno_start(struct i802_bss *bss,
                             struct wpa_driver_scan_params *params);
 static int android_pno_stop(struct i802_bss *bss);
 #endif /* ANDROID */
+#ifdef ANDROID_P2P
+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);
 
+#endif
 #ifdef HOSTAPD
 static void add_ifidx(struct wpa_driver_nl80211_data *drv, int ifidx);
 static void del_ifidx(struct wpa_driver_nl80211_data *drv, int ifidx);
@@ -586,7 +594,10 @@ static int send_and_recv_msgs_global(struct nl80211_global *global,
 }
 
 
-static int send_and_recv_msgs(struct wpa_driver_nl80211_data *drv,
+#ifndef ANDROID
+static
+#endif
+int send_and_recv_msgs(struct wpa_driver_nl80211_data *drv,
                              struct nl_msg *msg,
                              int (*valid_handler)(struct nl_msg *, void *),
                              void *valid_data)
@@ -10282,7 +10293,11 @@ static int nl80211_set_p2p_powersave(void *priv, int legacy_ps, int opp_ps,
                   "opp_ps=%d ctwindow=%d)", legacy_ps, opp_ps, ctwindow);
 
        if (opp_ps != -1 || ctwindow != -1)
+#ifdef ANDROID_P2P
+               wpa_driver_set_p2p_ps(priv, legacy_ps, opp_ps, ctwindow);
+#else
                return -1; /* Not yet supported */
+#endif
 
        if (legacy_ps == -1)
                return 0;
@@ -10781,6 +10796,11 @@ const struct wpa_driver_ops wpa_driver_nl80211_ops = {
        .update_ft_ies = wpa_driver_nl80211_update_ft_ies,
        .get_mac_addr = wpa_driver_nl80211_get_macaddr,
        .get_survey = wpa_driver_nl80211_get_survey,
+#ifdef ANDROID_P2P
+       .set_noa = wpa_driver_set_p2p_noa,
+       .get_noa = wpa_driver_get_p2p_noa,
+       .set_ap_wps_ie = wpa_driver_set_ap_wps_p2p_ie,
+#endif
 #ifdef ANDROID
        .driver_cmd = wpa_driver_nl80211_driver_cmd,
 #endif