Sfoglia il codice sorgente

qcacmn: Add code to send rate mask info to FW

Add support to send rate mask information to FW using utils API

Change-Id: Ibb62e4f92b0c3e656cc11ae941c58723a43fbf12
Akshay Kosigi 6 anni fa
parent
commit
658d712ace

+ 0 - 21
umac/mlme/vdev_mgr/core/src/vdev_mgr_ops.c

@@ -280,22 +280,6 @@ QDF_STATUS vdev_mgr_stop_send(struct vdev_mlme_obj *mlme_obj)
 	return status;
 }
 
-static QDF_STATUS vdev_mgr_config_ratemask_update(
-				struct vdev_mlme_obj *mlme_obj,
-				struct config_ratemask_params *param)
-{
-	struct wlan_objmgr_vdev *vdev;
-
-	vdev = mlme_obj->vdev;
-	param->vdev_id = wlan_vdev_get_id(vdev);
-	param->type = mlme_obj->mgmt.rate_info.type;
-	param->lower32 = mlme_obj->mgmt.rate_info.lower32;
-	param->higher32 = mlme_obj->mgmt.rate_info.higher32;
-	param->lower32_2 = mlme_obj->mgmt.rate_info.lower32_2;
-
-	return QDF_STATUS_SUCCESS;
-}
-
 static QDF_STATUS vdev_mgr_bcn_tmpl_param_update(
 				struct vdev_mlme_obj *mlme_obj,
 				struct beacon_tmpl_params *param)
@@ -341,7 +325,6 @@ QDF_STATUS vdev_mgr_up_send(struct vdev_mlme_obj *mlme_obj)
 {
 	QDF_STATUS status;
 	struct vdev_up_params param = {0};
-	struct config_ratemask_params rm_param = {0};
 	struct sta_ps_params ps_param = {0};
 	struct beacon_tmpl_params bcn_tmpl_param = {0};
 	enum QDF_OPMODE opmode;
@@ -366,10 +349,6 @@ QDF_STATUS vdev_mgr_up_send(struct vdev_mlme_obj *mlme_obj)
 		vdev_mgr_sta_ps_param_update(mlme_obj, &ps_param);
 		status = tgt_vdev_mgr_sta_ps_param_send(mlme_obj, &ps_param);
 
-	} else if (opmode == QDF_SAP_MODE) {
-		vdev_mgr_config_ratemask_update(mlme_obj, &rm_param);
-		status = tgt_vdev_mgr_config_ratemask_cmd_send(mlme_obj,
-							       &rm_param);
 	}
 
 	status = tgt_vdev_mgr_beacon_tmpl_send(mlme_obj, &bcn_tmpl_param);

+ 1 - 0
umac/mlme/vdev_mgr/dispatcher/inc/wlan_vdev_mgr_ucfg_api.h

@@ -97,6 +97,7 @@ enum wlan_mlme_cfg_id {
 	WLAN_MLME_CFG_BCN_TX_RATE,
 	WLAN_MLME_CFG_2G_VHT,
 	WLAN_MLME_CFG_11AX_STUB,
+	WLAN_MLME_CFG_RATEMASK_CAPS,
 	WLAN_MLME_CFG_MAX
 };
 

+ 21 - 0
umac/mlme/vdev_mgr/dispatcher/src/wlan_vdev_mgr_utils_api.c

@@ -27,6 +27,22 @@
 #include <cdp_txrx_cmn_struct.h>
 #include <wlan_mlme_dbg.h>
 
+static QDF_STATUS vdev_mgr_config_ratemask_update(
+				struct vdev_mlme_obj *mlme_obj,
+				struct config_ratemask_params *param)
+{
+	struct wlan_objmgr_vdev *vdev;
+
+	vdev = mlme_obj->vdev;
+	param->vdev_id = wlan_vdev_get_id(vdev);
+	param->type = mlme_obj->mgmt.rate_info.type;
+	param->lower32 = mlme_obj->mgmt.rate_info.lower32;
+	param->higher32 = mlme_obj->mgmt.rate_info.higher32;
+	param->lower32_2 = mlme_obj->mgmt.rate_info.lower32_2;
+
+	return QDF_STATUS_SUCCESS;
+}
+
 enum wlan_op_mode
 wlan_util_vdev_get_cdp_txrx_opmode(struct wlan_objmgr_vdev *vdev)
 {
@@ -63,6 +79,7 @@ wlan_util_vdev_mlme_set_param(struct vdev_mlme_obj *vdev_mlme,
 	int is_wmi_cmd = 0;
 	int ret = QDF_STATUS_SUCCESS;
 	struct vdev_set_params param = {0};
+	struct config_ratemask_params rm_param = {0};
 
 	if (!vdev_mlme) {
 		mlme_err("VDEV MLME is NULL");
@@ -279,6 +296,10 @@ wlan_util_vdev_mlme_set_param(struct vdev_mlme_obj *vdev_mlme,
 	case WLAN_MLME_CFG_RATEMASK_LOWER32_2:
 		mlme_mgmt->rate_info.lower32_2 = mlme_cfg.value;
 		break;
+	case WLAN_MLME_CFG_RATEMASK_CAPS:
+		vdev_mgr_config_ratemask_update(vdev_mlme, &rm_param);
+		tgt_vdev_mgr_config_ratemask_cmd_send(vdev_mlme, &rm_param);
+		break;
 	case WLAN_MLME_CFG_BCN_TX_RATE:
 		mlme_mgmt->rate_info.bcn_tx_rate = mlme_cfg.value;
 		is_wmi_cmd = 1;