Переглянути джерело

qcacmn: WMI changes for NOL violation

This commit contains the following changes related to FR49350:
usenol pdev param declaration and implementation of wmi cmd to send
the param to FW.
Failure status code declaration for scan and vdev start.

CRs-Fixed: 2328894
Change-Id: I5d3bfe758aeb9907193b6f626582b70413f5381c
Abhijit Pradhan 6 роки тому
батько
коміт
bbdd2dcc99

+ 20 - 0
wmi/inc/wmi_unified_dfs_api.h

@@ -69,4 +69,24 @@ QDF_STATUS wmi_extract_wlan_radar_event_info(void *wmi_hdl,
 		struct radar_event_info *wlan_radar_event,
 		uint32_t len);
 #endif
+
+/**
+ * wmi_send_usenol_pdev_param() - function to send usenol pdev param.
+ * @wmi_hdl: wmi handle
+ * @usenol: value of usenol
+ * @pdev: pointer to objmgr_pdev structure
+ *
+ * Return: QDF_STATUS
+ */
+#if defined(WLAN_DFS_FULL_OFFLOAD) && defined(QCA_DFS_NOL_OFFLOAD)
+QDF_STATUS wmi_send_usenol_pdev_param(void *wmi_hdl, bool usenol,
+				      struct wlan_objmgr_pdev *pdev);
+#else
+static inline QDF_STATUS
+wmi_send_usenol_pdev_param(void *wmi_hdl, bool usenol,
+			   struct wlan_objmgr_pdev *pdev)
+{
+	return QDF_STATUS_SUCCESS;
+}
+#endif
 #endif /* _WMI_UNIFIED_DFS_API_H_ */

+ 2 - 0
wmi/inc/wmi_unified_param.h

@@ -467,6 +467,7 @@ typedef enum {
 	WMI_HOST_VDEV_START_OK = 0,
 	WMI_HOST_VDEV_START_CHAN_INVALID,
 	WMI_HOST_VDEV_START_CHAN_BLOCKED,
+	WMI_HOST_VDEV_START_CHAN_DFS_VIOLATION,
 } WMI_HOST_VDEV_START_STATUS;
 
 /*
@@ -4863,6 +4864,7 @@ typedef enum {
 	wmi_pdev_param_esp_ba_window,
 	wmi_pdev_param_esp_airtime_fraction,
 	wmi_pdev_param_esp_ppdu_duration,
+	wmi_pdev_param_use_nol,
 	wmi_pdev_param_max,
 } wmi_conv_pdev_params_id;
 

+ 21 - 0
wmi/src/wmi_unified_dfs_api.c

@@ -27,6 +27,7 @@
 #include <wmi_unified_priv.h>
 #include <wlan_dfs_utils_api.h>
 #include <wmi_unified_dfs_api.h>
+#include <init_deinit_lmac.h>
 
 QDF_STATUS wmi_extract_dfs_cac_complete_event(void *wmi_hdl,
 		uint8_t *evt_buf,
@@ -73,3 +74,23 @@ QDF_STATUS wmi_extract_wlan_radar_event_info(void *wmi_hdl,
 }
 qdf_export_symbol(wmi_extract_dfs_radar_detection_event);
 #endif
+
+#if defined(WLAN_DFS_FULL_OFFLOAD) && defined(QCA_DFS_NOL_OFFLOAD)
+QDF_STATUS wmi_send_usenol_pdev_param(void *wmi_hdl, bool usenol,
+				      struct wlan_objmgr_pdev *pdev)
+{
+	struct pdev_params pparam;
+	int pdev_idx;
+	struct wmi_unified *wmi_handle = (struct wmi_unified *)wmi_hdl;
+
+	pdev_idx = lmac_get_pdev_idx(pdev);
+	if (pdev_idx < 0)
+		return QDF_STATUS_E_FAILURE;
+
+	qdf_mem_set(&pparam, sizeof(pparam), 0);
+	pparam.param_id = wmi_pdev_param_use_nol;
+	pparam.param_value = usenol;
+
+	return wmi_unified_pdev_param_send(wmi_handle, &pparam, pdev_idx);
+}
+#endif

+ 4 - 0
wmi/src/wmi_unified_tlv.c

@@ -8225,6 +8225,9 @@ static QDF_STATUS extract_vdev_scan_ev_param_tlv(wmi_unified_t wmi_handle,
 	case WMI_SCAN_REASON_SUSPENDED:
 		param->reason = SCAN_REASON_SUSPENDED;
 		break;
+	case WMI_SCAN_REASON_DFS_VIOLATION:
+		param->reason = SCAN_REASON_DFS_VIOLATION;
+		break;
 	case WMI_SCAN_REASON_MAX:
 		param->reason = SCAN_REASON_MAX;
 		break;
@@ -11878,6 +11881,7 @@ static void populate_pdev_param_tlv(uint32_t *pdev_param)
 #ifdef WLAN_RU26_SUPPORT
 	pdev_param[wmi_pdev_param_ru26_allowed] = WMI_PDEV_PARAM_RU26_ALLOWED;
 #endif
+	pdev_param[wmi_pdev_param_use_nol] = WMI_PDEV_PARAM_USE_NOL;
 }
 
 /**