Commit Graph

646 Commits

Author SHA1 Message Date
gaurank kathpalia
d253c1c2fe qcacld-3.0: Return the safe channel from ACS ch list
Currently in case of LTE-coex event, the driver restarts
the SAP to a new channel if the current SAP operating
channel is unsafe.
In the current logic the driver gets the PCL apply the
logic to remove unsafe channels, NOL channels etc.
and then chose a final channel for the SAP.
Now for the case of standlaone SAP the PCL would contain
only 5ghz channels, and it may be the case that ACS
channel list contains only 2.4ghz channels because
the SAP was initially started on 2.4ghz band.
Now with the intersection of 2.4ghz and 5ghz, the driver
would not get anything left to restart the SAP and the SAP
restart would eventually fail.

Fix is to directly check the number of connections as 1,
that would mean only SAP is present, and if it is the
case, just restart the SAP on any other channel from the
ACS channel list rather than intersection with PCL.

Change-Id: If3a77ca877b2bf5e83ca64930e716936f680940f
CRs-Fixed: 2556054
2019-12-11 14:55:48 -08:00
gaurank kathpalia
37dcc70525 qcacld-3.0: Lower down the channel BW in 2.4ghz case
Currently the driver in case of force SCC picks up
2.4ghz SCC channel if any other STA/AP is already
up on that channel, so in the process of shifting
in the API sap_validate_channel it picks up 2.4ghz
and calls a reg API to set the freq related params
to it. Now since the frequency for 2.4ghz is 40 mhz
capable the max BW supported for 2.4ghz becomes 40 and
the driver starts the SAP on 40mhz.
Now since the OBSS scan is offloaded to the hostpad
and now since it was driver which started the SAP
on 40mhz there is no mechanism to start OBSS scan
from driver, which leads to channel blockage if
any legacy 11g, 11b lient is operating on the channel.

Fix is to lower down the BW to 20Mhz if the SAP does a
force SCC in 2.4ghz.

Change-Id: I0d85dfb5e9e8332957d853173063e77d18ea600c
CRs-Fixed: 2581495
2019-12-11 13:35:13 -08:00
gaurank kathpalia
008bbdfec4 qcacld-3.0: Set weight calculation done as true in ACS
Currently the driver does not set weight calculated flag
in the spectrum channel structure for each channel as
true in 40, 80, 160 sorting case.
Now in the next iteration the weight calculation done
comes as false, and the weight is set as maximum
which leads to wrong channel and BW selection and the
last while running channel selection logic.

Fix is to set weight calculation done as true for all
the channels which come under the particular BW, and
skip the channels for which the weights are already
calculated.

Change-Id: Ib355dd5cf7c3aeeb5534bfa295785bdfc30eed86
CRs-Fixed: 2583538
2019-12-10 19:39:29 -08:00
Liangwei Dong
c2a9453efa qcacld-3.0: Fix 6G Channel DFS issue
1. Convert channel to frequency and use frequency
Regulatory API to check DFS status.
2. Skip dfs check for 6G channels.

Change-Id: I54b6d6a3ad25c192af4eec4e7f43932bada728b5
CRs-Fixed: 2580568
2019-12-09 15:58:11 -08:00
Jianmin Zhu
61d502d966 qcacld-3.0: SAP CSA from 5G to 2G for modem N79
For SAP/P2P GO on 5G, when receive cmd to disable 5G band when
modem n79 band used, will move to 2G band via CSA.
1. If no active connection on 2G, select ch by safe list, or
channel 6.
2. If there is STA on 2G, force scc with it.
3. If there is SAP/GO on 2G, force scc with it.
4. Handle one race condition that if candidate is already
selected & FW has gone ahead with roaming or about to go ahead
when set_band comes, it will be complicated for FW to stop the
current roaming. Instead, host will check roam sync to make sure
the new AP is on 2G, or disconnect the AP.
5. If 2 SAP on 5G, move both to 2G and keep scc.

When Set band to enable 5G band again, restored all 5G SAP/Go..

Change-Id: I9b2b1ead3b4502022aeefc08359037457bb051f9
CRs-Fixed: 2580204
2019-12-09 13:54:16 -08:00
gaurank kathpalia
43ab6249f1 qcacld-3.0: Set freq present as false in sap_get_freq_list
Currently if the first channel if seen in the normalize
acs weight array is found, the driver does not set the
freq present as false back, which leads to further
disabling all frequencies for SAP which should not be
the expectation.

