Explorar o código

qcacld-3.0: Do not allow NAN on passive channels

Current NAN is allowed on passive channels which is not
expected as passive channels does not allow initial
trnsmission.

To address above issue, do not allow NAN on passive
channels.

Change-Id: Ied7ba8eb38feb528209cafa6793aed93456989d6
CRs-Fixed: 3157369
Ashish %!s(int64=3) %!d(string=hai) anos
pai
achega
4e33f10a0c
Modificáronse 1 ficheiros con 6 adicións e 2 borrados
  1. 6 2
      components/nan/core/src/nan_api.c

+ 6 - 2
components/nan/core/src/nan_api.c

@@ -451,8 +451,12 @@ bool wlan_is_nan_allowed_on_freq(struct wlan_objmgr_pdev *pdev, uint32_t freq)
 	if (wlan_reg_is_freq_indoor(pdev, freq))
 		wlan_mlme_get_indoor_support_for_nan(wlan_pdev_get_psoc(pdev),
 						     &nan_allowed);
-	/* Check for dfs only if channel is not indoor */
-	else if (wlan_reg_is_dfs_for_freq(pdev, freq))
+	/*
+	 * Check for dfs only if channel is not indoor,
+	 * Check for passive channels as well
+	 */
+	else if (wlan_reg_is_dfs_for_freq(pdev, freq) ||
+		 wlan_reg_is_passive_for_freq(pdev, freq))
 		nan_allowed = false;
 
 	return nan_allowed;