Forráskód Böngészése

qcacld-3.0: Switch to target if vdev up

Switch legacy vdev up to vdev mgr/target if vdev up

Remove wakelock since it is handled in target if.
Clean up legacy vdev up API.

Change-Id: I125b202e9a18ee3bf279fe4df7bc17b9ec7bf999
CRs-Fixed: 2516586
Jianmin Zhu 5 éve
szülő
commit
dd405695cd

+ 0 - 14
core/wma/inc/wma_internal.h

@@ -1395,20 +1395,6 @@ QDF_STATUS wma_send_vdev_stop_to_fw(t_wma_handle *wma, uint8_t vdev_id);
 
 int wma_get_arp_stats_handler(void *handle, uint8_t *data, uint32_t data_len);
 
-/**
- * wma_send_vdev_up_to_fw() - send the vdev up command to firmware
- * @wma: a reference to the global WMA handle
- * @params: the vdev up params to send to firmware
- * @bssid: the BssId to send to firmware
- *
- * This also releases the vdev start wakelock.
- *
- * Return: QDF_STATUS
- */
-QDF_STATUS wma_send_vdev_up_to_fw(t_wma_handle *wma,
-				  struct vdev_up_params *params,
-				  uint8_t bssid[QDF_MAC_ADDR_SIZE]);
-
 /**
  * wma_send_vdev_down_to_fw() - send the vdev down command to firmware
  * @wma: a reference to the global WMA handle

+ 6 - 5
core/wma/src/wma_dev_if.c

@@ -1094,7 +1094,6 @@ QDF_STATUS wma_vdev_start_resp_handler(struct vdev_mlme_obj *vdev_mlme,
 {
 	tp_wma_handle wma;
 	struct wma_txrx_node *iface;
-	struct vdev_up_params param = {0};
 	target_resource_config *wlan_res_cfg;
 	struct wlan_objmgr_psoc *psoc;
 #ifdef FEATURE_AP_MCC_CH_AVOIDANCE
@@ -1103,6 +1102,7 @@ QDF_STATUS wma_vdev_start_resp_handler(struct vdev_mlme_obj *vdev_mlme,
 	QDF_STATUS status;
 	enum vdev_assoc_type assoc_type = VDEV_ASSOC;
 	struct bss_params *bss_params;
+	struct vdev_mlme_obj *mlme_obj;
 
 	wma = cds_get_context(QDF_MODULE_ID_WMA);
 	if (!wma) {
@@ -1191,10 +1191,11 @@ QDF_STATUS wma_vdev_start_resp_handler(struct vdev_mlme_obj *vdev_mlme,
 		if (QDF_IS_STATUS_ERROR(status))
 			return QDF_STATUS_E_FAILURE;
 	}  else if (iface->type == WMI_VDEV_TYPE_OCB) {
-		param.vdev_id = rsp->vdev_id;
-		param.assoc_id = iface->aid;
-		if (wma_send_vdev_up_to_fw(wma, &param, iface->bssid) !=
-		    QDF_STATUS_SUCCESS) {
+		mlme_obj = wlan_vdev_mlme_get_cmpt_obj(iface->vdev);
+		mlme_obj->proto.sta.assoc_id = iface->aid;
+		qdf_mem_copy(mlme_obj->mgmt.generic.bssid, iface->bssid,
+			     QDF_MAC_ADDR_SIZE);
+		if (vdev_mgr_up_send(mlme_obj) != QDF_STATUS_SUCCESS) {
 			WMA_LOGE(FL("failed to send vdev up"));
 			policy_mgr_set_do_hw_mode_change_flag(
 				wma->psoc, false);

+ 12 - 5
core/wma/src/wma_mgmt.c

@@ -78,6 +78,7 @@
 #include "wmi_unified_bcn_api.h"
 #include <wlan_crypto_global_api.h>
 #include <wlan_mlme_main.h>
+#include <../../core/src/vdev_mgr_ops.h>
 
 #if !defined(REMOVE_PKT_LOG)
 #include <wlan_logging_sock_svc.h>
@@ -3068,13 +3069,19 @@ void wma_send_probe_rsp_tmpl(tp_wma_handle wma,
 
 QDF_STATUS wma_set_ap_vdev_up(tp_wma_handle wma, uint8_t vdev_id)
 {
-	struct vdev_up_params param = {0};
 	QDF_STATUS status = QDF_STATUS_SUCCESS;
+	struct vdev_mlme_obj *mlme_obj;
+	struct wlan_objmgr_vdev *vdev;
+	struct wma_txrx_node *iface;
+
+	iface = &wma->interfaces[vdev_id];
+	vdev = iface->vdev;
+	mlme_obj = wlan_vdev_mlme_get_cmpt_obj(vdev);
+	mlme_obj->proto.sta.assoc_id = 0;
+	qdf_mem_copy(mlme_obj->mgmt.generic.bssid, iface->bssid,
+		     QDF_MAC_ADDR_SIZE);
 
-	param.vdev_id = vdev_id;
-	param.assoc_id = 0;
-	status = wma_send_vdev_up_to_fw(wma, &param,
-					wma->interfaces[vdev_id].bssid);
+	status = vdev_mgr_up_send(mlme_obj);
 	if (QDF_IS_STATUS_ERROR(status)) {
 		WMA_LOGE(FL("failed to send vdev up"));
 		policy_mgr_set_do_hw_mode_change_flag(

+ 8 - 34
core/wma/src/wma_utils.c

@@ -3678,25 +3678,6 @@ static void wma_update_roam_offload_flag(tp_wma_handle wma, uint8_t vdev_id,
 	}
 }
 
-QDF_STATUS wma_send_vdev_up_to_fw(t_wma_handle *wma,
-				  struct vdev_up_params *params,
-				  uint8_t bssid[QDF_MAC_ADDR_SIZE])
-{
-	QDF_STATUS status;
-	struct wma_txrx_node *vdev;
-
-	if (!wma_is_vdev_valid(params->vdev_id)) {
-		WMA_LOGE("%s: Invalid vdev id:%d", __func__, params->vdev_id);
-		return QDF_STATUS_E_FAILURE;
-	}
-	wma_update_roam_offload_flag(wma, params->vdev_id, true);
-	vdev = &wma->interfaces[params->vdev_id];
-
-	status = wmi_unified_vdev_up_send(wma->wmi_handle, bssid, params);
-
-	return status;
-}
-
 QDF_STATUS wma_send_vdev_down_to_fw(t_wma_handle *wma, uint8_t vdev_id)
 {
 	QDF_STATUS status = QDF_STATUS_E_FAILURE;
@@ -3974,30 +3955,23 @@ void wma_remove_peer_on_add_bss_failure(struct bss_params *add_bss_params)
 QDF_STATUS wma_sta_vdev_up_send(struct vdev_mlme_obj *vdev_mlme,
 				uint16_t data_len, void *data)
 {
-	struct vdev_up_params param;
 	uint8_t vdev_id;
 	tp_wma_handle wma = cds_get_context(QDF_MODULE_ID_WMA);
 	QDF_STATUS status;
 	struct wma_txrx_node *iface;
-	struct vdev_mlme_mbss_11ax mbss_11ax = {0};
 
 	if (!wma) {
 		WMA_LOGE("%s wma handle is NULL", __func__);
 		return QDF_STATUS_E_INVAL;
 	}
 	vdev_id = wlan_vdev_get_id(vdev_mlme->vdev);
-	param.vdev_id = vdev_id;
 	iface = &wma->interfaces[vdev_id];
-	param.assoc_id = iface->aid;
-
-	mlme_get_mbssid_info(vdev_mlme->vdev, &mbss_11ax);
-	param.profile_idx = mbss_11ax.profile_idx;
-	param.profile_num = mbss_11ax.profile_num;
-	qdf_mem_copy(param.trans_bssid,
-		     mbss_11ax.trans_bssid,
+	vdev_mlme->proto.sta.assoc_id = iface->aid;
+	qdf_mem_copy(vdev_mlme->mgmt.generic.bssid, iface->bssid,
 		     QDF_MAC_ADDR_SIZE);
 
-	status = wma_send_vdev_up_to_fw(wma, &param, iface->bssid);
+	wma_update_roam_offload_flag(wma, vdev_id, true);
+	status = vdev_mgr_up_send(vdev_mlme);
 
 	if (QDF_IS_STATUS_ERROR(status)) {
 		WMA_LOGE("%s: Failed to send vdev up cmd: vdev %d bssid %pM",
@@ -4243,7 +4217,6 @@ QDF_STATUS wma_mon_mlme_vdev_start_continue(struct vdev_mlme_obj *vdev_mlme,
 QDF_STATUS wma_mon_mlme_vdev_up_send(struct vdev_mlme_obj *vdev_mlme,
 				     uint16_t data_len, void *data)
 {
-	struct vdev_up_params param;
 	uint8_t vdev_id;
 	tp_wma_handle wma = cds_get_context(QDF_MODULE_ID_WMA);
 	QDF_STATUS status;
@@ -4254,11 +4227,12 @@ QDF_STATUS wma_mon_mlme_vdev_up_send(struct vdev_mlme_obj *vdev_mlme,
 		return QDF_STATUS_E_INVAL;
 	}
 	vdev_id = wlan_vdev_get_id(vdev_mlme->vdev);
-	param.vdev_id = vdev_id;
 	iface = &wma->interfaces[vdev_id];
+	vdev_mlme->proto.sta.assoc_id = 0;
+	qdf_mem_copy(vdev_mlme->mgmt.generic.bssid, iface->bssid,
+		     QDF_MAC_ADDR_SIZE);
 
-	status = wma_send_vdev_up_to_fw(wma, &param, iface->bssid);
-
+	status = vdev_mgr_up_send(vdev_mlme);
 	if (QDF_IS_STATUS_ERROR(status))
 		WMA_LOGE("%s: Failed to send vdev up cmd: vdev %d bssid %pM",
 			 __func__, vdev_id, iface->bssid);