Fix is to set the freq present as false again for the
next frequency.

Change-Id: Iabeb40179a0ef02cb51441b1148eea79b82d0ebf
CRs-Fixed: 2578551
2019-12-06 08:40:16 -08:00
gaurank kathpalia
4c443a26bc qcacld-3.0: Fill seg1 for 160 mhz BW in ACS result
Currently the driver does not fill the seg1 frequency
in case of 160 mhz which is used for SAP startup.

Fix is to Fill seg1 for 160 mhz BW in ACS result

Change-Id: Iffc61581290adf97d83e10b6a717c50afb750687
CRs-Fixed: 2575631
2019-12-04 09:30:44 -08:00
gaurank kathpalia
71562069e1 qcacld-3.0: Fix combined weight issue in ACS
Currently the driver calculates the best channel
amoung the given spectrum and uses logic to select
best frequency amoung the BW members, but the logic
to maximize the weight before selecting the min
weight is wrong, and must be done after the selection
of the minimum weight frequency.

Fix is to maximize the weight after the minimum weight
channel is selected.

Change-Id: Ie196462fbcc4215e6eb655168d07305110ff0ee7
CRs-Fixed: 2578582
2019-12-03 15:00:24 -08:00
gaurank kathpalia
4eeff00bb6 qcacld-3.0: Remove the check of op protext in sap scan cb
Currently in stop adapter the driver checks the ACS bit
in progress and then waits for it to get complete
Now if in scheduler thread the sap scan cb comes then
it will check to get op protect which would not be
granted as it is a pdev operation, and already a vdev
transition is in progress, hence the bit for acs in progress
would not get cleared.

Fix is to remove the check of op protect as it is no longer
needed since the stop adapter takes care of acs in progress.

Change-Id: Ifebaed87e3a798126031d9971dc801d60fd34ea6
CRs-Fixed: 2567157
2019-11-21 00:44:31 -08:00
gaurank kathpalia
4bcc0a7891 qcacld-3.0: Fix indentation issue in sap ch select
Fix indentation issue in sap channel select to
avoid compile failures in auto branch compilers

Change-Id: Ifa92dfaaa349833d5651b7cdb66d87f039f0df36
CRs-Fixed: 2568414
2019-11-21 00:44:05 -08:00
gaurank kathpalia
8c516f0824 qcacld-3.0: In ACS use scan entry to get BW, center freq etc
In ACS, driver uses frame parser to get the HT/VHT/HE IE to fill
bandwidth, center freq etc. These info are already available in
scan entry so use them.

Change-Id: I5148f8aa20174b4fa0fc64acd7b74825e10ede03
CRs-Fixed: 2568513
2019-11-19 03:38:36 -08:00
Tushnim Bhattacharyya
6c40b112ce qcacld-3.0: Replace channel id with frequency in ecsa indication
Replace channel ID with channel frequency in ecsa indication flow.

Change-Id: I1dd3148566e1da37a6f3fa71f1887e66f87f5d1c
CRs-Fixed: 2555384
2019-11-14 06:00:26 -08:00
Liangwei Dong
0e18c47d0c qcacld-3.0: Change channel to Frequency for acs_cfg fields
Change vht_seg0_center_ch and vht_seg1_center_ch in acs_cfg
struct to vht_seg0_center_ch_freq, vht_seg1_center_ch_freq
respectively.

Change-Id: Ie3378376e6f31c239157c8eaaf3ceb22d2e35073
CRs-Fixed: 2564065
2019-11-13 06:52:58 -08:00
Liangwei Dong
50d12dc273 qcacld-3.0: Convert to freq for acs->start_ch
Change acs->start_ch and acs->end_ch to acs->start_ch_freq
and acs->end_ch_freq respectively.

Change-Id: I105cd618970c739340df29d58f635d01a68754d2
CRs-Fixed: 2564018
2019-11-13 06:52:51 -08:00
gaurank kathpalia
0eddedfcc4 qcacld-3.0: ACS changes for 6ghz
Acs changes for 6ghz to change chan to frequency
in the spectral params structure.

Change-Id: Iffd348ac5c2457b313b702a92b340a258992e764
CRs-Fixed: 2564043
2019-11-13 06:52:43 -08:00
gaurank kathpalia
92b81ceb99 qcacld-3.0: Convert primary, secondary channel for acs cfg to freq
Convert primary, secondary channel for acs cfg to freq as part
of ACS 6Ghz changes.

