소스 검색

qcacld-3.0: Prevent NS offload when active offload is disabled

Currently, Host configures the NS entries through vendor command
where host do not check the active offload is enable or disabled.
Hence it is not configuring according to active offload ini.
As part of fix, Cache the vendor command value and check whether
active offload is enabled or not before configuration to fwr.

Change-Id: Icb11e43198a75975418a2c9ed95d5f1df05ce0c5
CRs-fixed: 2105071
Mukul Sharma 7 년 전
부모
커밋
495df60861
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      core/hdd/src/wlan_hdd_cfg80211.c

+ 5 - 0
core/hdd/src/wlan_hdd_cfg80211.c

@@ -7124,6 +7124,11 @@ __wlan_hdd_cfg80211_set_ns_offload(struct wiphy *wiphy,
 		return -EINVAL;
 	}
 
+	if (!hdd_ctx->config->active_mode_offload) {
+		hdd_warn("Active mode offload is disabled");
+		return -EINVAL;
+	}
+
 	if (hdd_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_ND_OFFLOAD_MAX,
 			  (struct nlattr *)data,
 			  data_len, ns_offload_set_policy)) {