Commit Graph

694 Commits

Author SHA1 Message Date
Liangwei Dong
1e9d981107 qcacld-3.0: Sync csr_roamProfile.ch_params with sap ctx
The mhz_freq_seg0 & mhz_freq_seg1 fields are not assigned
with values from sap ctx.
Fix by copy the whole the struct of "ch_params" to
csr_roamProfile.ch_params instead of one by one.

Change-Id: I92d7bc6ddeed1038597c7639d41fca059bf13457
CRs-Fixed: 2688693
2020-05-20 10:07:33 +08:00
Jia Ding
30531d5a10 qcacld-3.0: Properly populate struct csr_del_sta_params
eCsrForcedDeauthSta equals to 14 and as far as reason
codes are concerned, it is MIC_FAILURE. It is observed
that when wlan is configured as SAP-SAP DBS with same
SSID and same encryption WPA2/WPA3 mixed mode, it leads
to an IOT issue where clients with iOS 13 in particular
are not able to auto reconnect back after wlan is restarted.

Thus populate subtype to IEEE80211_STYPE_DEAUTH >> 4 and
reason_code to WLAN_REASON_DEAUTH_LEAVING as defined in
kernel since station_del_parameters is a kernel defined
structure.

Also correct internal use of subtype since right shift
4 for SIR_MAC_MGMT_DEAUTH and SIR_MAC_MGMT_DISASSOC
will always end up with value 0.

Change-Id: I60aa5ed4e7b672b7a92f05ad322fcb48ab0526d4
CRs-Fixed: 2678637
2020-05-15 10:41:25 -07:00
Lincoln Tran
9faaae1bb7 qcacld-3.0: Cleanup instances of CFG_COUNTRY_CODE
Remove instances of CFG_COUNTRY_CODE and country_code from
wlan_mlme_reg struct.
Remove redundant country code APIs.

This change is needed because the country code is no longer
stored in CFG file, and subsequently, there is no need for
CFG_COUNTRY_CODE.

Change-Id: Ia4b3b40d0dccfde696352967f2902dfba344a445
CRs-Fixed: 2634079
2020-05-08 18:50:54 -07:00
Liangwei Dong
06109080e9 qcacld-3.0: Correct 160MHz SAP dfs flag
Use wlan_reg_get_channel_state_for_freq API to get channel
state and identify 6Ghz channel as non-dfs channel.

Change-Id: Ib134a71c62e24324abc12e5a5b11a524e89de810
CRs-Fixed: 2681608
2020-05-08 16:40:04 +08:00
gaurank kathpalia
e423549d8e qcacld-3.0: Add support for DFS channel weightage in ACS
Add support to provide the channel weightage of
DFS channels so that the weight can be configured
and the user can control whether they are allowed
to be selected for the SAP.

Change-Id: I53a22a0059d56aa8fca66215fed1ed0588db7db5
CRs-Fixed: 2676919
2020-05-07 11:24:02 -07:00
Utkarsh Bhatnagar
767aabd6e1 qcacld-3.0: Corrected logging in sap_fsm_state_init
The log signifying SAP failure was incorrectly printed.
Changed the logic to print those logs correctly

Change-Id: Ifc26b34f41c60a3ce50d9c7cfc4ecd0739853844
CRs-Fixed: 2680263
2020-05-07 08:44:07 -07:00
Lincoln Tran
92ab495e37 qcacld-3.0: Fix potential NULL pointer dereference
Add check to ensure context pointer is not NULL before dereferencing

Change-Id: I737ae4d1e5aa07bcbbe612a93905a23fa857b90a
CRs-fixed: 2669214
2020-05-02 04:27:13 -07:00
Utkarsh Bhatnagar
a07afa12be qcacld-3.0: Increased logging in wlan_hdd_cfg80211_channel_switch
Added debig logs in __wlan_hdd_cfg80211_channel_switch and in
wlansap_set_channel_change_with_csa

Change-Id: Idf0f29f21d879e32a0ad8e1db25fc8360ec36800
CRs-Fixed: 2676407
2020-05-01 08:44:04 -07:00
Liangwei Dong
4c11f80dcb qcacld-3.0: Refine Max chanwidth selection for SAP chanswitch
Remove the calls to wlan_reg_dmn_get_opclass_from_channel API
when SAP is changing channel by ECSA/CSA.
The API accepts channel number and will cause issue when 6GHz
band is supported in target.

Change-Id: Ib6c67417f1a0edae88b5e714e3ed23c589e7eb62
CRs-Fixed: 2676354
2020-05-01 05:14:57 -07:00
hqu
74dd2a91bf qcacld-3.0: Do sap channel switch with 20MHz width in 11a mode
Bring up SAP(2.4G)+SAP(161 channel with 11a mode)+STA mode, when STA
is connected to ref-ap on channel 36, 11a mode SAP will also switch
channel to STA's connected channel due to force scc, it will set
channel width to CH_WIDTH_40MHZ for 11a mode SAP channel switch,
actually 11a mode SAP doesn't support CH_WIDTH_40MHZ, it's wrong and
issue is introduced by
'Change-Id: I709dd35575866b7ec9fddcfb94078f114a78d1a2'.

Fix is to set channel width with 20MHz for 11a mode in function
wlansap_update_csa_channel_params().

Change-Id: I90fea788ff30ef0897c1ba98ad5b4d3c8eec3695
CRs-Fixed: 2623617
2020-04-28 07:32:13 -07:00
Li Feng
865036ff4f qcacld-3.0: Take account of dfs cac state to determine dfs_cac_block_tx
Regarding to the go+sap scc on dfs channel, sap can follow with go
to the same dfs channel, but sap tx is hung.
Since the host set the dfs_cac_block_tx by mistake when ap started,
though the ap skip the cac because the scc go finished the cac
procedure, then dfs_cac_block_tx has no chance to be reset.

The fix is to take account of dfs cac state to determine the proper
dfs_cac_block_tx.

Change-Id: I7a35225711f587b83d2fc381108d7d3f15893867
CRs-Fixed: 2631457
2020-04-27 21:31:50 -07:00
gaurank kathpalia
4d769c247d qcacld-3.0: Use correct hw mode switch reason
Currently the driver uses the reason code
POLICY_MGR_UPDATE_REASON_CHANNEL_SWITCH for
chanenl switch for P2P-CLI which is same
reason code used for hw mode change in case
of SAP, so after the hw mode is changed the
VDEV-SM does call the callback of SAP CSA
also.

Fix is to use a different reason code for
SAP CSA.

Change-Id: I16b0521d5a21391e642f29e86037f9eb4fd2af62
CRs-Fixed: 2663915
2020-04-18 19:18:40 -07:00
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