Procházet zdrojové kódy

qcacmn: Update OCAC completion Host structure and processing routine

The OCAC completion event 'wmi_vdev_adfs_ocac_complete_event_fixed_param'
has been updated to include center frequencies of 2 segments in MHz for
165Mhz Agile mode.

Update the corresponding Host OCAC completion data structure
'vdev_adfs_complete_status' to include 2 center frequencies to support
165MHz Agile mode.

Also FW might send a delayed OCAC completion status after the Host has
configured a new agile channel. So all the OCAC completion events should be
validated if the status is received for the current agile channel.

Update the OCAC completion processing API to include 2 center frequencies
and chwidth so that, it is possible to check if the OCAC completion status
is received on current agile channel or an obsolete agile channel.

CRs-Fixed: 2705671
Change-Id: Iab8980f8d030120d107f068d890c9694d28ee98c
Vignesh U před 5 roky
rodič
revize
ace59f2d1f

+ 11 - 3
umac/dfs/core/src/dfs_zero_cac.h

@@ -572,11 +572,17 @@ void dfs_prepare_agile_precac_chan(struct wlan_dfs *dfs);
  * dfs_process_ocac_complete() - Process Off-Channel CAC complete indication.
  * @pdev :Pointer to wlan_objmgr_pdev structure.
  * @ocac_status: Off channel CAC complete status
- * @center_freq : Center Frequency of O-CAC done indication.
+ * @center_freq1 : For 20/40/80/160Mhz, it is the center of the corresponding
+ * band. For 80P80/165MHz, it is the center of the left 80MHz.
+ * @center_freq2 : It is valid and non-zero only for 80P80/165MHz. It indicates
+ * the Center Frequency of the right 80MHz segment.
+ * @chwidth : Width of the channel for which OCAC completion is received.
  */
 void dfs_process_ocac_complete(struct wlan_objmgr_pdev *pdev,
 			       uint32_t ocac_status,
-			       uint32_t center_freq);
+			       uint32_t center_freq1,
+			       uint32_t center_freq2,
+			       enum phy_ch_width chwidth);
 
 /**
  * dfs_get_ieeechan_for_agilecac() - Find an IEEE channel for agile CAC.
@@ -657,7 +663,9 @@ static inline void dfs_prepare_agile_precac_chan(struct wlan_dfs *dfs)
 static inline void
 dfs_process_ocac_complete(struct wlan_objmgr_pdev *pdev,
 			  uint32_t ocac_status,
-			  uint32_t center_freq)
+			  uint32_t center_freq1,
+			  uint32_t center_freq2,
+			  enum phy_ch_width chwidth)
 {
 }
 

+ 6 - 2
umac/dfs/dispatcher/inc/wlan_dfs_tgt_api.h

@@ -103,14 +103,18 @@ struct dfs_emulate_bang_radar_test_cmd {
  * @vdev_id: Physical device identifier
  * @chan_freq: Channel number
  * @chan_width: Channel Width
- * @center_freq: Center channel number
+ * @center_freq1 : For 20/40/80/160Mhz, it is the center of the corresponding
+ * band. For 80P80/165MHz, it is the center of the left 80MHz.
+ * @center_freq2 : It is valid and non-zero only for 80P80/165MHz. It indicates
+ * the Center Frequency of the right 80MHz segment.
  * @ocac_status: off channel cac status
  */
 struct vdev_adfs_complete_status {
 	uint32_t vdev_id;
 	uint32_t chan_freq;
 	uint32_t chan_width;
-	uint32_t center_freq;
+	uint32_t center_freq1;
+	uint32_t center_freq2;
 	uint32_t ocac_status;
 };
 

+ 3 - 1
umac/dfs/dispatcher/src/wlan_dfs_tgt_api.c

@@ -556,7 +556,9 @@ QDF_STATUS tgt_dfs_ocac_complete(struct wlan_objmgr_pdev *pdev,
 	}
 
 	dfs_process_ocac_complete(pdev, adfs_status->ocac_status,
-				  adfs_status->center_freq);
+				  adfs_status->center_freq1,
+				  adfs_status->center_freq2,
+				  adfs_status->chan_width);
 
 	return  QDF_STATUS_SUCCESS;
 }

+ 9 - 3
wmi/src/wmi_unified_tlv.c

@@ -12193,11 +12193,17 @@ extract_dfs_ocac_complete_event_tlv(wmi_unified_t wmi_handle,
 	ocac_complete_status = param_tlvs->fixed_param;
 	param->vdev_id = ocac_complete_status->vdev_id;
 	param->chan_freq = ocac_complete_status->chan_freq;
-	param->center_freq = ocac_complete_status->center_freq;
+	param->center_freq1 = ocac_complete_status->center_freq1;
+	param->center_freq2 = ocac_complete_status->center_freq2;
 	param->ocac_status = ocac_complete_status->status;
 	param->chan_width = ocac_complete_status->chan_width;
-	WMI_LOGD("processed ocac complete event vdev %d agile chan %d",
-		 param->vdev_id, param->center_freq);
+	WMI_LOGD("processed ocac complete event vdev %d"
+		 " agile chan %d %d width %d status %d",
+		 param->vdev_id,
+		 param->center_freq1,
+		 param->center_freq2,
+		 param->chan_width,
+		 param->ocac_status);
 
 	return QDF_STATUS_SUCCESS;
 }