Bladeren bron

qcacld-3.0: Reject TDLS operation, when it is disabled via INI

TDLS operations should not be allowed, when it is disabled
through INI param.
Reject TDLS operation, if it is disabled through INI param.

Change-Id: I9ee03d84d619312f869f75327ca977534ff5bb07
CRs-Fixed: 2164148
Kabilan Kannan 7 jaren geleden
bovenliggende
commit
1577230c1f
1 gewijzigde bestanden met toevoegingen van 12 en 0 verwijderingen
  1. 12 0
      core/hdd/src/wlan_hdd_tdls.c

+ 12 - 0
core/hdd/src/wlan_hdd_tdls.c

@@ -477,6 +477,12 @@ static int __wlan_hdd_cfg80211_tdls_mgmt(struct wiphy *wiphy,
 	if (wlan_hdd_validate_context(hdd_ctx))
 		return -EINVAL;
 
+	if (false == hdd_ctx->config->fEnableTDLSSupport) {
+		hdd_debug("TDLS Disabled in INI OR not enabled in FW. "
+			"Cannot process TDLS commands");
+		return -ENOTSUPP;
+	}
+
 	if (hdd_ctx->tdls_umac_comp_active)
 		return wlan_cfg80211_tdls_mgmt(hdd_ctx->hdd_pdev, dev,
 					       peer,
@@ -646,6 +652,12 @@ static int __wlan_hdd_cfg80211_tdls_oper(struct wiphy *wiphy,
 		return -EINVAL;
 	}
 
+	if (false == hdd_ctx->config->fEnableTDLSSupport) {
+		hdd_debug("TDLS Disabled in INI OR not enabled in FW. "
+			"Cannot process TDLS commands");
+		return -ENOTSUPP;
+	}
+
 	MTRACE(qdf_trace(QDF_MODULE_ID_HDD,
 			 TRACE_CODE_HDD_CFG80211_TDLS_OPER,
 			 adapter->session_id, oper));