Commit Graph

2927 Commits

Author SHA1 Message Date
Edayilliam Jayadev
c194d157aa qcacmn: Simulation debug support for reo
Debug frame work to simulate the generation of management
frames by HW, processing of management frames by FW and Host.
This would help in exercising the management Rx reorder
algorithm.

Change-Id: I9ec585b1bb41a5eb5e6226d0151ad23143fdb8f7
CRs-Fixed: 3017577
2021-11-09 13:27:09 -08:00
Yu Wang
33958ed42f qcacmn: handle MLO scenario for candidate validating
Add flag to indicate whether MLO is supported by the candidate or not,
which is helpful when checking concurrency.

Change-Id: I166ad2963163ae4dc7989516b654dce4cb635cec
CRs-Fixed: 3013418
2021-11-07 22:52:53 -08:00
Shwetha G K
9c320060ac qcacmn: Waikiki CFR changes
Add CFR support inclusing 240MHz & 320MHz for
Waikiki Chip.

CRs-Fixed: 3057992
Change-Id: I87499369a076ca561fea066ebbfc2ebeab854868
2021-11-03 12:54:38 -07:00
Bapiraju Alla
055acf7a87 qcacmn: Notify partner links info in connect response to the supplicant
Fill ML partners info in connect response structure of the connect
notification to the supplicant.

Change-Id: I3b972254138d0f00ef63f2b4d336d142e6d5e2ae
CRs-Fixed: 3036325
2021-11-03 11:31:38 -07:00
sheenam monga
a4ba2f1844 qcacmn: Update Regulatory Database to 37th version
Add below changes as part of 37th Reg DB version
    a.) Add superdomain FCC1_6G_09 for US AFC Testing
    b.) Add sub 6G domain FCC1_6G_09 reg rules for new domain.
    c.) Add 6G support for GERMANY, ICELAND, PERU and NORWAY.
    d.) Change reg domain pair id for TANZANIA and SOUTH_AFRICA.

Change-Id: I7af2778954c65f85b727453a0a0527e2d4d09089
CRs-Fixed: 3064525
2021-11-02 19:32:21 -07:00
sheenam monga
00cb0d5ed0 qcacmn: Update Regulatory Database to 36th version
Add below changes as part of 36th Reg DB version
a.) Update FCC1_CLI_LPI_REGULAR_6G to FCC1_CLI_LPI_DEFAULT_6G.
b.) Add sub 6g domains APL3_AP_VLP_6G and APL3_AP_LPI_6G and
    reg rules for new domains.
c.) Add superdomain FCC1_6G_07 and APL3_6G_08 for Brazil and UAE

Change-Id: I2d379762f9d5953c47c88e08511fe227ea25ce85
CRs-Fixed: 3057765
2021-11-02 19:32:17 -07:00
Lincoln Tran
a89e4f0c78 qcacmn: Fix MLO peer manager compilation issue
Fix MLO compilation issue while exporting the symbol
wlan_mlo_link_peer_delete.

Change-Id: I911917ab7f142fdc49ea99e9613ddb6fb86b5ab3
CRs-Fixed: 3067718
2021-11-02 16:32:03 -07:00
Himanshu Batra
5a4b4ec7ca qcacmn: Ignore ml sta connect notification when connect req is flushed
If vdev is not in disconnected or connected state,
then the event is received due to connect req being flushed.
Hence, ignore this event

Change-Id: If7f51496fcca283cb6559b027a21df82ae9ec7d2
2021-11-01 01:42:27 -07:00
narayan
70ade22606 qcacmn: Enable CFR support for QCA9574
Enable CFR host support for QCA9574.

Change-Id: I8d6a0f5b59715f244256854fc2132f33f841f316
CRs-Fixed: 3062447
2021-10-29 08:46:33 -07:00
Vignesh Mohan
a6902b1d58 qcacmn: Reset NOL history after a successful CAC completion
Reset NOL history after a successful CAC completion.

Change-Id: I3fa17126c74ad8e0a7be15d240c1acc5437df81a
2021-10-29 06:04:41 -07:00
Krishna Rao
ba2cb6d084 qcacmn: Update element ID extensions for EHT Cap/Op and ML
Update element ID extension values for EHT Capabilities, EHT
Operation, and Multi-Link IEs. The values are as per current ANA
database.

Change-Id: Iaf8399170340d706acb1ecbd0f8b7050c4f6228d
CRs-Fixed: 3032233
2021-10-28 01:33:57 -07: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
Himanshu Batra
b981e05832 qcacmn: Add API to get link peer assoc req buffer
Add API to get link peer assoc req buffer

