]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Allocate QCA vendor subcmds for DFS radar detected and CAC events
authorAhmad Kholaif <akholaif@qca.qualcomm.com>
Wed, 11 Feb 2015 02:48:39 +0000 (18:48 -0800)
committerJouni Malinen <j@w1.fi>
Wed, 11 Feb 2015 14:51:33 +0000 (16:51 +0200)
When DFS offloading capability is supported by the driver, the driver
should use these events to indicate when a radar pattern has been
detected, channel availability check (CAC) has been completed, aborted
or finished after the non-occupancy period is over on a DFS channel.

Also, add a new driver.h event to be used by NL80211 to indicate CAC
Started event on a DFS channel.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
src/common/qca-vendor.h
src/drivers/driver.h
src/drivers/driver_common.c

index 8f961bf1c6ba8e142987a4e45a3445652cfdc004..cf041938d3f96c7d0b1e52e915369c8e694b0bf8 100644 (file)
@@ -70,8 +70,25 @@ enum qca_radiotap_vendor_ids {
  *     supported by the driver. enum qca_wlan_vendor_features defines
  *     the possible features.
  *
- * @QCA_NL80211_VENDOR_SUBCMD_CAC_STARTED: Event used by driver, which
- *     supports DFS offloading, to indicate a channel availability check start.
+ * @QCA_NL80211_VENDOR_SUBCMD_DFS_OFFLOAD_CAC_STARTED: Event used by driver,
+ *     which supports DFS offloading, to indicate a channel availability check
+ *     start.
+ *
+ * @QCA_NL80211_VENDOR_SUBCMD_DFS_OFFLOAD_CAC_FINISHED: Event used by driver,
+ *     which supports DFS offloading, to indicate a channel availability check
+ *     completion.
+ *
+ * @QCA_NL80211_VENDOR_SUBCMD_DFS_OFFLOAD_CAC_ABORTED: Event used by driver,
+ *     which supports DFS offloading, to indicate that the channel availability
+ *     check aborted, no change to the channel status.
+ *
+ * @QCA_NL80211_VENDOR_SUBCMD_DFS_OFFLOAD_CAC_NOP_FINISHED: Event used by
+ *     driver, which supports DFS offloading, to indicate that the
+ *     Non-Occupancy Period for this channel is over, channel becomes usable.
+ *
+ * @QCA_NL80211_VENDOR_SUBCMD_DFS_OFFLOAD_RADAR_DETECTED: Event used by driver,
+ *     which supports DFS offloading, to indicate a radar pattern has been
+ *     detected. The channel is now unusable.
  */
 enum qca_nl80211_vendor_subcmds {
        QCA_NL80211_VENDOR_SUBCMD_UNSPEC = 0,
@@ -118,7 +135,11 @@ enum qca_nl80211_vendor_subcmds {
        /* 53 - reserved for QCA */
        QCA_NL80211_VENDOR_SUBCMD_DO_ACS = 54,
        QCA_NL80211_VENDOR_SUBCMD_GET_FEATURES = 55,
-       QCA_NL80211_VENDOR_SUBCMD_CAC_STARTED = 56,
+       QCA_NL80211_VENDOR_SUBCMD_DFS_OFFLOAD_CAC_STARTED = 56,
+       QCA_NL80211_VENDOR_SUBCMD_DFS_OFFLOAD_CAC_FINISHED = 57,
+       QCA_NL80211_VENDOR_SUBCMD_DFS_OFFLOAD_CAC_ABORTED = 58,
+       QCA_NL80211_VENDOR_SUBCMD_DFS_OFFLOAD_CAC_NOP_FINISHED = 59,
+       QCA_NL80211_VENDOR_SUBCMD_DFS_OFFLOAD_RADAR_DETECTED = 60,
 };
 
 
index 745f8b3c50745ad60e7a950e101e1038208f2b34..b1d896c02ddc561af5c0070c484dbd87feaf6374 100644 (file)
@@ -3763,7 +3763,7 @@ enum wpa_event_type {
        EVENT_CONNECT_FAILED_REASON,
 
        /**
-        * EVENT_RADAR_DETECTED - Notify of radar detection
+        * EVENT_DFS_RADAR_DETECTED - Notify of radar detection
         *
         * A radar has been detected on the supplied frequency, hostapd should
         * react accordingly (e.g., change channel).
@@ -3771,14 +3771,14 @@ enum wpa_event_type {
        EVENT_DFS_RADAR_DETECTED,
 
        /**
-        * EVENT_CAC_FINISHED - Notify that channel availability check has been completed
+        * EVENT_DFS_CAC_FINISHED - Notify that channel availability check has been completed
         *
         * After a successful CAC, the channel can be marked clear and used.
         */
        EVENT_DFS_CAC_FINISHED,
 
        /**
-        * EVENT_CAC_ABORTED - Notify that channel availability check has been aborted
+        * EVENT_DFS_CAC_ABORTED - Notify that channel availability check has been aborted
         *
         * The CAC was not successful, and the channel remains in the previous
         * state. This may happen due to a radar beeing detected or other
@@ -3787,7 +3787,7 @@ enum wpa_event_type {
        EVENT_DFS_CAC_ABORTED,
 
        /**
-        * EVENT_DFS_CAC_NOP_FINISHED - Notify that non-occupancy period is over
+        * EVENT_DFS_NOP_FINISHED - Notify that non-occupancy period is over
         *
         * The channel which was previously unavailable is now available again.
         */
@@ -3836,6 +3836,15 @@ enum wpa_event_type {
         * in device.
         */
        EVENT_ACS_CHANNEL_SELECTED,
+
+       /**
+        * EVENT_DFS_CAC_STARTED - Notify that channel availability check has
+        * been started.
+        *
+        * This event indicates that channel availability check has been started
+        * on a DFS frequency by a driver that supports DFS Offload.
+        */
+       EVENT_DFS_CAC_STARTED,
 };
 
 
index f897c114797a1992c72d2aa5b72182a33f30ba19..aebea8cf64e37abc44393eb331d7460507172263 100644 (file)
@@ -79,6 +79,7 @@ const char * event_to_string(enum wpa_event_type event)
        E2S(AVOID_FREQUENCIES);
        E2S(NEW_PEER_CANDIDATE);
        E2S(ACS_CHANNEL_SELECTED);
+       E2S(DFS_CAC_STARTED);
        }
 
        return "UNKNOWN";