Commit Graph

1947 Commits

Author SHA1 Message Date
Nandha Kishore Easwaran
8a90280e0e qcacmn: Support for IPQ8074 2G PHYB mode 3/3
This mode is supported through hw_mode_id 7. A special mode for
IPQ8074 platform alone to bring up single pdev alone on 2G mode.
FW would advertise the mode 7 support through the WMI service
ready message and this mode will be the default mode for AP-HK10 alone.

Added new APIs in tgt_reg to get pdev_id from phy_id and vice versa.
Fixed all places where pdev_id is used to acces psoc regulatory params
and converted them into use phy_id

Change-Id: I14920627f5e4ddafcc37440fa3281150b65ff04f
CRs-fixed: 2653042
2020-04-08 13:43:46 -07:00
Balaganapathy Palanisamy
db9a00bc6a qcacmn: Return status of delete all command
Return the proper status of wmi peer delete all command.

CRs-Fixed: 2644307
Change-Id: Idb44441872e3a00989ec035b187311079f93b94d
2020-04-08 13:42:53 -07:00
Pragaspathi Thilagaraj
42e7bb35d4 qcacmn: Introduce scan api to get scan entry ageout time
The driver doesn't ageout connected BSS from rrm scan
result after the scan default ageout time. This results
in connected AP information sent in beacon report request
in table mode always.

Introduce scan api to get the scan age out time configured
from scan module. This value will be used as the threshold
in rrm scan filter.

Change-Id: Ib3981538faf179cff53936770f705d41922dca66
CRs-Fixed: 2650914
2020-04-07 18:23:10 -07:00
Vivek
5ebf9cf853 qcacmn: Check if cmd present in serialization queue atomically
The current API to get if a command is present in the active
queue was executed without the lock acquired. Here, at times
we get the queue size as one, and when we actually get the command
from the active queue, we get nothing.

This could be that the command from the active queue was removed
in another context almost at the same time, when we trying to read
the command from the active queue.

To avoid this, we do the operation of reading the queue size and
reading from the active queue with the queue locks held, so no
other context could remove the command from the active queue while
we are reading the command from the active queue.

CRs-Fixed: 2644038
Change-Id: Icca019320b1ba2d7d751432142b9bad50519d701
2020-04-07 03:01:13 -07:00
Hariharan Basuthkar
2905d1d38f qcacmn: Add china_op_class table to the regulatory component
As per IEEE 802.11 2016 specification Annex E Table E-5, add a new
operating class table for China.

Change-Id: I60d610d637c64df497c7c363a893b8f7efdc8a6c
CRs-Fixed: 2656789
2020-04-06 23:35:13 -07:00
Vignesh U
c1c90f6115 qcacmn: Sync PreCAC NOL with NOL
Problem:
1) When operating in 36VHT160 for example, if radar is hit without
bandwidth reduction dfs_radar_add_channel_list_to_nol_for_freq will add
only DFS channels (52,56,60,64) to NOL and disable them corresponding in
regulatory channel.
2)dfs_mark_precac_nol_for_freq will add all channel non-DFS(36,40,44,48)
and DFS (52,56,60,64) to preCAC nol. 3) after NOL expiry
non-DFS(36,40,44,48) will not be removed from the preCAC tree and
therefore cannot used (as part of the full 160Mhz channel) in future to
perform agile.

While processing RADAR the dfs_process_radar_ind() prepares the
list of frequencies (freq_list) to be added to NOL. This list
also contains the non-DFS channels.

Only DFS channels will be added to the NOL in
dfs_radar_add_channel_list_to_nol_for_freq() based on the channel state.
On adding to NOL, the channel state is also changed to disabled.

The subsequent APIs  that will need to process
NOL(dfs_mark_precac_nol_for_freq() for instance) will have only the
freq_list. Since the channel state is also changed for DFS channels in
freq_list, these APIs cannot differentiate a NOL channel and nonDFS
channel (as channel state is not DFS for both). Thus not adding
NOL channels to PreCAC NOL list.

Solution:
Use the NOL frequency list (nol_freq_list) that is the output
of dfs_radar_add_channel_list_to_nol_for_freq() to process NOL.

