Browse Source

qcacld-3.0: Set RTT responder role for SAP as per ini

Set RTT responder role for SAP as indicated by ini parameter

Change-Id: Ica0fcf027d8235654dda5d2e2065a90202621e6a
CRs-Fixed: 2167760
Naveen Rawat 7 years ago
parent
commit
1af0939d2e
2 changed files with 10 additions and 1 deletions
  1. 1 1
      core/hdd/inc/wlan_hdd_cfg.h
  2. 9 0
      core/hdd/src/wlan_hdd_main.c

+ 1 - 1
core/hdd/inc/wlan_hdd_cfg.h

@@ -9152,7 +9152,7 @@ enum hdd_link_speed_rpt_type {
  *
  * <----- fine_time_meas_cap (in bits) ----->
  *+----------+-----+-----+------+------+-------+-------+-----+-----+
- *|   9-31   |  8  |  7  |   5  |   4  |   3   |   2   |  1  |  0  |
+ *|   8-31   |  7  |  6  |   5  |   4  |   3   |   2   |  1  |  0  |
  *+----------+-----+-----+------+------+-------+-------+-----+-----+
  *| reserved | SAP | SAP |P2P-GO|P2P-GO|P2P-CLI|P2P-CLI| STA | STA |
  *|          |resp |init |resp  |init  |resp   |init   |resp |init |

+ 9 - 0
core/hdd/src/wlan_hdd_main.c

@@ -8495,6 +8495,7 @@ int hdd_start_ap_adapter(struct hdd_adapter *adapter)
 	QDF_STATUS status;
 	bool is_ssr = false;
 	int ret;
+	struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 
 	ENTER();
 
@@ -8523,6 +8524,14 @@ int hdd_start_ap_adapter(struct hdd_adapter *adapter)
 		hdd_sap_destroy_ctx(adapter);
 		return ret;
 	}
+
+	if (adapter->device_mode == QDF_SAP_MODE)
+		sme_cli_set_command(adapter->session_id,
+			WMI_VDEV_PARAM_ENABLE_DISABLE_RTT_RESPONDER_ROLE,
+			(bool)(hdd_ctx->config->fine_time_meas_cap &
+							WMI_FW_AP_RTT_RESPR),
+			VDEV_CMD);
+
 	status = hdd_init_ap_mode(adapter, is_ssr);
 
 	if (QDF_STATUS_SUCCESS != status) {