Parcourir la source

qcacmn: Move cfr mon filter cdp func ptr to mon ops structure

Move cfr monitor filter cdp func ptr to cdp mon ops structure.
cfr monitor filter cdp function is different for 1.0 and 2.0
hence moving the func ptr to mon ops structure ensures that
func ptr is initialized appropriately.

Change-Id: I82b9c85e96f2f219521ae6ed908ade120081c748
CRs-Fixed: 3428791
Jeevan Kukkalli il y a 2 ans
Parent
commit
34bcece450

+ 2 - 2
dp/inc/cdp_txrx_ctrl.h

@@ -933,10 +933,10 @@ cdp_cfr_filter(ol_txrx_soc_handle soc,
 		return;
 	}
 
-	if (!soc->ops->cfr_ops || !soc->ops->cfr_ops->txrx_cfr_filter)
+	if (!soc->ops->mon_ops || !soc->ops->mon_ops->txrx_cfr_filter)
 		return;
 
-	soc->ops->cfr_ops->txrx_cfr_filter(soc, pdev_id, enable, filter_val,
+	soc->ops->mon_ops->txrx_cfr_filter(soc, pdev_id, enable, filter_val,
 					   cfr_enable_monitor_mode);
 }
 

+ 9 - 6
dp/inc/cdp_txrx_ops.h

@@ -990,6 +990,7 @@ struct cdp_me_ops {
  *                                           in monitor pdev
  * @txrx_update_pdev_mon_telemetry_airtime_stats: update telemetry airtime
  *                                                stats in monitor pdev
+ * @txrx_cfr_filter: Handler to configure host rx monitor status ring
  */
 struct cdp_mon_ops {
 
@@ -1086,6 +1087,14 @@ struct cdp_mon_ops {
 		(struct cdp_soc_t *soc,
 		 uint8_t pdev_id);
 #endif
+
+#if defined(WLAN_CFR_ENABLE) && defined(WLAN_ENH_CFR_ENABLE)
+	void (*txrx_cfr_filter)(struct cdp_soc_t *soc_hdl,
+				uint8_t pdev_id,
+				bool enable,
+				struct cdp_monitor_filter *filter_val,
+				bool cfr_enable_monitor_mode);
+#endif
 };
 
 /**
@@ -2257,18 +2266,12 @@ struct cdp_rx_offld_ops {
 #if defined(WLAN_CFR_ENABLE) && defined(WLAN_ENH_CFR_ENABLE)
 /**
  * struct cdp_cfr_ops - host cfr ops
- * @txrx_cfr_filter: Handler to configure host rx monitor status ring
  * @txrx_get_cfr_rcc: Handler to get CFR mode
  * @txrx_set_cfr_rcc: Handler to enable/disable CFR mode
  * @txrx_get_cfr_dbg_stats: Handler to get debug statistics for CFR mode
  * @txrx_clear_cfr_dbg_stats: Handler to clear debug statistics for CFR mode
  */
 struct cdp_cfr_ops {
-	void (*txrx_cfr_filter)(struct cdp_soc_t *soc_hdl,
-				uint8_t pdev_id,
-				bool enable,
-				struct cdp_monitor_filter *filter_val,
-				bool cfr_enable_monitor_mode);
 	bool (*txrx_get_cfr_rcc)(struct cdp_soc_t *soc_hdl,
 				 uint8_t pdev_id);
 	void (*txrx_set_cfr_rcc)(struct cdp_soc_t *soc_hdl,

+ 0 - 1
dp/wifi3.0/dp_main.c

@@ -10373,7 +10373,6 @@ static struct cdp_pflow_ops dp_ops_pflow = {
 
 #if defined(WLAN_CFR_ENABLE) && defined(WLAN_ENH_CFR_ENABLE)
 static struct cdp_cfr_ops dp_ops_cfr = {
-	.txrx_cfr_filter = NULL,
 	.txrx_get_cfr_rcc = dp_get_cfr_rcc,
 	.txrx_set_cfr_rcc = dp_set_cfr_rcc,
 	.txrx_get_cfr_dbg_stats = dp_get_cfr_dbg_stats,

+ 1 - 1
dp/wifi3.0/monitor/1.0/dp_mon_filter_1.0.c

@@ -1138,6 +1138,6 @@ static void dp_cfr_filter_1_0(struct cdp_soc_t *soc_hdl,
 
 void dp_cfr_filter_register_1_0(struct cdp_ops *ops)
 {
-	ops->cfr_ops->txrx_cfr_filter = dp_cfr_filter_1_0;
+	ops->mon_ops->txrx_cfr_filter = dp_cfr_filter_1_0;
 }
 #endif

+ 1 - 1
dp/wifi3.0/monitor/2.0/dp_mon_filter_2.0.c

@@ -3404,6 +3404,6 @@ static void dp_cfr_filter_2_0(struct cdp_soc_t *soc_hdl,
 
 void dp_cfr_filter_register_2_0(struct cdp_ops *ops)
 {
-	ops->cfr_ops->txrx_cfr_filter = dp_cfr_filter_2_0;
+	ops->mon_ops->txrx_cfr_filter = dp_cfr_filter_2_0;
 }
 #endif

+ 0 - 3
dp/wifi3.0/monitor/dp_mon.c

@@ -6304,9 +6304,6 @@ void dp_mon_cdp_ops_deregister(struct dp_soc *soc)
 
 	dp_mon_cdp_mon_ops_deregister(ops);
 
-#if defined(WLAN_CFR_ENABLE) && defined(WLAN_ENH_CFR_ENABLE)
-	ops->cfr_ops->txrx_cfr_filter = NULL;
-#endif
 	ops->cmn_drv_ops->txrx_set_monitor_mode = NULL;
 	ops->cmn_drv_ops->txrx_get_mon_vdev_from_pdev = NULL;
 #ifdef DP_PEER_EXTENDED_API