]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Add QCA vendor attributes for agile spectral scan
authorEdayilliam Jayadev <ejayadev@codeaurora.org>
Mon, 8 Apr 2019 10:15:46 +0000 (15:45 +0530)
committerJouni Malinen <j@w1.fi>
Fri, 31 May 2019 20:02:46 +0000 (23:02 +0300)
Add QCA vendor attributes to spectral scan related vendor commands to
support agile spectral scan.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
src/common/qca-vendor.h

index df3e155a85f79bbc3ea3bce9234b5c6698646245..2cc201a0f9ab828b523ae5eee7cc2c2d3951d59d 100644 (file)
@@ -376,7 +376,9 @@ enum qca_radiotap_vendor_ids {
  * @QCA_NL80211_VENDOR_SUBCMD_SPECTRAL_SCAN_START: Start spectral scan. The scan
  *     parameters are specified by enum qca_wlan_vendor_attr_spectral_scan.
  *     This returns a cookie (%QCA_WLAN_VENDOR_ATTR_SPECTRAL_SCAN_COOKIE)
- *     identifying the operation in success case.
+ *     identifying the operation in success case. In failure cases an
+ *     error code (%QCA_WLAN_VENDOR_ATTR_SPECTRAL_SCAN_ERROR_CODE)
+ *     describing the reason for the failure is returned.
  *
  * @QCA_NL80211_VENDOR_SUBCMD_SPECTRAL_SCAN_STOP: Stop spectral scan. This uses
  *     a cookie (%QCA_WLAN_VENDOR_ATTR_SPECTRAL_SCAN_COOKIE) from
@@ -4555,6 +4557,34 @@ enum qca_wlan_vendor_attr_spectral_scan {
         * qca_wlan_vendor_attr_spectral_scan_request_type.
         */
        QCA_WLAN_VENDOR_ATTR_SPECTRAL_SCAN_REQUEST_TYPE = 23,
+       /* This specifies the frequency span over which spectral
+        * scan would be carried out. Its value depends on the
+        * value of QCA_WLAN_VENDOR_ATTR_SPECTRAL_SCAN_MODE and
+        * the relation is as follows.
+        * QCA_WLAN_VENDOR_SPECTRAL_SCAN_MODE_NORMAL
+        *    Not applicable. Spectral scan would happen in the
+        *    operating span.
+        * QCA_WLAN_VENDOR_SPECTRAL_SCAN_MODE_AGILE
+        *    Center frequency (in MHz) of the span of interest or
+        *    for convenience, center frequency (in MHz) of any channel
+        *    in the span of interest. If agile spectral scan is initiated
+        *    without setting a valid frequency it returns the error code
+        *    (QCA_WLAN_VENDOR_SPECTRAL_SCAN_ERR_PARAM_NOT_INITIALIZED).
+        * u32 attribute.
+        */
+       QCA_WLAN_VENDOR_ATTR_SPECTRAL_SCAN_CONFIG_FREQUENCY = 24,
+       /* Spectral scan mode. u32 attribute.
+        * It uses values defined in enum qca_wlan_vendor_spectral_scan_mode.
+        * If this attribute is not present, it is assumed to be
+        * normal mode (QCA_WLAN_VENDOR_SPECTRAL_SCAN_MODE_NORMAL).
+        */
+       QCA_WLAN_VENDOR_ATTR_SPECTRAL_SCAN_MODE = 25,
+       /* Spectral scan error code. u32 attribute.
+        * It uses values defined in enum
+        * qca_wlan_vendor_spectral_scan_error_code.
+        * This attribute is included only in failure scenarios.
+        */
+       QCA_WLAN_VENDOR_ATTR_SPECTRAL_SCAN_ERROR_CODE = 26,
 
        QCA_WLAN_VENDOR_ATTR_SPECTRAL_SCAN_CONFIG_AFTER_LAST,
        QCA_WLAN_VENDOR_ATTR_SPECTRAL_SCAN_CONFIG_MAX =
@@ -4633,6 +4663,8 @@ enum qca_wlan_vendor_attr_spectral_cap {
         * u8 attribute.
         */
        QCA_WLAN_VENDOR_ATTR_SPECTRAL_SCAN_CAP_DEFAULT_AGC_MAX_GAIN = 10,
+       /* Flag attribute to indicate agile spectral scan capability */
+       QCA_WLAN_VENDOR_ATTR_SPECTRAL_SCAN_CAP_AGILE_SPECTRAL = 11,
 
        QCA_WLAN_VENDOR_ATTR_SPECTRAL_SCAN_CAP_AFTER_LAST,
        QCA_WLAN_VENDOR_ATTR_SPECTRAL_SCAN_CAP_MAX =
@@ -4649,6 +4681,13 @@ enum qca_wlan_vendor_attr_spectral_scan_status {
        QCA_WLAN_VENDOR_ATTR_SPECTRAL_SCAN_STATUS_IS_ENABLED = 1,
        /* Flag attribute to indicate whether spectral scan is in progress*/
        QCA_WLAN_VENDOR_ATTR_SPECTRAL_SCAN_STATUS_IS_ACTIVE = 2,
+       /* Spectral scan mode. u32 attribute.
+        * It uses values defined in enum qca_wlan_vendor_spectral_scan_mode.
+        * If this attribute is not present, normal mode
+        * (QCA_WLAN_VENDOR_SPECTRAL_SCAN_MODE_NORMAL is assumed to be
+        * requested.
+        */
+       QCA_WLAN_VENDOR_ATTR_SPECTRAL_SCAN_STATUS_MODE = 3,
 
        QCA_WLAN_VENDOR_ATTR_SPECTRAL_SCAN_STATUS_AFTER_LAST,
        QCA_WLAN_VENDOR_ATTR_SPECTRAL_SCAN_STATUS_MAX =
@@ -4673,6 +4712,43 @@ enum qca_wlan_vendor_attr_spectral_scan_request_type {
        QCA_WLAN_VENDOR_ATTR_SPECTRAL_SCAN_REQUEST_TYPE_CONFIG,
 };
 
+/**
+ * qca_wlan_vendor_spectral_scan_mode: Attribute values for
+ * QCA_WLAN_VENDOR_ATTR_SPECTRAL_SCAN_MODE in the vendor subcmd
+ * QCA_NL80211_VENDOR_SUBCMD_SPECTRAL_SCAN_START and
+ * QCA_WLAN_VENDOR_ATTR_SPECTRAL_SCAN_STATUS_MODE in the vendor subcmd
+ * QCA_NL80211_VENDOR_SUBCMD_SPECTRAL_SCAN_GET_STATUS. This represents the
+ * spectral scan modes.
+ * @QCA_WLAN_VENDOR_SPECTRAL_SCAN_MODE_NORMAL: Normal spectral scan:
+ * spectral scan in the current operating span.
+ * @QCA_WLAN_VENDOR_SPECTRAL_SCAN_MODE_AGILE: Agile spectral scan:
+ * spectral scan in the configured agile span.
+ */
+enum qca_wlan_vendor_spectral_scan_mode {
+       QCA_WLAN_VENDOR_SPECTRAL_SCAN_MODE_NORMAL = 0,
+       QCA_WLAN_VENDOR_SPECTRAL_SCAN_MODE_AGILE = 1,
+};
+
+/**
+ * qca_wlan_vendor_spectral_scan_error_code: Attribute values for
+ * QCA_WLAN_VENDOR_ATTR_SPECTRAL_SCAN_ERROR_CODE in the vendor subcmd
+ * QCA_NL80211_VENDOR_SUBCMD_SPECTRAL_SCAN_START.
+ * @QCA_WLAN_VENDOR_SPECTRAL_SCAN_ERR_PARAM_UNSUPPORTED: Changing the value
+ * of a parameter is not supported.
+ * @QCA_WLAN_VENDOR_SPECTRAL_SCAN_ERR_MODE_UNSUPPORTED: Requested spectral scan
+ * mode is not supported.
+ * @QCA_WLAN_VENDOR_SPECTRAL_SCAN_ERR_PARAM_INVALID_VALUE: A parameter
+ * has invalid value.
+ * @QCA_WLAN_VENDOR_SPECTRAL_SCAN_ERR_PARAM_NOT_INITIALIZED: A parameter
+ * is not initialized.
+ */
+enum qca_wlan_vendor_spectral_scan_error_code {
+       QCA_WLAN_VENDOR_SPECTRAL_SCAN_ERR_PARAM_UNSUPPORTED = 0,
+       QCA_WLAN_VENDOR_SPECTRAL_SCAN_ERR_MODE_UNSUPPORTED = 1,
+       QCA_WLAN_VENDOR_SPECTRAL_SCAN_ERR_PARAM_INVALID_VALUE = 2,
+       QCA_WLAN_VENDOR_SPECTRAL_SCAN_ERR_PARAM_NOT_INITIALIZED = 3,
+};
+
 /**
  * qca_wlan_vendor_spectral_scan_cap_hw_gen: Attribute values for
  * QCA_WLAN_VENDOR_ATTR_SPECTRAL_SCAN_CAP_HW_GEN to the vendor subcmd