android_kernel_xiaomi_sm8350/core
gaurank kathpalia 47d668219b qcacld-3.0: Use policy mgr safe ch list in ACS
Currently the driver uses a global safe channel
list, and also keeps another safe channel list in
policy mgr which results in duplicate copies
of the same thing.
Also there are many possible issues which are seen
if the global list implementation is used.

Issue 1:-
The global unsafe ch list is maintained for each
channel and is updated as part of ACS scan cb.
So if a user does ACS again and again ( SAP on off)
then the result of unsafe channels of the previous
ACS request would be updated as part of the ACS cb
of the new ACS scan request.
In the function of sap_get_freq_list, the driver
filters out the channels which are unsafe, and the
same channels are not chosen as the best channel for
SAP operation.
Now the filtration of the channels would happen
according to the previous ACS request, and the driver
would remove the channels from the ACS scan list.
But those channels were unsafe when the previous ACS
happened, and may not be unsafe now, and can be used
to turn on the SAP (can be chosen as the best channel)

Issue 2:-
If the channels are truly unsafe, then the driver
filters out the channel in the function sap_get_freq_list,
and do not chose them for the SAP.
It may happen that the channel list that the driver
preferred as part of do acs becomes unsafe, and the
channels that were unsafe at the time of do acs becomes
safe while the driver was scanning the ACS channels to
find other APs.
Now since the channels that were unsafe at the time of
ACS req are safe now, they could have been chosen as the
best channel but they were not scanned, so the ACS channel
weight of these channels would remain maximum, and they
would be sorted at last of the sorted list.
Also the channels that were as part of the ACS channels list
became unsafe, hence the driver would also assign maximum
weight to them, and they would too become unusable channels.
This would result in all channels having the same weight that
is maximum weight, and so the sorting algorithm does not have
to sort any channel now since all of the weights are same.
The first channel in the sorted list would be channel number
1 of 2.4Ghz, and would get chosen, but this may not be
correct if the HW mode is 5ghz only.

Fix:-
Safe and unsafe channels can be checked by using
policy mgr safe channel list too, so it is better
to keep just one unsafe channel list.
The driver would not filter out the unsafe channels
for ACS scan, and would filter out the unsafe channels
as part of the ACS scan done callback.

Change-Id: Ief236db9e73864e5cb2d290a8106799f9e80f82d
CRs-Fixed: 2530241
2019-10-04 00:07:53 -07:00
..
bmi Revert "qcacld-3.0: request firmware without userhelper" 2019-08-29 07:45:45 -07:00
cds qcacld-3.0: Add support for WMI over QMI 2019-10-03 21:59:31 -07:00
dp qcacld-3.0: Resume DP threads during SSR 2019-09-30 14:40:47 -07:00
hdd qcacld-3.0: Add support for WMI over QMI 2019-10-03 21:59:31 -07:00
mac Release 5.2.0.151H 2019-10-03 21:59:32 -07:00
pld qcacld-3.0: Protect pld_del_dev function as part of psoc trans 2019-10-03 02:01:30 -07:00
sap qcacld-3.0: Use policy mgr safe ch list in ACS 2019-10-04 00:07:53 -07:00
sme qcacld-3.0: Add VHT extended Nss BW support for 160MHz 2019-10-02 02:48:04 -07:00
wma qcacld-3.0: Add VHT extended Nss BW support for 160MHz 2019-10-02 02:48:04 -07:00