aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJithu Jance <jithu@broadcom.com>2012-06-10 20:54:31 +0300
committerJouni Malinen <j@w1.fi>2012-06-10 20:54:31 +0300
commitef35f5a0fd2c41f92a3ecc29995c5de1f407d2af (patch)
tree282383b0f3a08367c8526739860a85ace0c61676
parentb9cfc09a81b1f6449bbd0754a2bdc4d790766662 (diff)
downloadexternal_wpa_supplicant_8_ti-ef35f5a0fd2c41f92a3ecc29995c5de1f407d2af.zip
external_wpa_supplicant_8_ti-ef35f5a0fd2c41f92a3ecc29995c5de1f407d2af.tar.gz
external_wpa_supplicant_8_ti-ef35f5a0fd2c41f92a3ecc29995c5de1f407d2af.tar.bz2
P2P: Add driver op for requesting GO/AP channel switch
Signed-hostap: Jithu Jance <jithu@broadcom.com>
-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 f7fb2ef..102ea46 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
@@ -2536,6 +2536,18 @@ struct wpa_driver_ops {
* conditions.
*/
int (*radio_disable)(void *priv, int disabled);
+
+ /**
+ * 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 e1e921d..2ab455b 100644
--- a/wpa_supplicant/driver_i.h
+++ b/wpa_supplicant/driver_i.h
@@ -672,4 +672,12 @@ static inline int wpa_drv_radio_disable(struct wpa_supplicant *wpa_s,
return wpa_s->driver->radio_disable(wpa_s->drv_priv, disabled);
}
+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 */