Change-Id: I293a86f8eaaaf5a2e02802388960386848201a2c
2021-10-26 04:44:06 -07:00
Aditya Sathish
af7379f8c4 qcacmn: Fix the second cfreq2 for channel 33 for 320MHz
Fix the second cfreq2 frequency returned by the service
API, wlan_get_320_center_freq, for a channel ranging
between 33 (6115MHz) to 61 (6225MHz).

CRs-Fixed: 3060832
Change-Id: I656a5d6633cfa48aaeff5f0ba53e4c6138f5d8f8
2021-10-25 12:15:47 -07:00
Arun Kumar Khandavalli
0e4c14ca77 qcacmn: Return assoc peer as true in case of mlo disabled
In certain cases the driver checks whether the peer is a assoc link
or non-assoc link, in case of legacy connection when mlo is disabled
return true for assoc link.

Change-Id: I50e6b22754ffb26fbb4b7892a962bc754479f7a8
CRs-Fixed: 3059278
2021-10-22 10:20:42 -07:00
Ashish Kumar Dhanotiya
91dbd69b0e qcacmn: In restart case invoke regulatory callbacks only once
Currently driver invokes regulatory callbacks after pdev create
and from reg cc event processing. In case of restart of the
driver because of SSR or idle restart, driver ignores the default
country and sets the user set country which was there before SSR
or idle shutdown. Now driver continues restart and creates pdev.
During pdev creation it propagates reg rules from psoc to pdev
which was there in psoc before shutdown and after pdev creation
it invokes the regulatory callbacks, as part of this hdd dynamic
callback is invoked and it tries to schedule the regulatory work.
Since idle restart is a vdev operation so driver is not able to
schedule the work as it does not get the dsc op and it waits for
500 ms to reschedule the work. In this 500ms time driver gets the
response of the set country command which was sent to fw to set
user country. This command also invokes the hdd dynamic callback
and regulatory work gets scheduled and scan channel list command
is sent to fw.
Now if any scan is going on in the FW and after 500ms if first
work gets rescheduled, it again sends the scan channel list to fw
which cancels the ongoing scan.

To address issue, add a change to not invoke regulatory callbacks
from pdev creation if user country set is pending.

Change-Id: I5686163644409ef19507c19ae31f7f1e7892931f
CRs-Fixed: 3054603
2021-10-22 06:14:50 -07:00
Krishna Rao
0d7d011c82 qcacmn: Move basic 802.11 definitions from crypto to common
Move basic IEEE 802.11 field definitions that are not specific to
cryptographic functionality, from a cryptography related header file
to a common header file for IEEE 802.11 definitions so that these can
be used by other 802.11 protocol processing modules. The crypto header
file already includes the common header file, so there is no effective
change in code visibility of the definitions for crypto code.

Change-Id: I439fe818a457cc7694fdb431f5d2c1a7552f2caa
CRs-Fixed: 3059572
2021-10-21 14:05:49 -07:00
Hariharan Basuthkar
ef0a6ab42b qcacmn: Trigger ACS only if AFC master chan list is non-empty
When the AFC response has a disjoint set of CFIs and frequency range,
the ACS trigger is called even though the AFC master channel list is
empty.

Due to this, ACS happens even though the AP's destination power
mode is LPI.

To fix this issue, call ACS trigger only if the AFC master channel list
is non-empty.

Change-Id: I217d23827b34ac577649b82b278a203bf01fa1f6
CRs-Fixed: 3052805
2021-10-21 07:31:07 -07:00
Santosh Anbu
5479ef4492 qcacmn: Add API to update mlo params in start request
Remove ifdef macro inside a function and move the mlo param
update to separate function.

Change-Id: I2037519fda00c17efcec3bab34340f27d58324c0
CRs-Fixed: 3058432
2021-10-21 01:11:55 -07:00
Edayilliam Jayadev
f1527f6374 qcacmn: Handle overflow of management rx reorder list
Deliver the oldest management frames to upper layers if
the management rx reorder list grows beyond the maximum
configured size.

Change-Id: Id0199849e26804310dd502051b8e14f56f0df795
CRs-Fixed: 3051431
2021-10-20 00:32:56 -07:00
Krishna Rao
7c24c73fd8 qcacmn: Add size definitions for subfields in Basic ML Common Info
Add definitions for size in octets for the following subfields in the
Common Info field of Basic variant Multi-Link element: BSS Parameters
Change Count, Medium Synchronization Delay Information, EML
Capabilities, and MLD Capabilities. These definitions are as per
IEEE802.11be D1.0 (but also happen to apply as of IEEE802.11be D1.2).

