Commit Graph

22 Commits

Author SHA1 Message Date
Will Huang
dc9e47060f qcacmn: Add MCL/SAP DCS process after AFC event update
When AFC event come and update 6 GHz SP channels' state and power
attribution, SAP which already started on 5 GHz or 6 GHz channel
can move in or out from SP channel, which has higher tx power limit.

SAP target channel/bandwidth is decided by ACS channel select callback
register to SAP module, which will take channel max tx power limit
into account.

After target channel/bandwidth determined, SAPs move to same target
channel/bandwidth with eCSA process. If violate any concurrency
limitation, AFC DCS process should abort.

Add AFC component id and reference id.

Change-Id: Iba6933a30c0957eabf549fd6c8442bed547e8152
CRs-Fixed: 3204172
2022-11-29 03:25:45 -08:00
Priyadarshnee Srinivasan
7ef4c7a634 qcacmn: Add input puncture bitmap to channel search API
Add input_punc_bitmap to struct ch_params.
Add input puncture bitmap to regualtory channel search APIs.

The non-SP channels will be punctured by ACS module so that AP
can come up in highest possible BW in Standard Power mode
with the given primary frequency. These punctured channels are not
validated (whether supported in the given power mode of operation) by
the regulatory.

CRs-Fixed: 3278013
Change-Id: I56b0495be902fd92fc6da26e1007d60f930ba687
2022-10-26 01:16:27 -07:00
Jeff Johnson
c52c4258c2 qcacmn: umac: Fix misspellings
Fix misspellings in umac/...

Change-Id: I0e439d67be2aa064b0fb223449e70053d5ecb68a
CRs-Fixed: 3304702
2022-10-11 00:47:34 -07:00
David Oladunjoye
46468556c8 qcacmn: umac: Replace fallthrough comment with attribute
-Wimplicit-fallthrough is being enabled by default. Some compilers
such as clang require the attribute instead of just a fallthrough comment.

Change-Id: Idc7c80891aed551db5b6b87eba7b44b6c75ecad3
CRs-Fixed: 3217348
2022-07-07 00:51:58 -07:00
Aravind Kishore Sukla
6932ea7f8a qcacmn: Replace kmsg logs to debug logs
Change kernel log level to debug level

Change-Id: Ib2736aff0f653d046d502d460f204bba2247246f
CRs-Fixed: 3182588
2022-05-10 09:11:47 -07:00
Bing Sun
5b5276e2ec qcacmn: Avoid invalid tsf information when processing dcs event
In wlan_dcs_wlan_interference_process, reg_tsf_delta >> 8 may be 0 if
FW indicates dcs event with invalid tsf. reg_tsf_delta >> 8 is used as
divisor later.
Check reg_tsf_delta >> 8 in dcs event before using it.

Change-Id: I085a262ee2f85fafd3b2c25896c8365cfab75243
CRs-Fixed: 3170047
2022-04-13 23:09:27 -07:00
Abhijit Pradhan
3f95481d0e qcacmn: Add powermode APIs under a new macro
Use  CONFIG_REG_ 6G_PWR_MODE for the new API.
Use "_for_pwrmode" as suffix for the new functions.

Change-Id: I9b84944a59062277b76bc48877c47ea5afada0ec
CRs-Fixed: 3133023
2022-02-28 12:57:10 -08:00
Bing Sun
87161baa8e qcacmn: Fix build error caused by ucfg_dcs_get_ch_util
The parameters of ucfg_dcs_get_ch_util should be the same whether
DCS_INTERFERENCE_DETECTION is defined or not.

Change-Id: I6281a7a236314bd6d02c05186e2efc52c946b426
CRs-Fixed: 3082164
2021-11-25 21:05:12 -08:00
bings
bc39c95d69 qcacmn: API to get channel utilization values
Add API to get channel utilization values from DCS , which can be used by
other components, like EasyMesh.

Change-Id: If0fa2b98a6c3deb80deea814d941614d1c41f01e
CRs-Fixed: 3054014
2021-10-27 22:24:59 -07:00
Huashan Qu
32aaa05ba7 qcacmn: Add null check for dcs_tx_ops pointer
In function wlan_dcs_cmd_send(), pointer dcs_tx_ops returned from
function call target_if_dcs_get_tx_ops() may be null and will be
dereferenced, it's an issue to dereference dcs_tx_ops without null
check.

Fix is to add null check for dcs_tx_ops pointer before use in
function wlan_dcs_cmd_send().

Change-Id: If82f31bd8f5096a4e6562131426510907555140d
CRs-Fixed: 2989520
2021-07-15 21:52:02 -07:00
Yu Wang
98a3fceeb3 qcacmn: Enhance DCS event handler to support AWGN event
Handle DCS-AWGN event and take actions accordingly:
For STA mode, if the interference locates on primary 20MHz,
disconnect from AP; otherwise, find a max interference free width
and trigger channel change.
For SAP mode, if the interference locates on primary 20MHz,
try to select a random interference free channel and trigger channel
change (stop SAP if no channel is selected); otherwise, find a max
interference free width and trigger channel change.