CRs-Fixed: 2655016
Change-Id: If3608405a5e8e63d93157914080dde4c01c1e0bb
2020-04-04 05:51:41 -07:00
Vignesh U
67f4d02569 qcacmn: Add 165MHz channel check for PreCAC done
Since the precac tree now supports until 165MHz, the APIs to check
if the channel has done precac or not,
dfs_is_precac_done_on_ht20_40_80_chan_for_freq() and
dfs_is_precac_done_on_ht8080_ht160_chan() needs to be updated.

Change dfs_is_precac_done_on_ht20_40_80_chan_for_freq() to
dfs_is_precac_done_on_ht20_40_80_160_165_chan_for_freq() which can
check if precac is done on a 20/40/80/160/165MHz channel.

Change dfs_is_precac_done_on_ht8080_ht160_chan() to
dfs_is_precac_done_on_ht8080_chan() which can check if precac is done
on a given 80P80MHz channel other than the restricted 80P80MHz
(165MHz) channel.

Change-Id: I90312f968547d16b2d93783138c0f870439c6c26
CRs-Fixed: 2653171
2020-04-03 01:47:46 -07:00
Bapiraju Alla
acf898a145 qcacmn: Fix return type for scheduler_msg callbacks
This fixes a CFI failure in callback assignment

Change-Id: I760b41b81c006187efb162d410390e1c11878b82
CRs-Fixed: 2643320
2020-04-01 12:40:45 -07:00
Padma Raghunathan
e7d986e168 qcacmn: Avoid to use WIN only APIs
Avoid to use WIN only APIs. This is part of moving CFR to hostcmn.

Change-Id: Ib6be520657b5e6d42eaed4d9c3a3940c691e9d84
CRs-Fixed: 2637130
2020-03-31 00:43:55 -07:00
Wu Gao
ce9aa9088e qcacmn: Fix compilation issues
This is part of moving CFR component to hostcmn. Fix compilation
issues in this change.

Change-Id: Ia0a40da1e7e9201ffc5d1700cccea4181b358842
CRs-Fixed: 2637129
2020-03-30 22:56:08 -07:00
bings
f5067f066b qcacmn: Return invalid agile detector ID if agile dfs is not supported
When QCA_SUPPORT_AGILE_DFS is not defined, dfs->dfs_agile_detector_id
will not be set and it will be 0, which is also a meaningful detector id.

Currently, if radar_found->detector_id is not set, or set as 0, the
detector ID is recognized as a valid agile detector which is incorrect.

Return invalid agile detector id if agile dfs is not supported.

Change-Id: I259fa6f3f9fbcb4a76567090a8f084e15ee6af93
CRs-Fixed: 2646946
2020-03-30 15:29:34 -07:00
Gurumoorthi Gnanasambandhan
806b7c72df qcacmn: Beacon protection support
Changes to support Beacon protection. Additional key ix 6 and 7
support BIGTK. Update beacon template for Beacon protection support.

CRs-Fixed: 2632290
Change-Id: Ic37d17f5076bb28d2e1f2430da039cc8b9f759b6
2020-03-30 13:40:07 -07:00
Wu Gao
a308b3e970 qcacmn: Add CFR files for QCA6490
Since there are chip differences about channel frequency response. Add
files for QCA6490. This change also adds CFR configure file

Change-Id: Ib200affe4c68dac5535c4a3d65109072559161ff
CRs-Fixed: 2637134
2020-03-30 13:39:43 -07:00
Hariharan Basuthkar
7165baf6ce qcacmn: Add BW macros and rename wlan_reg_country_opclass_freq_check
Add the macros BW_5_MHZ, BW_10_MHZ, BW_20_MHZ, BW_25_MHZ, BW_40_MHZ
to denote channel width and define them as 5, 10, 20, 25 and 40
respectively.

Also rename the API wlan_reg_country_opclass_freq_check to
wlan_reg_is_freq_in_country_opclass.

Change-Id: I6838bd87a9b8d0754909cea414ada4b09ed01643
CRs-Fixed: 2646416
2020-03-30 01:14:51 -07:00
Vignesh U
c91b3875a7 qcacmn: Assign bin5 radars to MKKN DFS domain
MKKN domain should detect the bin5 radars of MKK4 DFS domain.

Add the bin5 radars to the MKKN domain's bin5 radar table.