Change-Id: I36725292f29da1f03caed6baa5d25c02a06c2c4f
CRs-Fixed: 3057853
2021-10-19 14:06:08 -07:00
Himanshu Batra
2100a410a5 qcacmn: Add APIs to modify connect_req/connected vdevs bmap for ML STA
Add APIs to modify connect_req/connected vdevs bmap for ML STA

Change-Id: I3c68f2f7a87db49eb72ddf0d9e85ae7387974c85
2021-10-19 09:49:48 -07:00
Himanshu Batra
d0ac79827e qcacmn: Clear vdev MLO Cap as part of updating vdev mlme address
The MLO cap is getting reset as part of getting valid candidate, this is
leading to reset of MLO cap for supplicant selected ML candidat as well.
Add fix to Clear vdev MLO Cap as part of updating vdev mlme address

Change-Id: I19ce9711011173505a829dc5b308e8890b8ffe6c
2021-10-18 20:56:19 -07:00
Arun Kumar Khandavalli
666ab22622 qcacmn: fix the memory leak in the connect failure path
There is a memory leak in the mlo connect failure the connect req
and the connect, ies are not getting freed because of the mlo is vdev
check. During the allocation there is no condition as such, so remove
the same during the connect failure path to resolve the memory leak.

Change-Id: I9076761cd3b918435af9929fcf888996d2129e98
CRs-Fixed: 3057979
2021-10-18 18:47:00 -07:00
Vignesh U
d5285ebf3e qcacmn: Calculate bonding frequencies instead of hardcoding
The bonding channel array is calculated by adding center frequency to
hardcoded offsets.

Since, they can be calculated by Artihmatic Progression, replace the
hardcode assignments.

Change-Id: I4f145ac05f8266a69a6787783cb627200f52563e
2021-10-18 09:43:38 -07:00
Vignesh U
601ecd6da2 qcacmn: Find radar affected sub-channels for 240/320MHz channel
With the introduction of 240/320MHz channels with 11be, sub-channel
marking has to enhanced.

Find the sub-channels of the 240MHz/320MHz channel that got affected by
radar.

Change-Id: I0b0d057b533ad4e6c4d1627c878e3823d1c75979
2021-10-18 09:43:34 -07:00
Vignesh U
dd76700b7d qcacmn: Update dfs channel punc pattern from mlme
With the introduction of 11BE, channel puncturing becomes possible.
Hence, the DFS channel structure should be updated with channel puncturing
information.

Change-Id: Ia1bccd55e7fadde2a49fb08bd30ff6b5b2cc6ba1
2021-10-18 09:43:29 -07:00
Vignesh U
1bc1af8b6c qcacmn: Add dfs channel flags and channel check macros
Add the following DFS channel flags for 11BE:
1) WLAN_CHAN_320MHZ
2) WLAN_CHAN_EHTCAP
3) WLAN_CHAN_EHT20
4) WLAN_CHAN_EHT40PLUS
5) WLAN_CHAN_EHT40MINUS
6) WLAN_CHAN_EHT80
7) WLAN_CHAN_EHT160
8) WLAN_CHAN_EHT320

Add the following checks for both 5G channels and 6G channels:
1) WLAN_IS_CHAN_11BE_EHT20
2) WLAN_IS_CHAN_11BE_EHT40
3) WLAN_IS_CHAN_11BE_EHT80
4) WLAN_IS_CHAN_11BE_EHT160
5) WLAN_IS_CHAN_11BE_EHT320

Update the WLAN_IS_CHAN_DFS check to include 11BE modes.

Change-Id: I2bd9e877aa0b4fca8f93bf2b72247f8fc29ae833
2021-10-18 09:43:24 -07:00
Vignesh Mohan
862db46074 qcacmn: Add preference to HT40+ over HT40- in 2G channels till 8
In reg_set_channel_params for 2G, if the input mode is HT40,
the primary channel is <= channel 8 (2447) and the secondary frequency
is not provided, add an API to fetch the secondary frequency,
giving preference to HT40+ over HT40- mode.

Change-Id: If1538e14f9ab427c9f9a12ee2eb0d9e28bbf8b86
CRs-Fixed: 3050678
2021-10-18 09:43:19 -07:00
Shwetha G K
1d2aaa5602 qcacmn: Report per chain AGC gain table index
Report the per chain AGC gain table index used as
part of cfr_meta_data. Add new fields in metadata
accordingly.

