Selaa lähdekoodia

qcacmn: TWT componentization changes

Include relevant header for MAX_SESSIONS and use
the correct build flag to retrieve session params.

CRs-Fixed: 3136148
Change-Id: I28ef98a67cbe479c5d8be93c49f9ae6ce63ba982
Manoj Ekbote 3 vuotta sitten
vanhempi
sitoutus
e78a527ac1

+ 22 - 10
target_if/twt/src/target_if_twt_evt.c

@@ -31,7 +31,8 @@ target_if_twt_en_complete_event_handler(ol_scn_t scn,
 {
 	wmi_unified_t wmi_handle;
 	struct wlan_objmgr_psoc *psoc;
-	struct wlan_lmac_if_twt_rx_ops *rx_ops;
+	struct wlan_lmac_if_rx_ops *rx_ops;
+	struct wlan_lmac_if_twt_rx_ops *twt_rx_ops;
 	struct twt_enable_complete_event_param event;
 	QDF_STATUS status;
 
@@ -48,9 +49,14 @@ target_if_twt_en_complete_event_handler(ol_scn_t scn,
 		return -EINVAL;
 	}
 
-	rx_ops = wlan_twt_get_rx_ops(psoc);
-	if (!rx_ops || !rx_ops->twt_enable_comp_cb) {
-		target_if_err("TWT rx_ops is NULL");
+	rx_ops = wlan_psoc_get_lmac_if_rxops(psoc);
+	if (!rx_ops) {
+		target_if_err("rx_ops is NULL");
+		return -EINVAL;
+	}
+	twt_rx_ops =  &rx_ops->twt_rx_ops;
+	if (!twt_rx_ops || !twt_rx_ops->twt_enable_comp_cb) {
+		target_if_err("TWT rx_ops comp_cb is NULL");
 		return -EINVAL;
 	}
 
@@ -67,7 +73,7 @@ target_if_twt_en_complete_event_handler(ol_scn_t scn,
 		goto end;
 	}
 
-	status = rx_ops->twt_enable_comp_cb(psoc, &event);
+	status = twt_rx_ops->twt_enable_comp_cb(psoc, &event);
 
 end:
 	return qdf_status_to_os_return(status);
@@ -79,7 +85,8 @@ target_if_twt_disable_comp_event_handler(ol_scn_t scn,
 {
 	wmi_unified_t wmi_handle;
 	struct wlan_objmgr_psoc *psoc;
-	struct wlan_lmac_if_twt_rx_ops *rx_ops;
+	struct wlan_lmac_if_rx_ops *rx_ops;
+	struct wlan_lmac_if_twt_rx_ops *twt_rx_ops;
 	struct twt_disable_complete_event_param event;
 	QDF_STATUS status;
 
@@ -96,9 +103,14 @@ target_if_twt_disable_comp_event_handler(ol_scn_t scn,
 		return -EINVAL;
 	}
 
-	rx_ops = wlan_twt_get_rx_ops(psoc);
-	if (!rx_ops || !rx_ops->twt_disable_comp_cb) {
-		target_if_err("TWT rx_ops is NULL");
+	rx_ops = wlan_psoc_get_lmac_if_rxops(psoc);
+	if (!rx_ops) {
+		target_if_err("rx_ops is NULL");
+		return -EINVAL;
+	}
+	twt_rx_ops =  &rx_ops->twt_rx_ops;
+	if (!twt_rx_ops || !twt_rx_ops->twt_disable_comp_cb) {
+		target_if_err("TWT rx_ops comp_cb is NULL");
 		return -EINVAL;
 	}
 
@@ -115,7 +127,7 @@ target_if_twt_disable_comp_event_handler(ol_scn_t scn,
 		goto end;
 	}
 
-	status = rx_ops->twt_disable_comp_cb(psoc, &event);
+	status = twt_rx_ops->twt_disable_comp_cb(psoc, &event);
 
 end:
 	return qdf_status_to_os_return(status);

+ 1 - 0
umac/cp_stats/core/src/wlan_cp_stats_comp_handler.c

@@ -31,6 +31,7 @@
 #include "wlan_cp_stats_defs.h"
 #include <wlan_cp_stats_ucfg_api.h>
 #include <wlan_cp_stats_utils_api.h>
+#include <wmi_unified_twt_param.h>
 
 static QDF_STATUS
 wlan_cp_stats_psoc_comp_obj_config

+ 2 - 0
umac/cp_stats/core/src/wlan_cp_stats_defs.h

@@ -40,6 +40,8 @@
 #include <wlan_cp_stats_public_structs.h>
 #ifdef WLAN_FEATURE_MIB_STATS
 #include <wlan_cp_stats_mc_defs.h>
+#else
+#include <wlan_cp_stats_ic_defs.h>
 #endif
 
 /* noise floor */

+ 2 - 2
umac/cp_stats/core/src/wlan_cp_stats_obj_mgr_handler.c

@@ -463,6 +463,7 @@ wlan_cp_stats_send_infra_cp_req(struct wlan_objmgr_psoc *psoc,
 	}
 	return tx_ops->send_req_infra_cp_stats(psoc, req);
 }
+#endif /* WLAN_SUPPORT_INFRA_CTRL_PATH_STATS */
 
 #if defined(WLAN_SUPPORT_TWT) && defined (WLAN_TWT_CONV_SUPPORTED)
 /**
@@ -732,6 +733,5 @@ wlan_cp_stats_twt_get_peer_session_params(struct wlan_objmgr_psoc *psoc,
 								params);
 	return num_twt_session;
 }
-#endif
-#endif /* WLAN_SUPPORT_INFRA_CTRL_PATH_STATS */
+#endif /* WLAN_SUPPORT_TWT */
 

+ 2 - 1
umac/cp_stats/core/src/wlan_cp_stats_obj_mgr_handler.h

@@ -165,12 +165,13 @@ wlan_cp_stats_infra_cp_get_context(struct wlan_objmgr_psoc *psoc,
 QDF_STATUS
 wlan_cp_stats_send_infra_cp_req(struct wlan_objmgr_psoc *psoc,
 				struct infra_cp_stats_cmd_info *req);
+#endif /* WLAN_SUPPORT_INFRA_CTRL_PATH_STATS */
 
 #if defined(WLAN_SUPPORT_TWT) && defined (WLAN_TWT_CONV_SUPPORTED)
 int wlan_cp_stats_twt_get_peer_session_params(
 					struct wlan_objmgr_psoc *psoc,
 					struct twt_session_stats_info *params);
 #endif
-#endif /* WLAN_SUPPORT_INFRA_CTRL_PATH_STATS */
+
 #endif /* QCA_SUPPORT_CP_STATS */
 #endif /* __WLAN_CP_STATS_OBJ_MGR_HANDLER_H__ */

+ 1 - 1
umac/cp_stats/dispatcher/src/wlan_cp_stats_ucfg_api.c

@@ -41,6 +41,7 @@ ucfg_send_infra_cp_stats_request(struct wlan_objmgr_vdev *vdev,
 {
 	return wlan_cp_stats_send_infra_cp_req(wlan_vdev_get_psoc(vdev), req);
 }
+#endif /* WLAN_SUPPORT_INFRA_CTRL_PATH_STATS */
 
 #if defined(WLAN_SUPPORT_TWT) && defined (WLAN_TWT_CONV_SUPPORTED)
 int ucfg_cp_stats_twt_get_peer_session_params(
@@ -50,4 +51,3 @@ int ucfg_cp_stats_twt_get_peer_session_params(
 	return wlan_cp_stats_twt_get_peer_session_params(psoc_obj, params);
 }
 #endif
-#endif /* WLAN_SUPPORT_INFRA_CTRL_PATH_STATS */