Change-Id: I0d0fbe91e56f4a290a675832fe4b9974f9afbf0d
CRs-Fixed: 2645168
2020-03-27 16:43:18 -07:00
Shashikala Prabhu
ee42cb1f26 qcacmn: Use chan freq for restricted 80+80 MHz boundary check
Instead of channel number, use channel frequency for restricted 80+80MHz
boundary  check.

Change-Id: I2fa65c3b1d102acd6b64b4c6e1583d2bc29484d1
CRs-Fixed: 2645155
2020-03-27 15:00:05 -07:00
sheenam monga
c50efb4f56 qcacmn: Add Support for ACTION_CATEGORY_RVS
Currently, mgmt_txrx_get_action_frm_subtype does not handle
ACTION_CATEGORY_RVS. In case action_category is
ACTION_CATEGORY_RVS, mgmt_txrx_get_action_frm_subtype
returns MGMT_FRM_UNSPECIFIED due to default handling. Function
tgt_mgmt_txrx_rx_frame_handler returns QDF_STATUS_E_FAILURE
on receiving MGMT_FRM_UNSPECIFIED frame type and drops mgmt
frames.

Fix is to add support for ACTION_CATEGORY_RVS in
mgmt_txrx_get_action_frm_subtype to avoid drop of MCSC
frames. Add new management frames MGMT_ACTION_SCS_REQ,
MGMT_ACTION_SCS_RSP, MGMT_ACTION_GROUP_MEMBERSHIP_REQ,
MGMT_ACTION_GROUP_MEMBERSHIP_RSP, MGMT_ACTION_MCSC_REQ,
MGMT_ACTION_MCSC_RSP and new element ACTION_CATEGORY_RVS
in mgmt_action_category. mgmt_txrx_get_action_frm_subtype
Finds rvs frame subtype and returns subtype instead of returning
MGMT_FRM_UNSPECIFIED.

Change-Id: Iad1abac120770724f9ae6d86f524c4d722fb0aaa
CRs-Fixed: 2649900
2020-03-27 06:28:59 -07:00
sheenam monga
06869dc028 qcacmn: Send oce_ap_tx_pwr_weightage_pcnt to firmware
In struct weight_config, "oce_ap_tx_pwr_weightage" added newly.
Station uses "oce_ap_tx_pwr_weightage" as one of the parameter for
selecting AP candidate during initial connection. Host sends
"oce_ap_tx_pwr_weightage" ini value to firmware over WMI command
WMI_ROAM_AP_PROFILE.

Add oce_ap_tx_pwr_weightage in scan object scoring param to calculate
weightage based on AP tx power and select candidate accordingly.

Change-Id: I7f717e9cc398e8b9307f2f464f972b095c06364b
CRs-Fixed: 2647116
2020-03-26 07:13:13 -07:00
aloksing
d201c0e789 qcacmn: Add NULL check for regulatory psoc
reg_get_psoc_obj may return NULL.
Add check if regulatory psoc is NULL and return QDF_STATUS_FAILURE.

CR-Fixed:2648152
Change-Id: I9637fa367873cd62fa18d1f5ecd80f6fe454558b
2020-03-26 07:12:59 -07:00
Wu Gao
8940e61395 qcacmn: Use qdf streamfs APIs to replace qal streamfs APIs
Use qdf streamfs APIs to indicate data to user space. This is part of
moving CFR component to hostmn.

Change-Id: I2abc46fdfb36d24eef201ab21f5744d951595ea1
CRs-Fixed: 2637128
2020-03-26 05:26:21 -07:00
Ashish Kumar Dhanotiya
ec326a7ae8 qcacmn: Address synchronization issue in 11d state machine
Currently whenever host gets an indication for the cc event
list, it starts 11d machine and inside 11d state machine,
it decides that whether host needs to send start 11d scan
command to fw or stop 11d scan command to fw, based on that it
updates the enable_11d_supp variable of regulatory psoc private
object and posts the message to scheduler.
FW expects that host should not send back to back 11d start
scan command, there should be one 11d stop scan command before
next 11d start scan command is sent if already one 11d start
scan command is sent.
Host 11d state machine takes care of the above sequence
of 11d scan command by using enable_11d_supp. 11d state machine
sets enable_11d_supp whenever 11d scan start command needs to
be sent and resets enable_11d_supp whenever 11d scan stop
command needs to be sent and posts the message in the scheduler.
There is a case where if host receives the 11d cc event from FW
it sends the set country command to FW and at the same time if
user command comes to set the country, host again sends the set
country command to FW. FW processes both of these commands and
sends the cc list event to host. when host receives cc events
it starts the 11d machine. For the first cc event which is for
11d country which is processed as user country because of
incorrect logic in reg process master channel list where it is
assumed that at a time only one type of country set command can
be pending and first priority is given to the user country pending,
host resets enable_11d_supp and post the command to scheduler.
When host receives the cc list event for the user country it is
processed as 11d country and inside 11d state machine it sets
enable_11d_supp and posts the command to scheduler.
Now if scheduler schedules these commands it treats both the
commands as start 11d scan commands as enable_11d_supp is set
and sends start 11d scan command back to back.
To avoid above issue, add enable_11d_supp also as part of
the scheduler msg body pointer along with the psoc, in she
scheduler callback use this local variable to decide whether
11d start scan needs to be sent or 11d stop scan needs to be
sent.

