Commit Graph

682 Commits

Author SHA1 Message Date
hqu
365520551b qcacld-3.0: Signal chan change event before cac start in chan switch
When detect radar in the process of SAP cac, SAP may choose another
DFS channel to switch and will do cac again, but still indicate
WLAN_SVC_DFS_CAC_START_IND with old DFS channel info to hostapd, it's
wrong. Issue is introduced by
'Change-Id: I0915ee78a97e5f27ce83c31cc673cb8820ae535b', due to this
change it will drop one time eSAP_CHANNEL_CHANGE_EVENT signal before
do cac start on new DFS channel, then operating_chan_freq for
hdd_ap_ctx can't be updated to new DFS channel timely.

Fix is to add one time eSAP_CHANNEL_CHANGE_EVENT signal before do cac
start in the process of channel switch.

Change-Id: I441e32e4ecd356834e66f97f2e2334966f48ec5d
CRs-Fixed: 2663539
2020-04-18 08:05:47 -07:00
gaurank kathpalia
3aae7a3cc0 qcacld-3.0: Ignore CAC if STA already present
Currently the driver sets the CAC required for
SAP if it changes it channel to DFS, it
issues a broadcast deauth to all clients,
which leads to unwanted disconnection, which
can be avoided if any STA if already connected
to an AP on that channel.
This is because there is already active TX going
on that channel, so the SAP need not wait for
CAC time to sense the medium.

Fix is to check whether any STA vdev operating
frequency matches with the target frequency of
the SAP, and if it is true, then do not set the
CAC required to true in SAP's vdev.

Change-Id: I09dbecc1a4625cb51e6095f7579479413e525a74
CRs-Fixed: 2643790
2020-04-14 16:37:41 -07:00
gaurank kathpalia
18aa9fa4a4 qcacld-3.0: Force SAP on default channel
Currently the driver fails the ACS process
if no channel is found suitable for SAP by
ACS and thus hotspot cannot be enabled.

Fix is to force SAP to come up on some
default channel, this behaviour would
be controlled via an ini to that customers
can choose whether to opt for this behaviour
or not.

Change-Id: I8a63cf0c5d42802e33f4ad67a33d148a4da54d2a
CRs-Fixed: 2658297
2020-04-09 21:08:52 -07:00
Pragaspathi Thilagaraj
ae0fb161a4 qcacld-3.0: Remove redundant SAP logs
Remove excessive SAP start/client connection logs.

Change-Id: Idb593c3eee77eb24084eca15ce53a43a3f4060da
CRs-Fixed: 2627367
2020-04-08 11:26:38 -07:00
Sourav Mohapatra
915d9dc8e1 qcacld-3.0: Return success for stop_bss while SAP is in stopping state
If the SAP is already in stopping state and wlansap_stop_bss is invoked
as a part of stop_adapter, it returns error which causes the
stop_adapter not to wait for the vdev to return to proper state.

To avoid this, return success in case of SAP_STOPPING for the event
eSAP_HDD_STOP_INFRA_BSS

Change-Id: I99a2cd0a1d12b8e43fb3e88b6889e1d651633283
CRs-Fixed: 2654042
2020-04-02 23:54:50 -07:00
hqu
14cdfe2c91 qcacld-3.0: Add support for DCS channel switch from DFS to DFS
Bring up SAP+SAP with acs mode on 5G and set chanlist only with
DFS channel, run heavy traffic to make noisy on SAP beacon channel,
then DCS will be triggered to do ACS again for choosing better
channel to switch, new DFS channel will be choosed, but channel
switch is failed.

DCS policy is SAP do channel switch one by one with the same target
channel, ignore three fail point concurrency check in
wlan_hdd_cfg80211_start_acs/wlansap_set_channel_change_with_csa/
wlansap_roam_process_dfs_chansw_update, furthermore need to add DFS
channel to acs channel list in sap_get_freq_list.

