BACKPORT: FROMGIT: wifi: rtw89: 8852a: report average RSSI to avoid unnecessary scanning

8852A uses single antenna during power save, when the loss
between two antennas is too large, previous logic induces
greater RSSI variation. Report the average beacon RSSI for
connected AP to get more stable RSSI and less unnecessary scanning.

Signed-off-by: Po-Hao Huang <[email protected]>
Signed-off-by: Ping-Ke Shih <[email protected]>
Link: https://patch.msgid.link/[email protected]
(cherry picked from commit f0f3bf4b370cbd72a3dc63cb3a359677c4c27263
 https://github.com/pkshih/rtw.git rtw-next)

Conflicts:
   drivers/net/wireless/realtek/rtw89/rtw8852a.c

BUG=b:353448295
TEST=verify suite:wifi_matfunc and suite:wifi_perf on dedede.
     Besides, behavior was checked by [1], and fix was acked by [2].

[1]
	step1. sudo iw dev wlan0 scan
	step2. sudo iw dev wlan0 survey dump --radio
	step3. (it's expected to see some output)

[2] https://partnerissuetracker.corp.google.com/issues/353448295#comment172

Change-Id: If2ba5c9abe14f785a7946eb66e9ace4884fb9ca2
Signed-off-by: Zong-Zhe Yang <[email protected]>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/6898647
Reviewed-by: Tomasz Figa <[email protected]>
Tested-by: David Ruth <[email protected]>
Reviewed-by: Tzung-Bi Shih <[email protected]>
Commit-Queue: David Ruth <[email protected]>
Reviewed-by: Sergey Senozhatsky <[email protected]>
Reviewed-by: David Ruth <[email protected]>
1 file changed