Change-Id: I4f6220b39dae91df070b0764fa8b048cdc6ad00f
CRs-Fixed: 2555988
2019-11-13 06:52:36 -08:00
gaurank kathpalia
648adbafb9 qcacld-3.0: Refactor ACS channel code
Refactor ACS channel code to improve readability
and reduce the duplicate checks.

Change-Id: I00e354d6b564b06a9fe3537dcf2deb7517a9a919
CRs-Fixed: 2550621
2019-11-13 06:52:30 -08:00
Liangwei Dong
7211b1d82e qcacld-3.0: Check vdev valid for access
Validate sap_contex->vdev before access.

Change-Id: Ib71c0d970a5ec119a01ecbb1b1f98a3a2a936a2a
CRs-Fixed: 2549289
2019-11-01 12:05:16 -07:00
gaurank kathpalia
aa252b5ea2 qcacld-3.0: ACS changes for 6ghz support
Driver ACS changes for 6Ghz channel support

Change-Id: I3d01f8aeda10037175588690100762d6a7e00f2c
CRs-Fixed: 2555901
2019-11-01 08:16:57 -07:00
gaurank kathpalia
924b2a764a qcacld-3.0: ACS changes for 6ghz support
Driver ACS changes for 6Ghz channel support.

Change-Id: I94cc834a9fdd5cfe54e4dcc09aba0253de6b2a39
CRs-Fixed: 2555187
2019-10-29 19:23:44 -07:00
Tushnim Bhattacharyya
faa9c0114a qcacld-3.0: Replace channel id with frequency in sap
Replace channel ID with channel frequency in sap for channel
switch flow.

Change-Id: I3e7bf0e6d84604223c1791ccfd3d95d1ff5f2992
CRs-Fixed: 2554468
2019-10-29 16:44:43 -07:00
Rachit Kankane
914b79a337 qcacld-3.0: SAP in CAC, block concurrency
At the time of starting / stopping 2nd or 3rd connection,
Host sends WMI_PDEV_SET_HW_CMDID command to FW to change
HW mode to DBS / Single-Mac based on concurrency rule.
FW upon receiving this command turns off TXRX chainmask
which means that radar pulses might get missed for
20ms - 50ms during CAC period. To fix this, Host should
block new connection when existing SAP is performing CAC
on DFS channel.

Change-Id: I51eb117afa763a6ef54211808875419026c9075b
CRs-Fixed: 2533717
2019-10-24 17:24:24 -07:00
Jianmin Zhu
c71151b3f7 qcacld-3.0: Fix whunt SAP start failed for wrong channel
Need initialize local var con_ch_freq before use.

Change-Id: I9f770dace7710019bd7d693b6c3b6ba3bdc43af1
CRs-Fixed: 2551516
2019-10-24 09:12:56 -07:00
Liangwei Dong
3179b537af qcacld-3.0: Skip DFS NOL check for 6GHz SAP
6GHz channels doesn't need DFS NOL functionality.
Skip DFS NOL check for 6GHz SAP.

Change-Id: Ibdebba0d175e7752c0f6feae2b9412ef3b11b191
CRs-Fixed: 2550593
2019-10-23 17:19:29 -07:00
Manikandan Mohan
19f3609b21 qcacld-3.0: Use policy manager frequency APIs
For 6GHz support and to remove channel number ambiguity use policy
manager APIs updated for frequency in other modules. This change
covers following APIs:
policy_mgr_get_pcl
policy_mgr_update_with_safe_channel_list
policy_mgr_get_valid_chans_from_range
policy_mgr_get_valid_chans
policy_mgr_set_sap_mandatory_channels
policy_mgr_get_pcl_for_existing_conn
policy_mgr_get_mode_specific_conn_info

Change-Id: Ia21829345be2746cd3fc1f2337cfc90abf0c53f4
CRs-fixed: 2550092
2019-10-22 18:09:45 -07:00
Manikandan Mohan
a0bbb518fc qcacld-3.0: Use policy manager frequency APIs
For 6GHz support and to remove channel number ambiguity use policy
manager APIs updated for frequency in other modules. This change
covers following APIs:
policy_mgr_get_chan_by_session_id
policy_mgr_get_mcc_operating_channel
policy_mgr_check_and_set_hw_mode_for_channel_switch
policy_mgr_is_chan_ok_for_dnbs
policy_mgr_is_safe_channel
policy_mgr_valid_sap_conc_channel_check
policy_mgr_disallow_mcc
policy_mgr_add_sap_mandatory_chan
policy_mgr_remove_sap_mandatory_chan
policy_mgr_is_hwmode_set_for_given_chnl
policy_mgr_is_valid_for_channel_switch
policy_mgr_update_user_config_sap_chan
policy_mgr_is_sap_restart_required_after_sta_disconnect
policy_mgr_is_sta_sap_scc
policy_mgr_nan_sap_scc_on_unsafe_ch_chk

