[RFC 3/4] P2P: Handling single channel concurrency

Jithu Jance jithujance at gmail.com
Tue Mar 6 00:04:12 EST 2012


Single channel concurrency patch [3/4]

Hooks for implementing GO/AP channel switch. To be expanded later.


[PATCH] Add hooks to allow GO/AP channel switch
 Signed-hostap: Jithu Jance <jithu at broadcom.com>

---
 src/drivers/driver.h      |   13 +++++++++++++
 wpa_supplicant/driver_i.h |    8 ++++++++
 2 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/src/drivers/driver.h b/src/drivers/driver.h
index 04aedcf..81a4269 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
@@ -2509,6 +2509,19 @@ struct wpa_driver_ops {
  * conditions.
  */
  int (*radio_disable)(void *priv, int disabled);
+
+ /**
+ * switch_channel - Announce channel switch and migrate the GO to a
+ * 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);
+#endif
 };


diff --git a/wpa_supplicant/driver_i.h b/wpa_supplicant/driver_i.h
index 5b10540..5065f61 100644
--- a/wpa_supplicant/driver_i.h
+++ b/wpa_supplicant/driver_i.h
@@ -665,4 +665,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,
+  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 */
-- 
1.7.4.1


- Jithu Jance
* *
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.shmoo.com/pipermail/hostap/attachments/20120306/9db530bf/attachment.htm 


More information about the HostAP mailing list