Эх сурвалжийг харах

qcacld-3.0: Enable RTSCTS param for NDI vdev

Currently, host driver sets RTS-CTS param and sent it to firmware
as WMI_VDEV_PARAM_ENABLE_RTSCTS for STA and NAN vdev only in
start_adapter when interface is up.
But with the vendor cmd NL80211_VENDOR_SUBCMD_NDP, driver creates
the NDI vdev and start the adapter. Hence, RTSCTS is never set for
NDI vdev.

So, to fix this, set the RTSCTS param in ndi_start and sent it to
firmware.

Change-Id: I5434e5649fe4f30bf52ee98aa1ca4d0b34857987
CRs-Fixed: 3298206
Rahul Gusain 2 жил өмнө
parent
commit
1f701fbe39

+ 13 - 0
core/hdd/src/wlan_hdd_nan_datapath.c

@@ -610,6 +610,7 @@ int hdd_init_nan_data_mode(struct hdd_adapter *adapter)
 	bool bval = false;
 	uint8_t enable_sifs_burst = 0;
 	struct wlan_objmgr_vdev *vdev;
+	uint16_t rts_profile = 0;
 
 	ret_val = hdd_vdev_create(adapter);
 	if (ret_val) {
@@ -656,6 +657,7 @@ int hdd_init_nan_data_mode(struct hdd_adapter *adapter)
 
 	set_bit(WMM_INIT_DONE, &adapter->event_flags);
 
+	/* ENABLE SIFS BURST */
 	status = ucfg_get_enable_sifs_burst(hdd_ctx->psoc, &enable_sifs_burst);
 	if (!QDF_IS_STATUS_SUCCESS(status))
 		hdd_err("Failed to get sifs burst value, use default");
@@ -667,6 +669,17 @@ int hdd_init_nan_data_mode(struct hdd_adapter *adapter)
 	if (0 != ret_val)
 		hdd_err("WMI_PDEV_PARAM_BURST_ENABLE set failed %d", ret_val);
 
+	/* RTS CTS PARAM  */
+	status = ucfg_fwol_get_rts_profile(hdd_ctx->psoc, &rts_profile);
+	if (QDF_IS_STATUS_ERROR(status))
+		hdd_err("FAILED TO GET RTSCTS Profile status:%d", status);
+
+	ret_val = sme_cli_set_command(adapter->vdev_id,
+				      WMI_VDEV_PARAM_ENABLE_RTSCTS, rts_profile,
+				      VDEV_CMD);
+	if (ret_val)
+		hdd_err("FAILED TO SET RTSCTS Profile ret:%d", ret_val);
+
 	hdd_set_netdev_flags(adapter);
 
 	update_ndi_state(adapter, NAN_DATA_NDI_CREATING_STATE);