aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/p2p_supplicant.h
diff options
context:
space:
mode:
authorIlan Peer <ilan.peer@intel.com>2015-07-27 19:24:27 (GMT)
committerJouni Malinen <j@w1.fi>2015-08-04 15:34:47 (GMT)
commit3a8f008a24a8e45d72c72741bc527eb8251758f7 (patch)
tree3e99c11fc5fdb075f8cf15086fab1bc107f280c2 /wpa_supplicant/p2p_supplicant.h
parentdae4c82c9573268edd5dabc577b7bc7184b5ce22 (diff)
downloadhostap-3a8f008a24a8e45d72c72741bc527eb8251758f7.zip
hostap-3a8f008a24a8e45d72c72741bc527eb8251758f7.tar.gz
hostap-3a8f008a24a8e45d72c72741bc527eb8251758f7.tar.bz2
P2P: Do not perform P2P GO CS in some cases
A P2P GO channel switch should not be triggered in all cases that require channel list update. Specifically, a P2P GO CS should not be triggered in case that the P2P GO state changed or in case that that the P2P GO has just completed a CS. To fix this, add reason code to wpas_p2p_channel_list_update() and trigger CS flow only for the relevant cases. Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Diffstat (limited to 'wpa_supplicant/p2p_supplicant.h')
-rw-r--r--wpa_supplicant/p2p_supplicant.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/wpa_supplicant/p2p_supplicant.h b/wpa_supplicant/p2p_supplicant.h
index b02f924..f622c28 100644
--- a/wpa_supplicant/p2p_supplicant.h
+++ b/wpa_supplicant/p2p_supplicant.h
@@ -17,6 +17,15 @@ struct p2p_channels;
struct wps_event_fail;
struct p2ps_provision;
+enum wpas_p2p_channel_update_trig {
+ WPAS_P2P_CHANNEL_UPDATE_ANY,
+ WPAS_P2P_CHANNEL_UPDATE_DRIVER,
+ WPAS_P2P_CHANNEL_UPDATE_STATE_CHANGE,
+ WPAS_P2P_CHANNEL_UPDATE_AVOID,
+ WPAS_P2P_CHANNEL_UPDATE_DISALLOW,
+ WPAS_P2P_CHANNEL_UPDATE_CS,
+};
+
int wpas_p2p_add_p2pdev_interface(struct wpa_supplicant *wpa_s,
const char *conf_p2p_dev);
struct wpa_supplicant * wpas_get_p2p_go_iface(struct wpa_supplicant *wpa_s,
@@ -161,7 +170,10 @@ int wpas_p2p_probe_req_rx(struct wpa_supplicant *wpa_s, const u8 *addr,
unsigned int rx_freq, int ssi_signal);
void wpas_p2p_wps_success(struct wpa_supplicant *wpa_s, const u8 *peer_addr,
int registrar);
-void wpas_p2p_update_channel_list(struct wpa_supplicant *wpa_s);
+
+void wpas_p2p_update_channel_list(struct wpa_supplicant *wpa_s,
+ enum wpas_p2p_channel_update_trig trig);
+
void wpas_p2p_update_best_channels(struct wpa_supplicant *wpa_s,
int freq_24, int freq_5, int freq_overall);
void wpas_p2p_rx_action(struct wpa_supplicant *wpa_s, const u8 *da,
@@ -222,7 +234,9 @@ static inline void wpas_p2p_wps_success(struct wpa_supplicant *wpa_s,
{
}
-static inline void wpas_p2p_update_channel_list(struct wpa_supplicant *wpa_s)
+static inline void
+wpas_p2p_update_channel_list(struct wpa_supplicant *wpa_s,
+ enum wpas_p2p_channel_update_trig trig)
{
}