Change-Id: I7360792105cd1fdd4f4c75040c510cc620c3d5c5
CRs-Fixed: 2648641
2020-03-30 06:10:18 -07:00
Qun Zhang
b4e2c33bab qcacld-3.0: Replace QDF_MAX_NUM_CHAN/POLICY_MGR_MAX_CHANNEL_LIST with NUM_CHANNELS
Currently QDF_MAX_NUM_CHAN/POLICY_MGR_MAX_CHANNEL_LIST aren't aligned with
NUM_CHANNELS, these unalignment may cause some potential OOB access.
So replace QDF_MAX_NUM_CHAN/POLICY_MGR_MAX_CHANNEL_LIST with NUM_CHANNELS
to keep unified.

Change-Id: Ib6c81a3979f2fd29ba1ec678f018a6704b599385
CRs-Fixed: 2644066
2020-03-25 07:08:36 -07:00
bings
9e55b99378 qcacld-3.0: Notify channel info to kernel after channel switch
After channel switch, driver should indicate new operation channel to
kernel, otherwise wireless_dev->chandef still uses old channel whose
status may become disable when radar is detected in the old channel.

In hdd_chan_change_notify use frequency instead of channel number.
Notify channel information to kernel after channel switch.

Change-Id: I6dbf3d61978e4c35fe41b438397e635d62378719
CRs-Fixed: 2639076
2020-03-24 04:56:41 -07:00
hqu
86ee15fa07 qcacld-3.0: Use vdev_id to get vdev in sap_channel_sel
In SAP on/off stress test, when hostapd call hdd_start_adapter
to create vdev, vdev2 will be created while vdev1 doesn't be
deleted physically even if vdev1 is already destroyed logically,
then hostapd issue acs operation, currently use mac address to
get vdev in sap_channel_sel, because vdev2 is using the same mac
address as vdev1 and vdev1 is still in vdev_list at this point,
so will find vdev1 firstly but will return failure due to vdev1 is
WLAN_OBJ_STATE_LOGICALLY_DELETED status, then will cause acs fail.

Fix is to use vdev_id to get vdev in sap_channel_sel.

Change-Id: I89ae3e847b725c2b64331536bc7c1de3fffce0bd
CRs-Fixed: 2640850
2020-03-20 04:19:30 -07:00
bings
23c2312e08 qcacld-3.0: Do not call wlan_reg_legacy_chan_to_freq for freq
sap_ctx->csr_roamProfile.op_freq is already channel frequency.
Do not call wlan_reg_legacy_chan_to_freq for it.

Change-Id: I20ce4eb8852087175c0fae4a7a9dd5e3168e1f24
CRs-Fixed: 2643218
2020-03-19 01:36:09 -07:00
hqu
8925227821 qcacld-3.0: Fix wrong conversion for op_freq
Channel to frequency conversion is unnecessary in function
sap_is_conc_sap_doing_scc_dfs, issue is introduced by
'Change-Id: Ifa62248169ad7b8ff1c62cab44c92d99a8db0e45'.

Fix is to set ch_freq with op_freq directly, no need to convert.

Change-Id: I2e21956833c18240045c85bfb0837ca058069ff5
CRs-Fixed: 2639443
2020-03-13 21:56:37 -07:00
Huashan Qu
1b3be2948e qcacld-3.0: dynamic channel switch implementation
When dynamic channel switch is enabled, trigger acs and switch to best
channel if wlan interference is found in 5g mac.

Change-Id: I56661f5c42a233a0dc0a6400d75cb8f5c0019706
CRs-Fixed: 2599176
2020-02-28 05:55:45 -08:00
Kiran Kumar Lokere
0e6e858aa9 qcacld-3.0: Correct the SAP event in channel switch response
In channel switch response start bss success event is used to
indicate the success in which the initial bss settings are done
that is leading to set the incorrect keys after the channel switch.
Use the channel change event to indicate channel switch success.

Change-Id: I0915ee78a97e5f27ce83c31cc673cb8820ae535b
CRs-Fixed: 2620809
2020-02-25 18:47:13 -08:00
Liangwei Dong
9462dd670d qcacld-3.0: Fix incorrect channel change event
The ch_params of sap_ctx->csr_roamProfile is not populated
correctly during SAP channel switching.
Fix it and send channel change event to supplicant with
correct seg0/seg1 value.

