소스 검색

qcacld-3.0: Add SRD channel check in restart SAP

Currently the driver doesn't have a check to bring
up a SAP on STA SCC channel if its a SRD channel
and does force SCC on it, even if SRD master mode
is not supported.

Fix is to check the SRD ini before SAP bringup
on the STA channel

Change-Id: I17f7df9ed973ecc6669f0d36a8c390c71624019b
CRs-Fixed: 2302737
Abhinav Kumar 6 년 전
부모
커밋
1a15ed2800
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 5 1
      core/hdd/src/wlan_hdd_hostapd.c

+ 5 - 1
core/hdd/src/wlan_hdd_hostapd.c

@@ -5618,7 +5618,11 @@ static int __wlan_hdd_cfg80211_start_ap(struct wiphy *wiphy,
 		hdd_err("SAP not allowed on DFS channel!!");
 		return -EINVAL;
 	}
-
+	if (!reg_is_etsi13_srd_chan_allowed_master_mode(hdd_ctx->hdd_pdev) &&
+	     reg_is_etsi13_srd_chan(hdd_ctx->hdd_pdev, channel)) {
+		hdd_err("SAP not allowed on SRD channel.");
+		return -EINVAL;
+	}
 	if (cds_is_sub_20_mhz_enabled()) {
 		enum channel_state ch_state;
 		enum phy_ch_width sub_20_ch_width = CH_WIDTH_INVALID;