Change-Id: I682f8380d9dc41fc015d73f06b6e055d1d04ef97
CRs-fixed: 2545110
2019-10-22 18:09:31 -07:00
Manikandan Mohan
282c4b6f66 qcacld-3.0: Use policy manager frequency APIs
For 6GHz support and to remove channel number ambiguity use policy
manager APIs updated for frequency in other modules. This change
covers following APIs:

policy_mgr_allow_concurrency
policy_mgr_nan_sap_pre_enable_conc_check
policy_mgr_allow_concurrency_csa
policy_mgr_current_connections_update
policy_mgr_incr_connection_count_utfw
policy_mgr_update_connection_info_utfw
policy_mgr_get_channel_from_scan_result
policy_mgr_update_and_wait_for_connection_update
policy_mgr_get_sap_mandatory_channel
policy_mgr_checkn_update_hw_mode_single_mac_mode

Change-Id: I162c2b90a58539194907c5ecd6915eafecc635cc
CRs-fixed: 2545099
2019-10-22 18:09:25 -07:00
gaurank kathpalia
eeb2554905 qcacld-3.0: Handle mem leaks for sap ACS channel list
Handle error condition of vdev not found (Logical delete
state), and scan req memory not allocated to prevent mem
leak for SAP ACS channel list.

Change-Id: I0ab00c0119f80299cc8d93236839e42c647b939f
CRs-Fixed: 2547058
2019-10-18 02:55:24 -07:00
Ashish Kumar Dhanotiya
ca5d922263 qcacld-3.0: Process rx_mgmt_pkt based on frequency
As a part of 802.11ax amendment, 6GHz band operation is added.

Since the 6 GHz channel numbers are overlapping with existing 2.4GHz
and 5GHz channel numbers, use frequency to identify unique channel
operation instead of channel number. Channel frequency is unique across
bands.

As part of above requirement add logic to process rx mgmt
packets based on the frequencies instead of channel numbers.

Change-Id: Ib063070738ecdb4f83379eafe50629778a490aae
CRs-fixed: 2522693
2019-10-18 02:55:17 -07:00
Will Huang
4b097f5add qcacld-3.0: Replace channel number by channel frequency
To support 6Ghz channel, update channel number of struct
sap_StartBssCompleteEvent_s, hdd_ap_ctx and sap_ch_selected_s.

Change-Id: I19e6d7d03072135abed25e077e8573b5326ddba8
CRs-Fixed: 2519308
2019-10-16 10:07:17 +08:00
Liangwei Dong
8ffc0cc3ec qcacld-3.0: Use wlan_reg_set_channel_params_for_freq for SAP
Use wlan_reg_set_channel_params_for_freq to update SAP channel
parameters. The "freq" version API can handle 6GHz channel properly.

Change-Id: I519de47d4ec1fa1351b120f2faa9f23de1064493
CRs-Fixed: 2536568
2019-10-15 08:10:08 -07:00
gaurank kathpalia
c0d0841183 qcacld-3.0: Normalize the channel weights according to ini
Normalize the weights of the frequencies for ACS scan
if the user has changed them in the ini.
This is done as legacy devices wont be able to scan
the newly added 6ghz frequencies, and thus wont
be able to associate with the SAP if it starts
on 6ghz channels.

Change-Id: I2dd2f706c248f5339bde06963540d0874d08b847
CRs-Fixed: 2543007
2019-10-15 06:44:48 -07:00
Chaoli Zhou
364a002f8d qcacld-3.0: Fix build failure: ISO C90 forbids mixed declarations and code
It has "ISO C90 forbids mixed declarations and code"
build issue on the LE.UM.4.1.1, so fix it.

Change-Id: I0bc918f55e9a7d3c540a455ed292977c15300456
CRs-Fixed: 2542657
2019-10-12 16:23:31 -07:00
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
Kiran Kumar Lokere
c220a51edb qcacld-3.0: Add VHT extended Nss BW support for 160MHz
Add VHT extended Nss BW support for 160MHz connection.

