Browse Source

qcacmn: Move mon mac filter func to mon ops structure

Monitor ops functions are different for version 1 and 2.
Move mon mac filter func ptr to mon ops structure so that
its initialized properly according to monitor version.

Change-Id: Ie07ae3b7d3e9923e463db503aaa8b3500c1e1eac
CRs-Fixed: 3456620
Jeevan Kukkalli 2 years ago
parent
commit
a913b30811

+ 3 - 3
dp/inc/cdp_txrx_ctrl.h

@@ -118,11 +118,11 @@ cdp_update_mon_mac_filter(ol_txrx_soc_handle soc,
 		return QDF_STATUS_E_FAILURE;
 		return QDF_STATUS_E_FAILURE;
 	}
 	}
 
 
-	if (!soc->ops->ctrl_ops ||
-	    !soc->ops->ctrl_ops->txrx_update_mon_mac_filter)
+	if (!soc->ops->mon_ops ||
+	    !soc->ops->mon_ops->txrx_update_mon_mac_filter)
 		return QDF_STATUS_E_FAILURE;
 		return QDF_STATUS_E_FAILURE;
 
 
-	return soc->ops->ctrl_ops->txrx_update_mon_mac_filter
+	return soc->ops->mon_ops->txrx_update_mon_mac_filter
 			(soc, vdev_id, cmd);
 			(soc, vdev_id, cmd);
 }
 }
 
 

+ 5 - 3
dp/inc/cdp_txrx_ops.h

@@ -952,9 +952,6 @@ struct cdp_ctrl_ops {
 						     uint32_t *mask,
 						     uint32_t *mask,
 						     uint32_t *mask_cont);
 						     uint32_t *mask_cont);
 #endif
 #endif
-	QDF_STATUS (*txrx_update_mon_mac_filter)(struct cdp_soc_t *soc,
-						 uint8_t vdev_id,
-						 uint32_t cmd);
 };
 };
 
 
 struct cdp_me_ops {
 struct cdp_me_ops {
@@ -995,6 +992,7 @@ struct cdp_me_ops {
  * @txrx_update_pdev_mon_telemetry_airtime_stats: update telemetry airtime
  * @txrx_update_pdev_mon_telemetry_airtime_stats: update telemetry airtime
  *                                                stats in monitor pdev
  *                                                stats in monitor pdev
  * @txrx_cfr_filter: Handler to configure host rx monitor status ring
  * @txrx_cfr_filter: Handler to configure host rx monitor status ring
+ * @txrx_update_mon_mac_filter: Handler to configure mon mac filter
  */
  */
 struct cdp_mon_ops {
 struct cdp_mon_ops {
 
 
@@ -1099,6 +1097,10 @@ struct cdp_mon_ops {
 				struct cdp_monitor_filter *filter_val,
 				struct cdp_monitor_filter *filter_val,
 				bool cfr_enable_monitor_mode);
 				bool cfr_enable_monitor_mode);
 #endif
 #endif
+
+	QDF_STATUS (*txrx_update_mon_mac_filter)(struct cdp_soc_t *soc,
+						 uint8_t vdev_id,
+						 uint32_t cmd);
 };
 };
 
 
 /**
 /**

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

@@ -1694,6 +1694,7 @@ struct cdp_mon_ops dp_ops_mon_2_0 = {
 	.txrx_update_pdev_mon_telemetry_airtime_stats =
 	.txrx_update_pdev_mon_telemetry_airtime_stats =
 			dp_pdev_update_telemetry_airtime_stats,
 			dp_pdev_update_telemetry_airtime_stats,
 #endif
 #endif
+	.txrx_update_mon_mac_filter = NULL,
 };
 };
 
 
 #ifdef QCA_MONITOR_OPS_PER_SOC_SUPPORT
 #ifdef QCA_MONITOR_OPS_PER_SOC_SUPPORT

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

@@ -6248,7 +6248,7 @@ void dp_mon_cdp_ops_register(struct dp_soc *soc)
 #endif
 #endif
 		if (target_type == TARGET_TYPE_QCN9000 ||
 		if (target_type == TARGET_TYPE_QCN9000 ||
 		    target_type == TARGET_TYPE_QCN9160)
 		    target_type == TARGET_TYPE_QCN9160)
-			ops->ctrl_ops->txrx_update_mon_mac_filter =
+			ops->mon_ops->txrx_update_mon_mac_filter =
 					dp_update_mon_mac_filter;
 					dp_update_mon_mac_filter;
 		break;
 		break;
 	case TARGET_TYPE_QCN9224:
 	case TARGET_TYPE_QCN9224: