瀏覽代碼

qcacmn: Add TxBF caps in target_if/mlme

Add change to frame TxBF caps from vht_info
in target_if and send to FW

CRs-Fixed: 2412867
Change-Id: Ibc26b96cad2a5e72eb293f5a5d6847f19122ea0f
Naga 6 年之前
父節點
當前提交
df242752b2

+ 54 - 0
target_if/mlme/vdev_mgr/src/target_if_vdev_mgr_tx_ops.c

@@ -174,6 +174,53 @@ struct wmi_unified
 	return wmi_handle;
 }
 
+static inline uint32_t
+target_if_vdev_mlme_build_txbf_caps(struct wlan_objmgr_vdev *vdev)
+{
+	uint32_t txbf_cap;
+	uint32_t subfer;
+	uint32_t mubfer;
+	uint32_t subfee;
+	uint32_t mubfee;
+	uint32_t implicit_bf;
+	uint32_t sounding_dimension;
+	uint32_t bfee_sts_cap;
+
+	txbf_cap = 0;
+	/*
+	 * ensure to set these after mlme component is attached to objmgr
+	 */
+	wlan_util_vdev_get_param(vdev, WLAN_MLME_CFG_SUBFEE, &subfee);
+	wlan_util_vdev_get_param(vdev, WLAN_MLME_CFG_MUBFEE, &mubfee);
+	wlan_util_vdev_get_param(vdev, WLAN_MLME_CFG_SUBFER, &subfer);
+	wlan_util_vdev_get_param(vdev, WLAN_MLME_CFG_MUBFER, &mubfer);
+	wlan_util_vdev_get_param(vdev, WLAN_MLME_CFG_BFEE_STS_CAP,
+			&bfee_sts_cap);
+	wlan_util_vdev_get_param(vdev, WLAN_MLME_CFG_IMLICIT_BF,
+			&implicit_bf);
+	wlan_util_vdev_get_param(vdev, WLAN_MLME_CFG_SOUNDING_DIM,
+			&sounding_dimension);
+
+	WMI_HOST_TXBF_CONF_SU_TX_BFEE_SET(txbf_cap, subfee);
+	WMI_HOST_TXBF_CONF_MU_TX_BFEE_SET(txbf_cap, mubfee);
+	WMI_HOST_TXBF_CONF_SU_TX_BFER_SET(txbf_cap, subfer);
+	WMI_HOST_TXBF_CONF_MU_TX_BFER_SET(txbf_cap, mubfer);
+	WMI_HOST_TXBF_CONF_STS_CAP_SET(txbf_cap, bfee_sts_cap);
+	WMI_HOST_TXBF_CONF_IMPLICIT_BF_SET(txbf_cap, implicit_bf);
+	WMI_HOST_TXBF_CONF_BF_SND_DIM_SET(txbf_cap, sounding_dimension);
+
+	mlme_debug("VHT su bfee:%d mu bfee:%d su bfer:%d "
+		   "mu bfer:%d impl bf:%d sounding dim:%d",
+		   WMI_HOST_TXBF_CONF_SU_TX_BFEE_GET(txbf_cap),
+		   WMI_HOST_TXBF_CONF_MU_TX_BFEE_GET(txbf_cap),
+		   WMI_HOST_TXBF_CONF_SU_TX_BFER_GET(txbf_cap),
+		   WMI_HOST_TXBF_CONF_MU_TX_BFER_GET(txbf_cap),
+		   WMI_HOST_TXBF_CONF_IMPLICIT_BF_GET(txbf_cap),
+		   WMI_HOST_TXBF_CONF_BF_SND_DIM_GET(txbf_cap));
+
+	return txbf_cap;
+}
+
 static inline uint32_t
 target_if_vdev_mlme_id_2_wmi(uint32_t cfg_id)
 {
@@ -277,6 +324,8 @@ static QDF_STATUS target_if_vdev_mgr_set_param_send(
 	}
 	param_id = target_if_vdev_mlme_id_2_wmi(param->param_id);
 	param->param_id = param_id;
+	if (param->param_id == wmi_vdev_param_txbf)
+		param->param_value = target_if_vdev_mlme_build_txbf_caps(vdev);
 
 	status = wmi_unified_vdev_set_param_send(wmi_handle, param);
 
@@ -543,6 +592,11 @@ static QDF_STATUS target_if_vdev_mgr_up_send(
 	if (QDF_IS_STATUS_ERROR(status))
 		mlme_err("VDEV_%d: Failed to set beacon interval!", vdev_id);
 
+	sparam.param_id = WLAN_MLME_CFG_TXBF_CAPS;
+	status = target_if_vdev_mgr_set_param_send(vdev, &sparam);
+	if (QDF_IS_STATUS_ERROR(status))
+		mlme_err("VDEV_%d: Failed to set TxBF caps!", vdev_id);
+
 	ucfg_wlan_vdev_mgr_get_param_bssid(vdev, bssid);
 
 	status = wmi_unified_vdev_up_send(wmi_handle, bssid, param);

+ 2 - 0
umac/mlme/include/wlan_vdev_mlme.h

@@ -115,6 +115,7 @@ struct vdev_mlme_proto_bss_color {
  * @mubfee: mu beam formee capability
  * @implicit_bf: Implicit BF support
  * @sounding_dimension: Beamformer number of sounding dimension
+ * @bfee_sts_cap: beam formee STA capability
  * @en_2gvht: 256 qam status
  * @allow_vht: vht capability status
  */
@@ -126,6 +127,7 @@ struct vdev_mlme_vht_info {
 	uint8_t  mubfee;
 	uint8_t  implicit_bf;
 	uint8_t  sounding_dimension;
+	uint8_t  bfee_sts_cap;
 	uint8_t  en_2gvht;
 	bool     allow_vht;
 };

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

@@ -47,6 +47,7 @@ enum wlan_mlme_cfg_id {
 	WLAN_MLME_CFG_MUBFEE,
 	WLAN_MLME_CFG_IMLICIT_BF,
 	WLAN_MLME_CFG_SOUNDING_DIM,
+	WLAN_MLME_CFG_BFEE_STS_CAP,
 	WLAN_MLME_CFG_TXBF_CAPS,
 	WLAN_MLME_CFG_HT_CAPS,
 	WLAN_MLME_CFG_HE_OPS,

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

@@ -142,6 +142,9 @@ wlan_util_vdev_mlme_set_param(struct vdev_mlme_obj *vdev_mlme,
 	case WLAN_MLME_CFG_SOUNDING_DIM:
 		mlme_proto->vht_info.sounding_dimension = mlme_cfg.value;
 		break;
+	case WLAN_MLME_CFG_BFEE_STS_CAP:
+		mlme_proto->vht_info.bfee_sts_cap = mlme_cfg.value;
+		break;
 	case WLAN_MLME_CFG_TXBF_CAPS:
 		is_wmi_cmd = 1;
 		break;
@@ -380,6 +383,9 @@ void wlan_util_vdev_mlme_get_param(struct vdev_mlme_obj *vdev_mlme,
 	case WLAN_MLME_CFG_SOUNDING_DIM:
 		*value = mlme_proto->vht_info.sounding_dimension;
 		break;
+	case WLAN_MLME_CFG_BFEE_STS_CAP:
+		*value = mlme_proto->vht_info.bfee_sts_cap;
+		break;
 	case WLAN_MLME_CFG_HT_CAPS:
 		*value = mlme_proto->ht_info.ht_caps;
 		break;