Change-Id: I7ef82c6e79b970edfee58d9960e8c6b42fa91ef8
CRs-Fixed: 2594973
2020-02-20 21:35:41 -08:00
gaurank kathpalia
26f0276d8a qcacld-3.0: Combine and print channel for ACS and roam channels
Combine and print channel for ACS and roam channels, instead
of printing one channel at a time.

Change-Id: I398678e1843849bdf4f4c72f0315c626c97438a6
CRs-Fixed: 2623805
2020-02-19 06:23:25 -08:00
Abhishek Singh
c332b3eba0 qcacld-3.0: Optimize CSA logs for SAP and STA
Optimize CSA logs for SAP and STA.

Change-Id: I1bd00821a2b8cbc41d530eda1aba1e7ecdd9cb7b
CRs-Fixed: 2623007
2020-02-18 04:52:20 -08:00
Amar Singhal
8bf9970419 qcacld-3.0: Remove DFS check after cac end notify
DFS check cannot be on atomic channel, but full channel width.

Change-Id: I6f7ea80923db6ea96c995d1d5a2faf8b4576950f
CRs-Fixed: 2615778
2020-02-12 08:01:42 -08:00
Amruta Kulkarni
fc875ea635 qcacld-3.0: Cleanup for function wlan_reg_is_dfs_ch()
Replace wlan_reg_is_dfs_ch() with wlan_reg_is_dfs_for_freq()

Change-Id: Ifa62248169ad7b8ff1c62cab44c92d99a8db0e45
CRs-Fixed: 2609311
2020-02-08 02:07:03 -08:00
gaurank kathpalia
ac1feea895 qcacld-3.0: Log enhancement in ACS
Enhance logs in ACS module to remove duplicate
prints and keep only useful logs to debug.

Change-Id: I2cf98fb8b4d7a8391617c9ce1baaa5ff6ad42114
CRs-Fixed: 2614609
2020-02-04 09:11:13 -08:00
Arun Kumar Khandavalli
1ac5aaddb8 qcacld-3.0: Selectively reduce the sap logs
Selectively reduce the sap logs from info/err to debug.

Change-Id: Ie3bb8f63a62d93f239d8b27cd930af2755ccdbf5
CRs-Fixed: 2607161
2020-01-27 14:19:51 -08:00
gaurank kathpalia
37151a5812 qcacld-3.0: Remove the check for 0 scan results
Currently the logic in ACS for 0 scan results is
to select default channel from the ACS channel list,
but the available channels may not always be capable
of the max BW sent by ACS, for example in HW MODE as
ANY then all the channels 2.4ghz and 5ghz would be
present in the ACS channel list, 2.4ghz channels at
the first followed by the 5ghz channels, and if the
scan results are 0 then 2.4ghz channel would be
selected as default which should not be the case.

Fix is to remove the check to select default channel
and let me ACS algorithm decide the best channel
accounting other factors such as noise floor
and max tx rx clear count, power also.

Change-Id: I21e5d73e12fffb00c4996c406d62361b74db629f
CRs-Fixed: 2601141
2020-01-24 00:55:40 -08:00
Jianmin Zhu
ae4d3c41ca qcacld-3.0: SAP hung in DFS state when disable channel during CAC
If SAP start on 5G DFS channel, it will keep in CAC for 1 minute.
If Disable 5G by cmd: hostapd_cli -iwlan2 set setband 2G during
this minute, SAP won't switch to 2G since SAP isn't in started
state, and SAP start also fail since SAP operate channel
becomes disabled instead of DFS state, SAP will be hung in DFS
state.
Fix: When CAC complete and SAP start, check SAP operate channel
with wlan_reg_chan_has_dfs_attribute_for_freq.
After SAP started, will check for SAP restart,
if found current band is disabled, will switch to 2G band.

Change-Id: I3c29b5d324d4324ce958a5c2cd2102df2cc183ff
CRs-Fixed: 2601081
2020-01-15 08:19:21 -08:00
Kai Liu
a664146e1d qcacld-3.0: skip channel switch if best channel is in PCL list
Currently during ACS process, if best channel after weight sorting
is not in PCL list, then further check if there is a channel in PCL
has some weight, if there is, then switch to this new channel.

Skip above process if best channel is already in PCL list.