Change-Id: I60150da1475251a1c22778a0f924bdfbe1bb1140
CRs-Fixed: 2641803
2020-03-25 22:30:17 -07:00
Qun Zhang
4bc614dd0c qcacmn: Replace QDF_MAX_NUM_CHAN with NUM_CHANNELS to aviod OOB access
Currently QDF_MAX_NUM_CHAN and NUM_CHANNELS aren't aligned, this unalignment
may cause many potential OOB access. So replace QDF_MAX_NUM_CHAN with
NUM_CHANNELS to keep unified.

Change-Id: I7bf7829d776f7caf5b2afbd2c9fd0c20d608e630
CRs-Fixed: 2644073
2020-03-25 07:09:34 -07:00
Padma Raghunathan
cf4f404f0f qcacmn: Add new file to hold CFR specific configuration
Add new file to exchange CFR config with userspace

Change-Id: Ia66dfdcd1f121699f04b579c9867a9f78286a4f8
CRs-Fixed: 2639069
2020-03-24 23:58:08 -07:00
Vignesh U
6933f411c1 qcacmn: Add support to configure 165MHz Agile channel
The FW has updated the wmi command wmi_vdev_adfs_ch_cfg_cmd_fixed_param to
configure the Agile channel to enable the 165MHz channel as an Agile
channel by enabling 2 center frequencies.

For a 160MHz and 80MHz channel, the parameter center_freq1 will be the
center of the respective channels. For the 165MHz channel(restricted 80p80)
the parameter center_freq1 will be the center of the left 80MHz channel
(5690MHz) and the parameter center_freq2 will be the center of the right
80MHz channel (5775MHz)..

Update the ADFS parameters across UMAC, TARGET_IF and WMI layes to
update the Agile channel configuration command.

Change-Id: Ie480af9a6bb8dad87dd783ab06e17b449605b1c9
CRs-Fixed: 2642555
2020-03-24 02:42:43 -07:00
Vignesh U
2a82e71b65 qcacmn: Introduce constants for 160MHz precac tree
Introduce constants for building the 160MHz precac tree.

Add support to insert the 165MHz channel into the precac tree.

The precac entry is not restricted to be 80MHz bandwidth, it can be
20/40/80/160/165MHz, therefore introduce a new variable bw to
accommodate different bandwidths.

Change-Id: I57d1e2173712b54238f89079783f27ef591921d1
CRs-Fixed: 2647246
2020-03-24 02:42:26 -07:00
Vignesh Mohan
2b0ff06748 qcacmn: Add support for Bangradar with detector ID
Provide support for bangradar with detector ID as one of the parameters.
Add the parameter as part of the packed arguments to be sent to FW.

Also add APIs for basic sanity check of bangradar params and packing
bangradar params inside an 32 bit unsigned integer.

CRs-Fixed: 2646549
Change-Id: Ie781bc9421b7ac0d407eb01814c9242c7f988884
2020-03-23 23:13:52 -07:00
Priyadarshnee S
28216f27e4 qcacmn: Add HT40 channel 140 and 144 to us_op_class
According to Annex E of 802.11 specification (Table E-1—Operating classes
in the United States) add opclass support for HT40 channel 140 and
144 in us_op_class map. Currently for HT40 channels 140 and 144,
us_op_class map does not have a valid entry and hence opclass is
fetched as 0.