Change-Id: I33e79f454b459b12ad84f8b0f3259403037464ee
CRs-Fixed: 2958675
2021-07-02 19:02:13 -07:00
Yu Wang
15c52e32f7 qcacmn: Add WMI support for AWGN interference detection
Add APIs to extract AWGN information from the DCS WMI
interference event received from FW.

Change-Id: I4b2f9f4ef012553dac2a405dc7ac12aef9452354
CRs-Fixed: 2958675
2021-06-29 23:49:31 -07:00
Amruta Kulkarni
2ea97ac985 qcacmn: Change file names to cfg_*.h
Change file names from wlan_cfg_*.h to cfg_*.h

Change-Id: Id89dc307c08fc55f1777794453f2168755b5506d
CRs-Fixed: 2856372
2021-05-19 01:25:56 -07:00
Min Liu
0671146738 qcacmn: Replace pdev_id with mac_id for ucfg_dcs APIs
Replace pdev_id with mac_id for ucfg_dcs APIs and update
related documentation.

Change-Id: Ie0dbe992c113aac597dbb6820acd3faba3ac9f3c
CRs-Fixed: 2843510
2020-12-28 01:57:33 -08:00
Min Liu
ffddaeaf60 qcacmn: Add user stats and callback of DCS
Add user stats and callback to indicate DCS stats to userspace.

Change-Id: If841f9cad72ce2303046316d4c16ebf7efd9c3ec
CRs-Fixed: 2773531
2020-11-02 20:46:23 -08:00
hqu
7602376b88 qcacmn: Don't disable DCS firmware event indication
Always enable DCS firmware wmi_dcs_interference_event_id event
indication as CCA feature requires, for below scenario, will
ignore dcs event data and won't do interference detection
algorithm calculation:
a: Current SAP channel isn't on 5G band
b: In the process of ACS
c: In the process of dcs disabling dcs_restart_delay time duration

Change-Id: Ic3d0e5c7ffd7ffc2009e2d86480ea9a6c95b59b3
CRs-Fixed: 2804273
2020-10-29 07:00:49 -07:00
hqu
f2067eb53f qcacmn: Add ucfg API to reset im stats and freq ctrl params
When dcs happened for three times in five minutes, then do
restart(start/stop) SAP operation, when SAP is started again,
dcs may happen again quickly, if total four times dcs happened
in five minutes, dcs_disable_timer will be started due to dcs
happened frequency control policy, it will disable wlan
interference detection for 30 minutes and dcs interference
detection won't work for 30 minutes, it's unreasonable. After
SAP restart, dcs happened times should be calculated from zero.

Add ucfg API to reset im stats and freq ctrl params.

Change-Id: I4ad8234349d24f044dff700d90e1bec859eaa397
CRs-Fixed: 2739299
2020-08-01 13:13:44 -07:00
hqu
a4b218d195 qcacmn: Reset im stats and freq ctrl params when enable dcs wlan im
In the process of dcs disable delay, do restart(start/stop) SAP
operation, when SAP is started, it will send dcs cmd to enable
dcs wlan im again, but dcs_disable_timer is still running and
disable_delay_process is still true, dcs interference detection won't
work in time, after dcs_disable_timer timeout, it will set
disable_delay_process to false and dcs interference detection will
work again, but it will delay for some time from SAP started.

Fix is to reset im stats and freq ctrl params when enable dcs
wlan im.

Change-Id: I5be96b65037088c2797135a2b4c685c2826b2b57
CRs-Fixed: 2676033
2020-05-11 05:24:33 -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
hqu
fe04486a96 qcacmn: Define WLAN_DCS_MAX_PDEVS for dcs use
For MCL side, WLAN_UMAC_MAX_PDEVS is always 1 from current design,
so it's wrong to use WLAN_UMAC_MAX_PDEVS define array dcs_pdev_priv,
since dcs_pdev_priv includes firmware indicated pdev dcs information,
define WLAN_DCS_MAX_PDEVS to 3 for dcs use, this will be compatible
for both MCL and WIN side.

Change-Id: I3bac35f561c49e9959645e85774662ff48d7903d
CRs-Fixed: 2627683
2020-02-27 14:52:33 -08:00
hqu
e6d0730c6b qcacmn: Rename is_target_pdev_id to is_host_pdev_id
It's more suitable that rename is_target_pdev_id to is_host_pdev_id.

Change-Id: I5ec8971ac564e1a26f1b544f9bc2cc08e29f949d
CRs-Fixed: 2627802
2020-02-26 11:40:32 -08:00
hqu
fed4bfb049 qcacmn: Add dcs component
Add dcs component to implement interference detection algorithm
and dynamic channel selection frequency control.

Change-Id: Ia201d77e77feb9de3aff03d6e389d4891dde118e
CRs-Fixed: 2594837
2020-02-13 04:12:30 -08:00