Change-Id: I40673f856b1a1ebb0a4a69bf44d4e0817db9cd6f
2021-10-18 06:13:25 -07:00
Lincoln Tran
3cbefea6d0 qcacmn: Set MLO cap bit for subsequent links
When sending the connect for subsequent links in MLO, make sure to set
the capability bit, otherwise it will be marked as assoc link.

Change-Id: Ic0145b40e84ea440ea389200356d1f916a1ba530
CRs-fixed: 3055892
2021-10-15 15:32:14 -07:00
Bapiraju Alla
eadfb45b23 qcacmn: Fix MLO connection issues
Add minor fixes to allow MLO connection.

Change-Id: Ic9e464b6e5c948676d5ad0e2519c096a9e1b1964
CRs-fixed: 3021328
2021-10-15 15:32:04 -07:00
Rakesh Pillai
32046ad850 qcacmn: Vdev attach changes for MLO
Add mld mac address info during datapath
vdev attach.

Change-Id: I0ea22025d19be82be0c56809871e8513c3ce7962
CRs-Fixed: 3039326
2021-10-15 13:13:17 -07:00
Lincoln Tran
82ee197386 qcacmn: Store original connect req in connection types
When performing an MLO connection, the subsequent links need data
from the original connection request. There is no easy way to
determine if the connection is MLO or not at this point, so
store the original connect request regardless of the connection
type. Also make sure all instances are freed properly.

Change-Id: Iccce376ba36a8c49127b177fc4a1bac54aafb315
CRs-fixed: 3051842
2021-10-14 17:11:06 -07:00
Liangwei Dong
dffbb1b320 qcacmn: Fix SAE pmkid update issue
For SAE SAP, after full SAE authentication, only pmkid
will be sent down to driver, PMK len is zero.
Driver should accept the set pmksa without PMK.
Add check pmk length checking and if pmk len is zero,
driver allow the set pmksa.

Change-Id: Ic05dee4cce31233dbe6dfced05df54fe8972dd1f
CRs-Fixed: 3042899
2021-10-13 17:42:40 -07:00
Lincoln Tran
1b0df8b4fb qcacmn: Clear MLO cap bit in case of failure or disconnect complete
Clear the MLO capability bit in the following scenarios:
- On a successful disconnect complete
- On a failing connect complete
- Every time we fetch a new candidate
This will ensure subsequent connections are not effected by this bit.

Change-Id: I4cbda78715450b5db5bc25cb7f6a141d636b712b
CRs-fixed: 3054192
2021-10-13 15:23:01 -07:00
Shiva Krishna Pittala
de13832745 qcacmn: Populate and expose 320MHz spectral capabilities
Populate and expose the following 320MHz spectral capabilities.
  - Agile spectral scan support for 320MHz mode.
  - Number of detectors used for spectral scan in 320MHz mode.

Change-Id: Ibea77d4ec8b1d9322ef82d1d48236836ffad24ec
CRs-Fixed: 3053059
2021-10-13 02:57:24 -07:00
Edayilliam Jayadev
d9667ef801 qcacmn: Prevent out of order delivery of mgmt frames
Keep track of the global time stamp of the last
management frame delivered to the upper layer.
Drop all the frames older than the last delivered
frame.

CRs-Fixed: 3049671
Change-Id: Ibe0cc239f7af38da63ea8c405b3f89fc9473ea57
2021-10-12 00:09:10 -07:00
Pragaspathi Thilagaraj
ce387c8fd3 qcacmn: Validate SSID first while fetching peer pmksa
Validate the SSID & cache ID if SSID length is present in the
pmksa entry, as in FILS case only SSID and cache id are filled
and BSSID is not filled.

So validate the BSSID only if the SSID is not present.

Change-Id: Ia0a31f953869f00495fad597bb564ec706425312
CRs-Fixed: 3051530
2021-10-08 23:15:58 -07:00
abhinav kumar
7427e70f15 qcacmn: Fix race condition between connect and disconnect
Scenario: In case of STA + STA, NB/SB issues disconnection for
vdev 0 when vdev 1 is in connecting state.

As connection is blocking serialization command and it can try
multiple candidates and can take upto 30+ sec, there is a
chance that disconnect may get timeout and is followed by
vdev delete from osif. This can lead to vdev delete sent
without vdev down/stop and bss peer delete for vdev 0.