CRs-Fixed: 2626714
Change-Id: I848d6266c829c363f353de9911359349c379126b
2020-03-23 06:03:38 -07:00
Ashish Kumar Dhanotiya
dc6a3bab24 qcacmn: Allocate vdev private data along with vdev
Currently vdev private data osif_priv gets allocation
separately and requires to be de-alloc separately.
This de-alloc needs to be taken care at different places
based on the vdev create failure or whenever vdev is freed.
As vdev private data is associated to the vdev and needs to
be freed if vdev is not there, it is good to allocate this
private data along with vdev so that there is no need
to maintain allocation and de-allocation of vdev priv data
separately.
As part of this change alloc the vdev priv data along with
the vdev allocation as a single memory and free of the vdev priv
data will be taken care as part of vdev free.

Change-Id: Ib442958c2d8684706830782d339c589c5f5daddf
CRs-Fixed: 2636222
2020-03-23 04:10:40 -07:00
Vinay Gannevaram
7ccc84acb3 qcacmn: Add support for NLA type OEM_DATA REQ-RESP in LOWI
Host driver processes cld80211 vendor subcmd
CLD80211_VENDOR_SUB_CMD_OEM_DATA and send
response in NLA format. Peer status indication
is also sent in nla format

CRs-Fixed: 2597282
Change-Id: I94f1fb7939141952ef92dbb7d3a130ba20d31608
2020-03-21 12:35:42 -07:00
Vinay Gannevaram
8fd2d1abbf qcacmn: Add support for NLA type CH_INFO_RESP in LOWI
Host driver processes cld80211 vendor sub command
CLD80211_VENDOR_SUB_CMD_GET_CH_INFO and respond with
NLA type CH_INFO response

CRs-Fixed: 2595374
Change-Id: Ibe6f2431ac1cae6e4560ec11424434b4f1cf8b76
2020-03-21 12:35:24 -07:00
Vinay Gannevaram
23a3603951 qcacmn: Add support for NLA type CAP_RESP in LOWI
Host driver processes cld80211 vendor sub command
CLD80211_VENDOR_SUB_CMD_GET_CAPS and respond with
NLA type CAP response

CRs-Fixed: 2595140
Change-Id: I5a6aa1fac537ca618404520b81c541a20dafd6fb
2020-03-21 12:35:02 -07:00
Rhythm Patwa
623955bd83 qcacmn: Add Rx Ops to update the FD template
Add RX Op function to update the FD template in case of
any updates to the FD frame parameters.

CRs-fixed: 2637082
Change-Id: I1d7b488d177a32ddc57129f227df26d5774aa9e1
2020-03-20 20:36:31 -07:00
Hariharan Basuthkar
e10cc0fc38 qcacmn: Remove opmode check for WIN in vdev_mgr_start_param_update
When staDFSEn option is enabled in the UCI, radar detection fails on a
STA VAP.

In the function vdev_mgr_start_param_update,since there is a condition
check for QDF_SAP_MODE and QDF_P2P_GO_MODE, the
tgt_dfs_set_current_channel_for_freq function does not get calledin case
of STA opmode.

As a result, DFS flag does not get set for the dfs->dfs_curchan,
and DFS_RADAR_EN flag does not get set for dfs->dfs_proc_phyerr.
Therefore, within the function dfs_process_phyerr, the function returns
without processing the radar pulses.

To fix this issue, add a new function
vdev_mgr_check_opmode_and_des_chan_freq under a macro
QCA_MCL_DFS_SUPPORT. If QCA_MCL_DFS_SUPPORT is defined, check the opmode
of the vdev, and frequency band of des_chan_freq. If QCA_MCL_DFS_SUPPORT
is not defined, return true.

Change-Id: I66fe3d4ccc0b75b70652b04f9bf93b199268f1fa
CRs-Fixed: 2640208
2020-03-20 00:15:58 -07:00
Abhinav Kumar
3d4911dc92 qcacmn: Log enhancement for PNO scan
Enhance logs for PNO scan to remove duplicate
or unwanted prints and keep only useful logs to debug.

Change-Id: Ibe24714e925a00933911c801685528849e160480
CRs-Fixed: 2636641
2020-03-19 10:46:08 -07:00
Hariharan Basuthkar
cc9fb0cd68 qcacmn: Add frequency range check in reg_get_band_cap_from_op_class
When the operating class 82 is given as an input to the function
reg_get_band_cap_from_op_class, it is not found due to an
incorrect conditional logic that checks the starting frequency of a
band.