Change-Id: I8e2833a48ca5de0301634a88eb1a66002b4c9c20
CRs-Fixed: 2531279
2019-10-02 02:48:04 -07:00
Liangwei Dong
eaf41e382c qcacld-3.0: Fix channel to freq conversion
wlan_reg_ch_to_freq accepts channel enum number.
Use wlan_reg_chan_to_freq to do channel -> freq
conversion.

Change-Id: I19255e5a3564139191fa53f528264388fc263a83
CRs-Fixed: 2534927
2019-09-26 17:33:13 -07:00
Liangwei Dong
a96e0027c1 qcacld-3.0: Populate channel flags for vdev_mlme.des_chan
When vdev_mgr_start_send is introduced, the Dfs->dfs_curchan
will be filled from mlme "des_chan" by tgt_dfs_set_current_channel.
Set correct channel flags to des_chan so that dfs radar functions
can get correct channel information.

Change-Id: I643acadb97c3924261b45f598a50fa82d9a224e6
CRs-Fixed: 2529996
2019-09-26 14:53:32 -07:00
Hangtian Zhu
9a28ed0437 qcacld-3.0: Enable configurable dfs_pri_multiplier
Enable configurable dfs_pri_multiplier. The ETSI typ2 type3 radar
detection ratio is lower than expected(>80%) while channel loading is
high(>30%). The host improvement for this are:
	1. Add configurable dfs_pri_multiplier, controlled by
	   DFS_PRI_MULTIPLIER. Default value 2, min 1, max 10.
	2. Lower adrastea ETSI type 2/3/4 radar filter rssi_threshold,
	   controlled by DFS_OVERRIDE_RF_THRESHOLD, dfs log shows that
	   QCS405 target report RSSI range [18, 45] while radar power
	   is 3 dbm. By using default rssi_threshold 24 will reject
	   many radar pulses, which leads to low detection ratio.
	3. Calculate deltapri for each searchpri based on dfs_pri_multiplier
	   in dfs_count_the_other_delay_elements(), check deltapri
	   between [1, dfs_pri_multiplier] * refpri and searchpri, if
	   the primargin is desired, mark it as matched pulse.
	4. Pick lowpri as refpri for the radar filter with
	   rf_ignore_pri_window equals to 0 while DFS_PRI_MULTIPLIER is
	   enabled. Observed original findref logic has some problems
	   which selects refpri is bigger than lowpri, which leads to
	   the lowpri pulses pri_match are set to 0, and in this case,
	   radar was not detected. Example for the issue, assume
	   rf->rf_pulseid 34 (ETSI type 2) has 7 pulses with pri:
	   1489, 2978, 2978, 2978, 1489, 2978, 1489 us in this case,
	   highscore is 4 (2978), scoreindex is 5, refpri is 2978, which
	   leads to: index 0, 4, 6 pulses with pri_match 0 in
	   dfs_count_the_other_delay_elements(). The fix is to select
	   lowpri as refpri(1489 in this case).

Change-Id: I1f3ca3298c9ab1f1e2651ad6b4a0a4810f83f8a1
CRs-Fixed: 2522506
2019-09-25 06:14:10 -07:00
Tushnim Bhattacharyya
ba6d1e030a qcacld-3.0: Replace channel with frequency in channel_info
Replace channel ID with frequency in struct hdd_channel_info
& oem_channel_info.

Change-Id: I1a14ab40da4824d2861a7ec862cc322a158f0cd1
CRs-Fixed: 2532299
2019-09-23 14:52:27 -07:00
gaurank kathpalia
081c66cfde qcacld-3.0: Free Sap acs ch list memory in stop adapter
Currently the SAP memory is not freed as part of stop
adapter as the sap ctx is mem zero in deinit ctx, hence
the addr to free in NULL
Fix is to extract the the sap config from adapter and
then free the sap ch list memory from it.

Change-Id: I8c0bf66765c34f0936d694d260ce1544791beecc
CRs-Fixed: 2530985
2019-09-19 13:36:51 -07:00
Kiran Kumar Lokere
229212a653 qcacld-3.0: Refactor SAP module to use channel frequency
Update SAP data structures to use channel frequency values instead
of using the channel id values to support 6GHz channels in SAP.

Change-Id: I9ef5857e8dcf3f7d879495d3f3c3ead083fe0bf0
CRs-Fixed: 2513083
2019-09-18 22:53:37 -07:00
gaurank kathpalia
83edf09282 qcacld-3.0: Wait for ACS complete before undo acs
Currently the driver does undo acs which clears away
the acs cfg ch list, master ch list, and sap_ctx->ch_list
before the ACS is complete (race condition), which can
lead to pointer access after free.

