浏览代码

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 3 年之前
父节点
当前提交
4e33f10a0c
共有 1 个文件被更改,包括 6 次插入2 次删除
  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;