To address this problem, add a function
reg_get_band_cap_from_chan_set and call it within the function
reg_get_band_cap_from_op_class, to check if a channel in the channel
set, is within the frequency range of the band.

Change-Id: I7cbd8decf3c19f80e60a3153529b622b144feac9
CRs-Fixed: 2636367
2020-03-19 05:48:10 -07:00
Vivek
c27a6095e9 qcacmn: Provide valid range for gScanProbeRepeatTime INI
The default value provided for the INI item
gScanProbeRepeatTime for WIN is 50 which is
beyond the specified INI range 0 and 30.

Changing the max value to 50 to accommodate
the default value used by the INI and avoid
warning while parsing INI values.

CRs-Fixed: 2633733
Change-Id: I442d07de55813c930b77e7dfffcdebf5372c5c0e
2020-03-18 23:53:26 -07:00
Vignesh Mohan
0bdf0bea6a qcacmn: Translate radar params for true 160Mhz devices
In chipsets that support true 160MHz (single synthesizer),
the radar parameters received from target are different from Hawkeye
based chipsets in which two synthesizers, each 80Mhz,
produce 160Mhz signal.

The segment ID received in true 160MHz chipsets is always 0 and the
frequency offset is with respect to the center of 160MHz; unlike in
Hawkeye where segment IDs can be 0 (primary) or 1 (secondary) and
the frequency offset received is with respect to the corresponding
frequency centers (of the segment ID received).

Hence, to be able to use the same radar found algorithm as used in
Hawkeye, add a translation/mapping API that will translate new
parameters to old equivalents.

CRs-Fixed: 2633062
Change-Id: I37ad1db4ca71231119cf547abb9a8a70577cc6a4
2020-03-18 15:38:58 -07:00
Vignesh Mohan
48c594436d qcacmn: Add API to identify true 160 and restricted 80p80 support
In a future product, 160MHz mode of operation is acheived through
a single detector, unlike Hawkeye and its variants where 160MHz mode
is acheived using two 80MHz detectors.

Because of this change, the maximum segment ID is 0 in the new chipset,
whereas 1 in Hawkeye and its variants. Also the Agile detector ID
is 1 in the new chipset, 2 in Hawkeye and its variants.

In light of these changes, to identify the true 160MHz capability,
add a new API that checks the target type and returns true 160MHz
capability based on the target type. Also introduce a new dfs
variable that maintains the agile detector ID (based on the
true 160MHz capability).

In the future product, there is a support of restricted-80p80MHz
(a.k.a 165Mhz) where channels 132,136,140,144,149,153,157,161 are
available for operation as an 80p80Mhz channel.
Add a DFS API to check if this support is enabled.

CRs-Fixed: 2623964
Change-Id: If813e9d6fc649ce99c7780c04fbcb61acbd1af86
2020-03-18 15:38:48 -07:00
Abhishek Singh
5cf1392709 qcacmn: Populate RNR info during scan req
Populate RNR info during scan req instead of beacon
add/delete to avoid loop while holding scan db spin lock.
With loop spin lock can take more than 5ms, which can results
in asserts.

Change-Id: I4ba346b8dcbaf7da844f97195dbdd3003bdb234b
CRs-Fixed: 2640889
2020-03-17 07:19:22 -07:00
Amruta Kulkarni
2eb8560c88 qcacmn: Set default active dwell 2g time to 40ms for SAP
For SAP related scan (ACS,OBSS), set the active dwell time in 2G to 40 ms.

Change-Id: I5a34fc207ac281f5616e6071c66594f61451a512
CRs-Fixed: 2636152
2020-03-17 03:10:52 -07:00
Vignesh Mohan
1d4f7736d3 qcacmn: Use frequency ranges for copying NOL after mode switch
Current NOL conversion for dynamic mode switch is in such a way
that the NOL data is copied to the pdev ID entry for the targeted
mode. That is, the NOL data is split/merged before mode switch and
copied to a temporary structure before mode switch command is
sent to FW.
At this point, the target pdev's frequency range are still the old
values because of which, certain entries of the NOL data are missed.
Also in case of FW failures, the NOL entry cannot be added back
because they have been merged/split already.