Change-Id: I5bfb6d18c531e6b7b4ff0b8b2bb2bd47388fed0c
CRs-Fixed: 2589033
2020-01-13 23:17:50 -08:00
Yue Ma
cc35052654 qcacld-3.0: Cleanup CRYPTO_SET_KEY_CONVERGED for HDD layer
CRYPTO_SET_KEY_CONVERGED is a temporary flag which is used for
converged crypto component transition. The transition has already
been done, so cleanup legacy code related to the flag in HDD layer
and SAP module.

Change-Id: Ic92e44e53c63ba2752907ace3ffc0f55d18470e2
CRs-fixed: 2593520
2020-01-08 11:30:29 -08:00
Will Huang
0e083cb878 qcacld-3.0: Fix runtime error if undefine WLAN_CONV_CRYPTO_SUPPORTED
wlan_set_vdev_crypto_prarams_from_ie() is defined in qcacmn code but
disabled in Kbuild if CONFIG_CRYPTO_COMPONENT=n, it caused runtime
error if run it.

The #ifdef/#else code should live in common code where define
wlan_set_vdev_crypto_prarams_from_ie(), but there is no motivation
from WIN side to add any code which is not converged.
And it is not appropriate to put it into exist head files, so just
define inlined wrapper functions to cover the not defined case.

Change-Id: I11916703fff860025728f904c8d3906eee1d0037
CRs-Fixed: 2592904
2020-01-03 06:25:57 -08:00
Jianmin Zhu
b01384b43d qcacld-3.0: P2P Go failed to switch to 2G band when 5G disabled
If g_enable_go_force_scc isn't enabled, P2P Go failed to switch
to 2G band when 5G disabled.

Fix: Check whether need switch channel for band restriction
first, check go force scc later.

Change-Id: Icf8de51321debea2806585d47d2bd4fc6486075e
CRs-Fixed: 2594279
2020-01-03 01:26:38 -08:00
gaurank kathpalia
1c6a5cf628 qcacld-3.0: Allow channel 12, 13 in 2.4ghz for ACS
Currently the driver does not allow the channels
12 and 13 for SAP ACS because most of the legacy
stations don't scan them and they can cause many
IOT issues. But if they are the only channels left
in the spectrum (for eg. all other channels became
unsafe), then the SAP would fail as the driver did
not consider channel 12-14 for ACS.

Fix is to consider 12-14 for ACS, remove them if
other channels are available and if they are the
only channels available in the spectrum, then start
the SAP on any one of these channels.

Change-Id: I599d0e95e9bdc3aed70d6a515d7a52c39846b6f2
CRs-Fixed: 2576635
2020-01-03 00:07:05 -08:00
Liangwei Dong
0527617342 qcacld-3.0: STA+SAP 6Ghz concurrency
When SAP is on 5G and STA connects to 6Ghz AP, the "force
SCC" logic will move SAP to STA home channel if SAP is 6Ghz capable.
If SAP is not 6Ghz capable, SAP will be moved to 2G (DBS) to
avoid MCC(5G+6G) for DBS HW and SAP will stay on 5G for non-DBS HW.
SAP is 6Ghz capable only when all of below statements are true:
a. SAP config includes WPA3 security - SAE,OWE,SuiteB.
b. SAP is configured by ACS range which includes any 6G channel or
   configured by 6G Fixed channel.