So abort connection when trying for candidate if any of the
vdev is waiting for disconnect, to avoid disconnect timeout.

Change-Id: I7ef50b2e870317d2b095dd0385fcbe1c5b86fd20
CRs-Fixed: 3051567
2021-10-08 13:55:33 -07:00
Lincoln Tran
40e49db431 qcacmn: Add all membership selector elements
Include all elements from the BSS membership selector value encoding
table.

Change-Id: Ia9dda9aaa44d5c6ea83d750676511c1ed74bfb4b
CRs-fixed: 3050316
2021-10-07 23:15:56 -07:00
Bapiraju Alla
8354390c7d qcacmn: Add ML IE handling in util_scan_copy_beacon_data
Currently, ML IE address update is missing while copying the beacon data.
This may result in illegal memory access when ML IE accessed from copyied
scan entry after original scan entry got freed.

To avoid this, update ML IE address in new scan entry while copying
scan entry.

Change-Id: I6161481cbd13573b8177f122f7d26d177cc07aaa
CRs-Fixed: 3052302
2021-10-07 18:42:54 -07:00
Edayilliam Jayadev
8498476787 qcacmn: Add lock to protect reo algorithm entry
Add spin lock protect the critical section in reorder
algorithm entry.

CRs-Fixed: 3048994
Change-Id: I9bc6b30b2102dd14f0e5e2ba593e9a6bbbb72714
2021-10-07 18:42:49 -07:00
Shashikala Prabhu
f833646e06 qcacmn: Do not limit the max length of RSN/WPA IE as 28
Do not limit the max length of RSN/WPA IE as they can contain multiple AKM
and CIPHER. We need to consider all the variables to limit the max length.

Change-Id: I204f86d7c773d0c104ad1f58b3648d6c5577af94
CRs-Fixed: 3051247
2021-10-07 07:05:44 -07:00
Vignesh U
9abbd66770 qcacmn: Do not allow to set same 6G AP power mode
The API that takes in the input 6G AP power type and updates current
channel list, allows setting the same power type which is not needed and
is a costly operation.

Change-Id: Ia690f40a6796a0db243f0abd15f2eebc8340d1d9
CRs-Fixed: 3051502
2021-10-07 04:46:08 -07:00
Vignesh U
c47cd3f96c qcacmn: Reset AFC power event received status
The power event received status is set when AFC power event is received
and is reset unconditionally when AFC expiry event received.

Reset AFC power event received status only on receiving AFC expiry event
with sub-type AFC_EXPIRY_EVENT_SWITCH_TO_LPI.

Change-Id: Ib7c1d12cbc2797ddbb19d73fd38d82d100adf3d3
2021-10-07 04:46:04 -07:00
Himanshu Batra
069f37b825 qcacmn: Use osif_cfg as disconnect source for ML internal disconnect
In case when connect req is received while ML connect is in progress,
disconnect is issued with SB_disconnect as source but sb disconnect is
not handler in join active. So, send osif_cfg_disconnect as a source

Change-Id: I9604e23193ba3aef334f0873d2460a992b1914ea
2021-10-06 13:06:04 -07:00
Hariharan Basuthkar
7a1cdfbd43 qcacmn: Intersect CFIs with SP chan list and AFC frequency range
When the frequency ranges and channel frequency indices in the AFC
server response are not the same, the current channel list has
channels enabled, that are absent in the CFIs.

This is because the AFC master channel list is built by intersecting
the frequency ranges in the AFC frequency object and state of the
channels in the SP AP master channel list.

To fix this issue, build the AFC master channel list by intersecting
the frequency ranges in the AFC frequency object and state of the
channels along with the CFIs received in the AFC channel objects from
the target.

Change-Id: I12cc54f90b75b9a7be491e7dd2e9c101be6dd1f6
CRs-Fixed: 3042040
2021-10-06 04:22:38 -07:00
Venkateswara Swamy Bandaru
d70df100f7 qcacmn: Add 11be D1.0 Capability defines
Add 11be D1.0 Mac and Phy capability defines.
Corrected lengths if the capability fields.

Change-Id: I40e2d048946857498c425ca01c3010f255081833
CRs-Fixed: 3025958
2021-10-05 13:07:50 -07:00
Rhythm Patwa
e60e11bb76 qcacmn: Add QDF module ID for AFC
Add QDF module ID for AFC debug logs.

Change-Id: I741b85df50e3bf23b0ff5096270f0dd7a20679e3
2021-10-05 07:36:50 -07:00