summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Tan <jsontan@google.com>2022-09-06 17:57:33 +0000
committerJason Tan <jsontan@google.com>2022-09-13 19:54:53 +0000
commit43e117856bb6bb4c75f0e628ff6e853542351d4f (patch)
tree24b7ff3a09ed836bc17f800370641ffa79a7695e
parent7f45c970365638e80feabeaa752753206e3858b0 (diff)
downloaddrivers-43e117856bb6bb4c75f0e628ff6e853542351d4f.tar.gz
Don't skip first pno scan on wifi enable
Remove skipping the first pno scan when wifi is first brought up to reduce delay of first scan when wifi is turned on during screen off Bug: 245362458 Test: Verified through logs first pno scan after wifi bringup is not skipped and device connected successfully. Verified subsequent pno scans first scan is skipped by using cli to disconnect device from AP, and triggering screen on+screen off Change-Id: Ie74821365ab4ce67e74731820684ae53b080c51c
-rw-r--r--net/wireless/bcmdhd/dhd_pno.c4
-rw-r--r--net/wireless/bcmdhd/dhd_pno.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/net/wireless/bcmdhd/dhd_pno.c b/net/wireless/bcmdhd/dhd_pno.c
index 7456b58..7f07ad8 100644
--- a/net/wireless/bcmdhd/dhd_pno.c
+++ b/net/wireless/bcmdhd/dhd_pno.c
@@ -442,6 +442,10 @@ _dhd_pno_set(dhd_pub_t *dhd, const dhd_pno_params_t *pno_params, dhd_pno_mode_t
pfn_param.version = htod32(PFN_VERSION);
pfn_param.flags = ((PFN_LIST_ORDER << SORT_CRITERIA_BIT) |
(ENABLE << REPORT_SEPERATELY_BIT));
+ if (!_pno_state->first_scanned) {
+ pfn_param.flags |= (ENABLE << IMMEDIATE_SCAN_BIT);
+ _pno_state->first_scanned = true;
+ }
if (mode == DHD_PNO_LEGACY_MODE) {
/* check and set extra pno params */
if ((pno_params->params_legacy.pno_repeat != 0) ||
diff --git a/net/wireless/bcmdhd/dhd_pno.h b/net/wireless/bcmdhd/dhd_pno.h
index 4af1e60..9ee4d11 100644
--- a/net/wireless/bcmdhd/dhd_pno.h
+++ b/net/wireless/bcmdhd/dhd_pno.h
@@ -471,6 +471,7 @@ typedef struct dhd_pno_status_info {
enum dhd_pno_mode pno_mode;
dhd_pno_params_t pno_params_arr[INDEX_MODE_MAX];
struct list_head head_list;
+ bool first_scanned;
} dhd_pno_status_info_t;
/* wrapper functions */