From: Jithu Jance Date: Thu, 9 Aug 2012 18:18:43 +0000 (+0300) Subject: P2P: Add driver op for requesting GO/AP channel switch X-Git-Tag: aosp-jb-from-upstream~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=32e877fef742940d84b3c1af85224d56c59dd3f7;p=thirdparty%2Fhostap.git P2P: Add driver op for requesting GO/AP channel switch Signed-hostap: Jithu Jance (manual merge of commit ef35f5a0fd2c41f92a3ecc29995c5de1f407d2af) --- diff --git a/src/drivers/driver.h b/src/drivers/driver.h index 8db7a6783..428c4e5db 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 ebbe17dc4..d8567b6da 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 */