c. SAP has no legacy clients (client doesn't support 6G band).
   legacy client (non 6ghz capable): association request frame has no
   6G band global operating Class.

Change-Id: I7e9723fd1b679326a3df61932850589e6e503f3d
CRs-Fixed: 2593569
2019-12-27 11:22:38 -08:00
Liangwei Dong
825d2fc8f3 qcacld-3.0: Acquire sap context before access
Fix potential race condition issue when the sap_context
of adapter is null and it is accessed in work queue -
 __policy_mgr_check_sta_ap_concurrent_ch_intf.
To acquire/release the "sap_context" by get/put API.

Change-Id: I91dacc6d45c377840f7d30f2f9ff902f53ccd8e8
CRs-Fixed: 2592524
2019-12-26 20:42:30 -08:00
Arun Kumar Khandavalli
3801c4f263 qcacld-3.0: Use stop adapter during SSR
Presently, during Subsystem Restart(SSR) the object references
are not released cleanly, invoke stop adapter during the SSR
to have common functionality between the netdevice going down
and SSR.

Change-Id: I2980379022f62ef27dea92868c8033c087544d50
CRs-Fixed: 2587443
2019-12-23 11:42:51 -08:00
Liangwei Dong
10054b9f9e qcacld-3.0: Channel to Freq conversion for channel overlap API
Use frequency as parameter for channel overlap handling
APIs - csr_check_concurrent_channel_overlap,
csr_calc_chb_for_sap_phymode, csr_get_ch_from_ht_profile,
csr_handle_conc_chnl_overlap_for_sap_go.

Change-Id: Ie3c9d466f21d7313998328432c063b1f6c7e5d0f
CRs-Fixed: 2577706
2019-12-23 09:35:06 -08:00
Jianmin Zhu
e75eb51af1 qcacld-3.0: 5G SAP failed to channel switch for sta connecting
When 5G band is disabled by set band,  need SAP switch channel
to 2G. When 5G band is enabled again, need SAP switch back to
original 5G channel. When sta connecting, SAP can't switch
channel.

Merge logic of SAP channel switch for band change and for force
scc with sta, both are implemented in:
policy_mgr_check_concurrent_intf_and_restart_sap now.

After sta associate succeed or fail,
policy_mgr_check_concurrent_intf_and_restart_sap is called again
to check and try SAP CSA for band capability change.

Change-Id: I8574209aac3cabb748a8ec05050244f480e1a0e9
CRs-Fixed: 2589021
2019-12-20 03:51:51 -08:00
Will Huang
3c0285f029 qcacld-3.0: Move back set vdev crypto pararams to wlansap_start_bss
When SSR sap restart, vdev objmgr object will recreate new, if put set
vdev crypto pararams in wlan_hdd_cfg80211_start_bss(), it will not be
invoked by SSR sap restart procedure, so there is no crypto pararams in
vdev and lead to association failure when compare crypto pararams.

Move back set vdev crypto pararams to wlansap_start_bss so sap start
and restart will both invoke it.

Change-Id: I56656ffacbe153fbe73fb6e474048e055cb6a153
CRs-Fixed: 2584138
2019-12-18 02:46:18 -08:00
Arun Kumar Khandavalli
6538f769c0 qcacld-3.0: Add a check for driver status in wlansap_set_band_csa
with a new change I9b2b1ead3b4502022aeefc08359037457bb051f9 added for
to switch from 2.4g from 5g when an indication is received, During the
driver re-initliazation also this function is getting invoked and trying
access freed memory resulting in null pointer deference.

Donot process the function wlansap_set_band_csa when the driver is
recovering.

Change-Id: Iab67d5b77ffc98166bf421ff30bcf641e37fef6a
CRs-Fixed: 2587706
2019-12-17 03:45:12 -08:00
gaurank kathpalia
703aee2018 qcacld-3.0: Set seg1 frequency segment in case of 5ghz 160Mhz
Set seg1 frequency segment in case of 5ghz 160Mhz as
the primary centre channel frequency of 160Mhz band.

Change-Id: Id541419c084d8cdf2a22e84170dbe68d731f5ad0
CRs-Fixed: 2587220
2019-12-16 19:44:53 -08:00
Hangtian Zhu
274e08b80a qcacld-3.0: Fix compile issues when some features are disabled
Fix compile issues when some features are disabled, the features are:
BUILD_DEBUG_VERSION
CONFIG_CP_STATS
CONFIG_HOST_OPCLASS
CONFIG_FEATURE_ROAM_DEBUG
There are some other features depends on each other, so enabled features to
qcs40x.snoc.perf_defconfig, the features are:
CONFIG_WLAN_FEATURE_FILS
CONFIG_WMI_ROAM_SUPPORT
CONFIG_WMI_STA_SUPPORT
CONFIG_REG_CLIENT
CONFIG_WLAN_FEATURE_DP_BUS_BANDWIDTH
CONFIG_WMI_CONCURRENCY_SUPPORT
CONFIG_LL_DP_SUPPORT

Change-Id: I6fa1eacb79576a955e593dbb9ac52083742275e3
CRs-Fixed: 2354496
2019-12-16 06:35:16 -08:00
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