Fix is to wait for ACS complete event, and then clear away
the above mentioned ch lists.

Change-Id: I55de1e94d1fc3ebb99891465131de11ea3204778
CRs-Fixed: 2519650
2019-09-18 05:37:52 -07:00
Amar Singhal
2e4ccccf54 qcacld-3.0: Use frequency based channel enumerations
CONFIG_LEGACY_CHAN_ENUM has been removed. That macro needs channel number
based enumeration. Use channel frequency going forward. So change to
frequency based channel enumeration.

Change-Id: I234eb070a6dcfaf3325bbd523c19188d5b2bbd24
CRs-Fixed: 2513098
2019-09-16 15:14:10 -07:00
Tushnim Bhattacharyya
42299b8780 qcacld-3.0: Replace channel with frequency in csr_channel
Replace channel ID with frequency in struct csr_channel.

Change-Id: Id86aacfd6dc9b0c65184bf046a7ee27b9c1fb5e5
CRs-Fixed: 2519204
2019-09-04 18:53:48 -07:00
gaurank kathpalia
11bc67c606 qcacld-3.0: Clear sap ctx channel list in undo acs
Currently the sap ctx's channel list is not freed
as part of undo acs, and hence can lead to mem leak
when the do acs and SSR is triggered in parallel.
Scenario:-
1. Turn on SAP
2. Do SSR in parallel
3. Unload WLAN

Fix is to clear the channel list as part of undo
acs.

Change-Id: Ie8dcace1d32aeec2621e785d793290d70c194f62
CRs-Fixed: 2511752
2019-08-29 02:53:46 -07:00
gaurank kathpalia
5ffac61a8a qcacld-3.0: Copy the sap channel list to acs cfg chan list
Copy the sap channel list that is obtained after filtering
the channel list from all the checks like SRD, DFS
to maintain the sync between the ACS module, and the sap
channel select logic.

Change-Id: I78a835f700ab34fa81b9b748e6ad28ca3b726650
CRs-Fixed: 2513628
2019-08-25 00:46:07 -07:00
Nirav Shah
4474439d4c qcacld-3.0: Reset CAC state if another AP is not on 5GHz
In case of DBS, two AP can operate on different band together.
Current logic of resetting CAC state in sap_clear_global_dfs_param
function assumes that if two APs are up state then it must be SCC
scenario and resulting in dropping of tx packets if stop follwed by
start operation is performed on AP on DFS channel.

This change reset CAC state as part of stop AP if another AP is
operating on 2.4GHz in case of DBS operation.

Change-Id: I3f71606bf610d45184a0fa81d2b9d9a6c11f72e8
CRs-Fixed: 2509808
2019-08-23 06:26:56 -07:00
Abhishek Singh
682cf6f843 qcacld-3.0: Fix WMI timeout for runtime PM
For runtime PM if the bus is suspended driver need to consider
extra 6 sec time for bus resume.
Thus add 6 sec extra in WMI timeouts if runtime PM is supported.

Change-Id: I5515cc889a0315382bac11a33ea6f901b7af1c46
CRs-Fixed: 2507029
2019-08-20 22:53:50 -07:00
gaurank kathpalia
69f052b95b qcacld-3.0: Avoid channel 12, 13 for SAP operation
Currently the driver selects channel 12, 13 as they are
free from BSS as their weights are minimum, which results
into IOT issues as legacy STAs do not support the same.

Fix is to avoid channel 12, 13 in SAP ACS process, and try
to start the SAP on channels from 1 - 11.

Change-Id: If735fade7d7b489b45a20f74c04bab5582343f79
CRs-Fixed: 2509791
2019-08-16 08:22:37 -07:00
Liangwei Dong
d8ecec378d qcacld-3.0: Add INI for P2P GO force SCC
1. Add g_enable_go_force_scc INI configuration
to enable force SCC on P2P GO interface.
This option only takes effect when
gWlanMccToSccSwitchMode INI enabled.
2. Add API policy_mgr_is_go_allow_force_scc to get
the above configuration value for GO.
Driver will apply "MCC to SCC" logic to P2P GO
interface based on STA active status and the configurated
INI values.

Change-Id: I1d16368b5f2d88984b91ef0a3e882148c20dcd23
CRs-Fixed: 2509555
2019-08-16 04:13:34 -07:00