Răsfoiți Sursa

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 ani în urmă
părinte
comite
495df60861
1 a modificat fișierele cu 5 adăugiri și 0 ștergeri
  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)) {