]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
P2P: Add driver op for requesting GO/AP channel switch
authorJithu Jance <jithu@broadcom.com>
Thu, 9 Aug 2012 18:18:43 +0000 (21:18 +0300)
committerJouni Malinen <j@w1.fi>
Thu, 9 Aug 2012 20:05:53 +0000 (23:05 +0300)
Signed-hostap: Jithu Jance <jithu@broadcom.com>

(manual merge of commit ef35f5a0fd2c41f92a3ecc29995c5de1f407d2af)

src/drivers/driver.h
wpa_supplicant/driver_i.h

index 8db7a6783a0cce67d139336131511499a34f5be6..428c4e5db046e1ff51435ebf30de772c806c6157 100644 (file)
@@ -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);
 };
 
 
index ebbe17dc43a0a20c0b578724f2304d52748651cb..d8567b6da4e8810e243e4c4620818d734bea6579 100644 (file)
@@ -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 */