aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJithu Jance <jithu@broadcom.com>2012-08-09 18:18:43 (GMT)
committerJouni Malinen <j@w1.fi>2012-08-09 20:05:53 (GMT)
commit32e877fef742940d84b3c1af85224d56c59dd3f7 (patch)
tree3ead258463ced5d64c6a84200080e745f5783d4b
parent234d7f6e8078eab1eacae6a12186e8bd0cffe561 (diff)
downloadhostap-32e877fef742940d84b3c1af85224d56c59dd3f7.zip
hostap-32e877fef742940d84b3c1af85224d56c59dd3f7.tar.gz
hostap-32e877fef742940d84b3c1af85224d56c59dd3f7.tar.bz2
P2P: Add driver op for requesting GO/AP channel switch
Signed-hostap: Jithu Jance <jithu@broadcom.com> (manual merge of commit ef35f5a0fd2c41f92a3ecc29995c5de1f407d2af)
-rw-r--r--src/drivers/driver.h12
-rw-r--r--wpa_supplicant/driver_i.h8
2 files changed, 20 insertions, 0 deletions
diff --git a/src/drivers/driver.h b/src/drivers/driver.h
index 8db7a67..428c4e5 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
@@ -2497,6 +2497,18 @@ struct wpa_driver_ops {
*/
void (*poll_client)(void *priv, const u8 *own_addr,
const u8 *addr, int qos);
+
+ /**
+ * switch_channel - Announce channel switch and migrate the GO to the
+ * given frequency
+ * @priv: Private driver interface data
+ * @freq: Frequency in MHz
+ * Returns: 0 on success, -1 on failure
+ *
+ * This function is used to move the GO to the legacy STA channel to
+ * avoid frequency conflict in single channel concurrency.
+ */
+ int (*switch_channel)(void *priv, unsigned int freq);
};
diff --git a/wpa_supplicant/driver_i.h b/wpa_supplicant/driver_i.h
index ebbe17d..d8567b6 100644
--- a/wpa_supplicant/driver_i.h
+++ b/wpa_supplicant/driver_i.h
@@ -657,4 +657,12 @@ static inline void wpa_drv_set_rekey_info(struct wpa_supplicant *wpa_s,
wpa_s->driver->set_rekey_info(wpa_s->drv_priv, kek, kck, replay_ctr);
}
+static inline int wpa_drv_switch_channel(struct wpa_supplicant *wpa_s,
+ unsigned int freq)
+{
+ if (!wpa_s->driver->switch_channel)
+ return -1;
+ return wpa_s->driver->switch_channel(wpa_s->drv_priv, freq);
+}
+
#endif /* DRIVER_I_H */