To avoid the above, rearchitecture deinit and reinit NOL for
mode switch in such a way that the NOL data, as-it-is, is copied
before mode switch and is only split/merged after the frequency range
of the pdevs are properly mapped and the FW response is a success.

Change-Id: I4a073d1327ba182c40ced6089aa46d8f5f241d33
CRs-Fixed: 2632582
2020-03-16 06:08:43 -07:00
Abhishek Singh
171ac51c1a qcacmn: Fix uninitialized RNR list and OOB memory access
Fix the case where RNR list can be used uninitialized and
fixed the OOB memory write access in 6Ghz BSSID and SSID hints
in scan req.

Change-Id: Ifc6a5f65876cd3ace744031bf59a3640409b63da
CRs-Fixed: 2637039
2020-03-14 12:45:45 -07:00
Lincoln Tran
a329901cca qcacmn: Add regulatory API to get country code
Implement function to allow regulatory code to get country code and source

Change-Id: I2713913ba212509e778229b3041363a32ca6049e
CRs-fixed: 2634077
2020-03-14 12:45:29 -07:00
Liangwei Dong
86dd484d69 qcacmn: Radar event process based on concurrency policy
Per requirement, if STA+SAP is working on same 5G DFS
channel and INI g_sta_sap_scc_on_dfs_chan = 2, the
SAP DFS master is temporarily disabled to skip radar event,
and it will follow STA's channel movement. So, skip the
radar event processing based on STA+SAP concurrency policy,
otherwise the SAP would be stopped by kernel because the
current home channel is marked "disabled" by regulatory
during processing of radar event.

Change-Id: I3f851fe694c0e127665732894306e20f5d1c93f4
CRs-Fixed: 2636200
2020-03-14 09:15:37 -07:00
Sumedh Baikady
c673777be4 qcacmn: Add WMI event support for dynamic Muedca
Add support for WMI event to host to process
dynamically selected Muedca values and update
the mgmt frames with the new set of values.

Extract the params and store in Muedca_param
struct from control path, to be used for
updating mgmt frames.

Change-Id: I6cc7756d1a246ff994edef195f6191d280bc5c47
2020-03-14 09:15:20 -07:00
Jianmin Zhu
2ba2d3eda3 qcacmn: Mixed error code and tx power
When channel invalid, error code is treated as
tx power value by the caller.

Change-Id: Ie37c7f04734be46b6237acffe02eed3f31923012
CRs-Fixed: 2636772
2020-03-13 17:29:15 -07:00
Paul Zhang
063ee32509 qcacmn: Initialize num_phy in reg_program_default_cc
When regdb is non offload, it invokes ucfg_reg_program_default_cc
to initialize the default country code. Because the num_phy is not
initialized and the country code source cannot not initialize
properly in function reg_process_master_chan_list, 11d cannot be
triggered.

Solve the problem mentioned above by initializing num_phy in
reg_program_default_cc. Since it is non-offload, initialize
num_phy to 1.

CRs-Fixed: 2584347
Change-Id: Idaed2badc908c74bcbb9312368fed8cbb71ac69c
2020-03-13 15:32:33 -07:00
Padma Raghunathan
9946d36d19 qcacmn: Add CFR feature support
Add CFR feature support for WIN and MCL.

Change-Id: I135409c00df953ad7ae4e570418403b11ebc1bc7
CRs-Fixed: 2639069
2020-03-13 06:47:56 -07:00
hqu
a3dc09cce3 qcacmn: Define pointer p_dcs_im_stats instead of dcs_im_stats
Both im_intfr_cnt and im_samp_cnt need to store for following
dcs event process, dcs_im_stats is a local variable, so both
im_intfr_cnt and im_samp_cnt value will be missing when function
wlan_dcs_wlan_interference_process return.

Fix is to define pointer p_dcs_im_stats for use.

Change-Id: I39622fbf0153271f27a03387ace4a270a912b6ff
CRs-Fixed: 2638316
2020-03-11 03:49:50 -07:00
Abhiram Jogadenu
928035a1a4 qcacmn: Use global opclass for 6GHz channel lookup
For 6G band, only valid opclass_table is the global_op_class
as per the current specification. Therefore, if the band is 6G
set the opclass to global_op_class instead of the default class.

Change-Id: I43d1be8266aa80b11c446d84bc3d027cde8bebea
2020-03-10 03:53:14 -07:00