Browse Source

qcacmn: Use freq hint in scan for ssid

When Scan db reaches max size, driver deletes the oldest node,
so chances are that BSS on 1st freq scanned is removed.

This lead to scan for SSID, which will do a scan again on
all freqs, and thus we end up in flushing the entry again.

TO fix this use freq hint to scan for ssid to quickly find the
AP so that required AP remains in scan database as it will
be the latest entry.

Change-Id: I28849ee97ff1f492d372870c362288206c4ec9a5
CRs-Fixed: 3392831
Abhishek Singh 2 years ago
parent
commit
7ce0c12e54
1 changed files with 4 additions and 1 deletions
  1. 4 1
      umac/mlme/connection_mgr/core/src/wlan_cm_connect_scan.c

+ 4 - 1
umac/mlme/connection_mgr/core/src/wlan_cm_connect_scan.c

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2012-2015,2020-2021 The Linux Foundation. All rights reserved.
- * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
@@ -84,6 +84,9 @@ static QDF_STATUS cm_fill_scan_req(struct cnx_mgr *cm_ctx,
 		req->scan_req.scan_priority = SCAN_PRIORITY_HIGH;
 
 	ch_freq = cm_req->req.chan_freq;
+	/* Try using freq hint to scan if chan freq is not set */
+	if (!ch_freq)
+		ch_freq = cm_req->req.chan_freq_hint;
 	if (ch_freq) {
 		state = wlan_reg_get_channel_state_for_pwrmode(
 							pdev,