Преглед на файлове

qcacld-3.0: Consider last scan full scan results instead of new scan

Currently, if ACS_LAST_SCAN_AGEOUT_TIME is not provided by user then
the last_scan_ageout_time is updated to 0 and full scan is triggered
to find channel instead of using previous scan results.

Fix is to consider last full scan results for provided time in ms
via last_scan_ageout_time ini.

Change-Id: I0a38133a89339598a5be4ce0e2aa9120e0135502
CRs-Fixed: 3404676
Sheenam Monga преди 2 години
родител
ревизия
9583367ca5
променени са 1 файла, в които са добавени 12 реда и са изтрити 5 реда
  1. 12 5
      core/hdd/src/wlan_hdd_cfg80211.c

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

@@ -3428,10 +3428,11 @@ static bool wlan_hdd_check_is_acs_request_same(struct hdd_adapter *adapter,
 	struct nlattr *tb[QCA_WLAN_VENDOR_ATTR_ACS_MAX + 1];
 	uint8_t hw_mode, ht_enabled, ht40_enabled, vht_enabled, eht_enabled;
 	struct sap_config *sap_config;
-	uint32_t last_scan_ageout_time;
+	uint32_t last_scan_ageout_time = 0;
 	uint8_t ch_list_count;
 	uint16_t ch_width;
 	int ret, i, j;
+	struct wlan_objmgr_psoc *psoc;
 
 	ret = wlan_cfg80211_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_ACS_MAX, data,
 				      data_len,
@@ -3473,11 +3474,16 @@ static bool wlan_hdd_check_is_acs_request_same(struct hdd_adapter *adapter,
 	if (sap_config->acs_cfg.master_acs_cfg.ch_width != ch_width)
 		return false;
 
-	if (nla_get_u32(tb[QCA_WLAN_VENDOR_ATTR_ACS_LAST_SCAN_AGEOUT_TIME]))
+	if (nla_get_u32(tb[QCA_WLAN_VENDOR_ATTR_ACS_LAST_SCAN_AGEOUT_TIME])) {
 		last_scan_ageout_time =
 		nla_get_u32(tb[QCA_WLAN_VENDOR_ATTR_ACS_LAST_SCAN_AGEOUT_TIME]);
-	else
-		last_scan_ageout_time = 0;
+	} else {
+		psoc = wlan_vdev_get_psoc(adapter->vdev);
+		if (psoc)
+			wlan_scan_get_last_scan_ageout_time(
+							psoc,
+							&last_scan_ageout_time);
+	}
 	if (sap_config->acs_cfg.last_scan_ageout_time != last_scan_ageout_time)
 		return false;
 
@@ -3732,7 +3738,8 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy,
 		last_scan_ageout_time =
 		nla_get_u32(tb[QCA_WLAN_VENDOR_ATTR_ACS_LAST_SCAN_AGEOUT_TIME]);
 	else
-		last_scan_ageout_time = 0;
+		wlan_scan_get_last_scan_ageout_time(hdd_ctx->psoc,
+						    &last_scan_ageout_time);
 
 	if (ch_width == 320)
 		wlan_hdd_set_sap_acs_ch_width_320(sap_config);