Commit Graph

17309 Commits

Author SHA1 Message Date
Shiva Krishna Pittala
3567bb3b57 qcacmn: Add support to process Spectral capabilities event
WMI_SPECTRAL_CAPABILITIES_EVENTID event will be sent by the target SW to
indicate the different capabilities of the Spectral HW.
Add support to process this event and extract the capabilities.

Change-Id: I03b3236b6def98d24e77b2a9ea51ee866e62e6fe
CRs-Fixed: 3238450
2022-07-22 07:00:18 -07:00
Jianmin Zhu
11ae3a31b7 qcacmn: QCA vendor attribute to configure RX link speed threshold for roaming
Add QCA_ATTR_ROAM_CONTROL_RX_LINKSPEED_THRESHOLD value as the RX link
speed threshold to disable roaming. If the current link speed is above
the threshold, there is no need to roam.

Change-Id: Ifeeacfa9d49de76c28fe968c1eb26b5036261c9a
CRs-Fixed: 3200264
2022-07-22 02:44:01 -07:00
Yu Wang
9788f23284 qcacmn: QCA vendor command for CoAP offload processing
Add vendor command QCA_NL80211_VENDOR_SUBCMD_COAP_OFFLOAD to
enable/disable offload processing in firmware for CoAP messages
(RFC7252: The Constrained Application Protocol) or fetch the
CoAP messages cached during offload processing.

Change-Id: I2eaeba58ec6bc44738f68eb00c36ebdce2eae6f8
CRs-Fixed: 3193633
2022-07-21 21:09:57 -07:00
Subrat Mishra
c667bb9d3c qcacmn: Support for per peer UL Airtime metric in ATF stats
Support for per peer Up Link Airtime metric in ATF stats.

Change-Id: Ic21239e5d1cbf337c11b35415f555c1f39e07143
CRs-Fixed: 3240833
2022-07-21 21:09:45 -07:00
Shiva Krishna Pittala
68c2b67520 qcacmn: Add support to populate and send UMAC reset setup command
UMAC reset prerequisite setup command contains the following information.
- Interrupt number to be used for raising the UMAC reset interrupt
- Address of the shared memory
This is an HTT command. Send this command as part of the UMAC reset
initialization sequence.

Change-Id: I7a08f48b420580b5e3dbb9b46f6605d986f8fd89
CRs-Fixed: 3244930
2022-07-21 16:09:51 -07:00
Shiva Krishna Pittala
12964fb1de qcacmn: Add Host to target communication for UMAC HW reset
UMAC HW reset is expected to send the following Tx commands to the target.
- PRE_RESET_DONE
- POST_RESET_START_DONE
- POST_RESET_COMPLETE_DONE

Add the necessary logic for the same.

Change-Id: I2450ed9281691abcc064661d4481ae78f48a0f3d
CRs-Fixed: 3244895
2022-07-21 16:09:44 -07:00
Shiva Krishna Pittala
8ebf77e3aa qcacmn: Add UMAC HW reset event handler
UMAC HW reset is expected to receive the following 3 events from FW.
- DO_PRE_RESET
- DO_POST_RESET_START
- DO_POST_RESET_COMPLETE
Add necessary logic to handle these events.

Change-Id: I786ecf6ed2925fd7fcc0934fdce65c76784f4f67
CRs-Fixed: 3244865
2022-07-21 14:27:54 -07:00
Sai Rupesh Chevuru
40e06d213f qcacmn: Handling of multicast packets in MLO multi passphrase
In the case of MLO multi passphrase add GSN bsed support
to multicast packets.

Change-Id: I3b5bf8b611bd233141d677003905a8b5f18f9716
CRs-Fixed: 3203545
2022-07-21 14:27:47 -07:00
Himanshu Batra
7be2cf3775 qcacmn: Add support for vlan tagged traffic in IPA offload
In IPA offload, both tagged and untagged traffic cannot be handled with
a single rx pipe. Hence, add support for 2nd RX pipe for tagged and
untagged traffic respectively.

Change-Id: I77ff633327696f66df42fb592492321c1591646b
CRs-Fixed: 3226021
2022-07-21 11:02:34 -07:00
Himanshu Batra
7c3316638a qcacmn: Changes to support for vlan tagged traffic in IPA offload
IPA component changes to support for vlan tagged traffic in IPA offload

Change-Id: Ie28474537332d31f1ed1403ee0b774563a16a3ab
CRs-Fixed: 3229801
2022-07-21 11:02:26 -07:00
Shwetha G K
8c61283889 qcacmn: Fetch peer from sw_peer_id instead of ast_idx
Change to fetch peer details based on sw_peer_id instead of
ast_index.

CRs-Fixed: 3245246
Change-Id: Ibd525127b4678392712a1e57507a9576a78624f1
2022-07-21 11:02:20 -07:00
Yu Wang
c8ba5e36c8 qcacmn: add support for ACTION_OUI_EXTEND_WOW_ITO
Map ACTION_OUI_EXTEND_WOW_ITO to WMI_VENDOR_OUI_ACTION_EXTEND_WOW_ITO.

Change-Id: I2874e84fe88f1b4adfc6b579298937f353fa8900
CRs-Fixed: 3246877
2022-07-21 11:02:13 -07:00
Srinivas Pitla
b39112e991 qcacmn: add mld address to auth params
This change adds MLD address to deferred auth params
as Auth req carries MLD address

Change-Id: I4a97299967bc052166f351ce041ccc8d13656e9e
CRs-Fixed: 3246869
2022-07-21 07:46:24 -07:00
Jithender Miryala
7251cd10dc qcacmn: Fill in the subchannel frequency list even if it is an HT20 mode
Issue: mode was set to HT20 and marksubchannel was enabled. We injected
radar into the HT20 primary channel. The primary channel is not being added
to NOL when marksubchannel is enabled because the current subchannel
frequency list(freq_offset->freq[i]) is not being filled.

To fix this, Even if it is an HT20 mode, fill the subchannel frequency
list(freq_offset->freq[i]) based on offset.

Change-Id: I571ba60c755e7701a21db89f917c953ffa9716a6
CRs-Fixed: 3244971
2022-07-21 05:51:02 -07:00
Karthik Kantamneni
50c8489faf qcacmn: Add support to log latest CE descriptor history
Add support to log latest CE descriptor history which helps
to identify CE scheduling/reaping delays when full debug
history dump is not available.

Change-Id: I44a5c86a3e1dd4861bfd2e77b3f772d5d53bcedf
CRs-Fixed: 3225155
2022-07-21 05:50:56 -07:00
Jeevan Kukkalli
384c456371 qcacmn: Pass appropriate parameter while adding rx frag
Fix frag len and frag offset parameter interchange issue
while adding rx frag.

Change-Id: I6680f66715b558a9e8f58665e65494a8cb3783cb
CRs-Fixed: 3246599
2022-07-21 02:38:57 -07:00
Jinwei Chen
89bdae0fc0 qcacmn: Fix monitor status buffer double free issue
Currently in monitor mode for KIWI, interrupt for RXDMA2HOST is
enabled to process both monitor status srng and montior destination
srng, but low threshold interrupt for monitor status srng is also
enabled. so when available RX buffer in monitor status srng is less
then low threshold, it is possible that two kind of interrupt from
RXDMA2HOST ring and monitor status ring will call
dp_rx_mon_status_process_tlv() in different context and access to
mon_pdev->rx_status_q at the same time, this will lead to skb
double free issue.

solution:
(1) disable RXDMA2HOST srng interrupt in monitor mode.
(2) enable monitor status srng batch count interrupt for monitor
processing.

Change-Id: I1df8830cb7cc55468e5df5e49045c3d96f7c29a8
CRs-Fixed: 3245393
2022-07-21 02:38:50 -07:00
Himanshu Batra
52cd69199f qcacmn: Change return value to true if cm ctx is NULL
In case if cm ctx is NULL, the disconnect state check API is returning
false which makes the caller assume vdev is not disconnected.
Hence, change the return value to true in this case.

Change-Id: Iadd52d94d6f561974101aa245ddbfdb1eb301b06
CRs-Fixed: 3246161
2022-07-21 02:38:44 -07:00
Aakanksha Doda
6be39668f5 qcacmn: Change print level to avoid flooding of prints
Change print level from scm_err to scm_debug_rl to avoid
flooding of prints.

Change-Id: Iae82e8aa55b765860f994757fb035ddcb4342edf
CRs-Fixed: 3225542
2022-07-19 17:04:31 -07:00
Santosh Anbu
5bddbff670 qcacmn: Add support for host learning of AST on BE platforms
Add change to support learning of AST entries on host
for BE platforms(Waikiki) based on peer map and unmap event received
from FW.

Change-Id: I58aa6a18ca69d5ffc6fbcf9c18723adb39647950
CRs-Fixed: 3237934
2022-07-19 13:50:01 -07:00
Jinwei Chen
fdb2193820 qcacmn: add size parameter for dp_prealloc_get_context
add size parameter for dp_prealloc_get_context.

Change-Id: I0171124cf35010e793c18d4c8f6916497f053f8d
CRs-Fixed: 3222817
2022-07-19 13:49:54 -07:00
Paul Zhang
e6eb58971d qcacmn: set pdev id to 0xFF when set country code
From firmware perspective, host only sets 5 GHz regdomain hence 2 GHz
uses default setting and firmware does not update channel list event
for all phys according to the new country code.

Therefore sets pdev_id to 0xFF in function reg_set_country and it is
mapping to WMI_PDEV_ID_SOC when issue wmi command
WMI_SET_CURRENT_COUNTRY_CMDID as firmware required.

Change-Id: I0eb84db9f6d77c0473161cc4ffc0dcebd31c3d45
CRs-Fixed: 3239644
2022-07-19 08:46:57 -07:00
Jia Ding
c78b55df2c qcacmn: Define IPA TX ring indexes for WCN7850
As part of IPA offload support for WCN7850 chipset, properly define
TX ring indexes into soc->tcl_data_ring[] and soc->tx_comp_ring[]
used by IPA.

In the change, use wlan_cfg_get_rbm_id_for_index() to get correct
rbm values for WBM2SW ring used by IPA.

Change-Id: Ie5b6743c1cb2adfa156735fc84dc1429a67f833a
CRs-Fixed: 3246038
2022-07-19 07:06:51 -07:00
Sai Rupesh Chevuru
bedd18fa8b qcacmn: Enable NO_RX_PKT_HDR_TLV
Unsubscribe the PKT HDR TLV in RX path.

Change-Id: If37102569ba1963efd743c6508dc9c835b49bf01
CRs-Fixed: 3229821
2022-07-19 05:19:20 -07:00
VIJAY RAJ
0e1e696425 qcacmn: Add Roam reason and Roam sub-reason for Diag logging
The roam reason and roam sub-reason code sent and expected
reason codes at supplicant are diffent which results in
wrong interpretation of reason code.

Add roam reason and roam sub-reason code enum in order
to aid the converion from fw roam reason code to supplicant
understandable reason code.

Change-Id: I3432793965e325ddbf90ab90a1532a0726650d8c
CRs-Fixed: 3238496
2022-07-19 03:34:08 -07:00
Rahul Gusain
030e248d13 qcacmn: Add enum for OCI mismatch in disassoc reason
Added enum for OCI mismatch in disassoc reason

Change-Id: Iaf7a318ba629bba758c8f04bd404008678036a07
CRs-Fixed: 3235848
2022-07-19 03:34:01 -07:00
Srinivas Pitla
baaea274e7 qcacmn: Reset primary umac bit in assoc peer
In current code, assoc peer is designated as primry umac,
on primary umac allocation, primary umac bit gets reset.
But in force umac case, primary umac bit not getting reset.

This change resets primary umac bit of assoc peer, if
assoc peer is not designated primary UMAC.

Change-Id: I640433548b9efeb20ba2b23f8d1141cc5505087b
CRs-Fixed: 3243326
2022-07-19 01:36:17 -07:00
Vivek
e70a7b87d0 qcacmn: Add mac address to peer unmap ops
On receiving the peer unmap event the ops
is called without the mac address of the
peer for which peer unmap is received.

Add mac address of the peer for which peer
unmap is received.

Change-Id: I9026433089963818d5a227a0660866ff504dea84
CRs-Fixed: 3238626
2022-07-19 01:36:10 -07:00
Deeksha Gupta
3d3d3c4fdb qcacmn: Validate next_ie length in util_get_successorfrag()
Currently, in wlan_defrag_elemsubelem_fragseq() API,
there is possible buffer over-read in fragbuff buffer.
Buffer may have a malicious length larger than their
payload size, which leads to a buffer over-read during
defragmentation.

Fix is to validate the fragment length against the buffer
boundary in util_get_successorfrag().

Change-Id: Ia9e688a0ab17954eb464ec586820bb95b51f12d1
CRs-Fixed: 3236560
2022-07-19 01:36:02 -07:00
Gururaj Pandurangi
a57b8d20e4 qcacmn: Add host fixes for 11be eMLSR mode
Add following fixes for STA to support and operate in
eMLSR mode
1) Update and send eMLSR cap flag to FW even in vdev start
request on both links.
2) Copy EML caps to wmi peer assoc mlo params to send it
to FW.

Change-Id: Ic17b9b82809659d7a4392c09eceecae7c53b2049
CRs-Fixed: 3237737
2022-07-18 23:36:38 -07:00
Hariharan Basuthkar
f8cd3e0110 Revert "qcacmn: Check if opclass is supported by country"
This reverts change-id I3be0e0aa7dc2a41f987a6725bc74444311408e51.

Change-Id: I89b373e1445b62c0eb00850ad6bf969045a42f7a
CRs-Fixed: 3246260
2022-07-18 23:36:31 -07:00
Jeevan Kukkalli
d6a41c39a8 qcacmn: Reduce log level to avoid excess prints
Reduce log level to avoid excess prints on
console.

Change-Id: I0b3390af2f93a6930df9cfba17cd246d3dfc193c
CRs-Fixed: 3239664
2022-07-18 19:23:13 -07:00
Amrit Sahai
9ea6f8dc13 qcacmn: Add support for rx stats from REO block
Add support for rx stats from REO block in IPA use case.

Change-Id: I90a6f57507838645dea9095615f378bd5a3a6ffc
CRs-Fixed: 3231322
2022-07-18 17:45:10 -07:00
Arun Kumar Khandavalli
08067d2b67 qcacmn: Add support to send SAE authentication frames with link address
Add feature flag to indicate support for sending authentication
frames with Link Address.

Change-Id: Ifbd28b8d474b28b0e85a23c9c91ebccedb381d9c
CRs-Fixed: 3239304
2022-07-18 16:00:39 -07:00
Pragaspathi Thilagaraj
728ff15ea3 qcacmn: Don't allow PASN peer create if peer del all is not supported
Firmware advertises WMI_SERVICE_DELETE_ALL_PEER_SUPPORT
capability to indicate vdev peer delete all command support.
PASN peer relies on the WMI_VDEV_DELETE_ALL_PEER_CMDID
command to delete the PASN peers before vdev delete.

So allow PASN peer create only on targets that advertise
WMI_SERVICE_DELETE_ALL_PEER_SUPPORT.

Change-Id: Ib94d9e14e34dd1e5c25bf6946e0d59fe83fd6dd3
CRs-Fixed: 3229438
2022-07-18 16:00:32 -07:00
Jianmin Zhu
f2a742540b qcacmn: Select best partner for MLO of 2+ links
Select best candidate by mlo score algorithm.

Check bss mlo type first by mlo info, mlo config, partner frequency and
dbs/sbs cap, calculate candidate score for SLO/MLMR/EMLSR bss types.

For SLO case, same as before except:
Decrease percent of legacy band and nss to include 320M and 8x8.
Decrease max percent of congestion from 100 to 80 to include MLMR joint
congestion.
Increase weight of both band width and nss to 20.

For EMLSR case, same as SLO except adding EMLSR boost score.

For MLMR case, besides adding MLMR boost score,
calculate joint RSSI/band width/congestion score for combination of
scan entry + each partner link by new mlo algorithm, select partner with
highest total joint score as candidate combination, only activate that
partner link.

Change-Id: I640c6825d945caf5fab504a77717195c2eac0c93
CRs-Fixed: 3234912
2022-07-18 11:55:27 -07:00
Hariharan Ramanathan
fc00c5bb21 qcacmn: Initial Hal changes for QCA5332
Changes to create hal files and add hal related changes in hal_srng.c

Change-Id: I96dd76333e68bdd030e17e09602b93843ebc5030
CRs-Fixed: 3233322
2022-07-18 04:53:25 -07:00
Surya Prakash Raajen
d8c841f63b qcacmn: Add mld config checks in vap create
Add mld config checks in osif_vap_create_check and fail
once the config is invalid.

Change-Id: I26c3b4719fa9b18be0a4590861c654504fb3e6bf
CRs-Fixed: 3200923
2022-07-18 04:53:18 -07:00
Edayilliam Jayadev
2bd4b3e1ac qcacmn: Drop mgmt frames if snapshot sanity checks fails
Drop management frames if snapshot sanity checks fails.

CRs-Fixed: 3242562
Change-Id: I7b6ba04b23e57c5b516be7c3b53b8e13e24f4e53
2022-07-18 02:51:44 -07:00
Edayilliam Jayadev
62e885aa1b qcacmn: Log raw snapshot values
Log raw values of management Rx REO snapshots for debug purposes.

CRs-Fixed: 3242558
Change-Id: Idf30985691226e835190bd3305f29e2d43e654b5
2022-07-18 02:51:36 -07:00
vijaraj
4f6505a158 qcacmn: Extract btcoex status in extract_roam_scan_stats_tlv
btcoex status is not extracted in the extract_roam_scan_stats_tlv()
which was required for ROAM_SCAN_DONE event logging due to
which wrong status is printed in ROAM_SCAN_DONE
logging.

Extract bt_coex status in the extract_roam_scan_stats_tlv()
in order send correct value of bt_coex status for
ROAM_SCAN_DONE logging.

Change-Id: I45ee27e5b8a52b79954dceb9f3cdc46870b7a48d
CRs-Fixed: 3236401
2022-07-18 02:51:29 -07:00
Aditya Kodukula
ec13c2ea39 qcacmn: Add infra to support DBAM feature
Add infra to support Dedicated Bluetooth Antenna Mode (DBAM)
feature. It is used to switch between dedicated antenna for
BT and shared antenna for WLAN and BT.

Change-Id: I21688093674ef9b63ee811df9168a31bd71c56b5
CRs-Fixed: 3239895
2022-07-17 23:12:37 -07:00
Qun Zhang
c9493c28ee qcacmn: Align secondary_cur_chan_list/cur_chan_list channel state
Currently the channel state of HST secondary_cur_chan_list/cur_chan_list
is out of sync and beacon IE is populated from secondary_cur_chan_list,
which causes the actual supported channel lists and country IE channel
lists are unmatched for non-6 GHz case. So let secondary_cur_chan_list
align with cur_chan_list.

Change-Id: Ie3914ac48dc05d61ac2deb78a2892986efe238dd
CRs-Fixed: 3239390
2022-07-17 19:45:48 -07:00
Vijay Krishnan
3452af5abe qcacmn: Check CAC status on RCAC channel
In case of RCAC, check if CAC is completed only on the RCAC
channel and do not check the CAC info on current operating
channel.

After RCAC complete is sent to FW, the RCAC tree info is
cleared. In case of RCAC, check the CAC done info only
on RCAC channel.

CRs-Fixed: 3231140
Change-Id: I976b2b5e29ebdf2dc4fb2e5df1f2feb700c972af
2022-07-17 05:05:01 -07:00
Vijay Krishnan
d1a9d15084 qcacmn: Clear old preCAC, RCAC channel info
In case of BW Expand is enabled, Check if the user
configured channel is available. If it is available,
STOP the AGILE SM and Restart the AGILE SM. This will
clear any old preCAC/RCAC chan information.

CRs-Fixed: 3231108
Change-Id: I0d45204c8525ad7439a3b11cb4f8f8e7f20105d3
2022-07-17 05:04:55 -07:00
Devender Kumar
e198badbe6 qcacmn: Get the correct MSDU length in the RX path
Skb under panic issue is seen when a packet comes via RX err path,
MSDU length read by SW is coming as 0 and leaving no space for skb_push
in buffer, data is moving beyond the head and causing the issue.
MSDU length is read by generic API which is architecture-independent,
hence the struct size for one architecture is different from another
architecture.

FIX is to get the MSDU length by architecture-specific API.

Change-Id: I5a6259034e5e06ae9ce7ba6b135b44f2849f2fd9
CRs-Fixed: 3235636
2022-07-16 10:47:11 -07:00
Harsh Kumar Bijlani
81d963fc50 qcacmn: Remove SCS database from dp_peer structure
Set function pointer for SCS peer lookup and rule handler.

Add a new module id for SCS.

SCS database maintained in dp_peer structure is redundant as
same info is maintained in control peer. Therefore remove
SCS database from dp_peer structure and also remove APIs
which access/update this database.

Change-Id: I951f12de487a4be3ae169d1e309352e4e5031fc9
CRs-Fixed: 3226693
2022-07-16 09:10:04 -07:00
Ashish Kumar Dhanotiya
ad57ba6d68 qcacmn: Use super channel list instead of current channel list
Currently regulatory is using current channel list to indicate
the available channels to all the interested components.
With the addition of 6 GHz channels which has different power
types, super channel list is introduced.
With this change, use super channel list to indicate available
channels to other components.

Change-Id: I1a99643d83f090937a667e528b0359b27311e40c
CRs-Fixed: 3160500
2022-07-15 22:26:20 -07:00
Ashish Kumar Dhanotiya
498761949d qcacmn: Update regulatory APIs to use super channel list
Since there are multiple power modes in 6 GHz, the current channel list
alone is not enough to represent the capability of the chip or
device. Given a channel, in many cases it may be required to know all
the power modes that are supported by this channel.

To represent this information per channel, the concept of a super
channel list is introduced. Update regulatory APIs to use
super channel list.

Change-Id: I2e292125d6b667c2c28e4b1326f47f8ccc81e5a9
CRs-Fixed: 3159628
2022-07-15 22:26:13 -07:00
Jianmin Zhu
a8990e0bab qcacmn: Peer sta connects in HE20 for SAP HE160
SAP secondary channel offset of HT info in beacon is set wrongly.
When STA connects it, channel bonding mode check fails, falls back to
20 MHz width.

SAP secondary channel offset of HT info in beacon is decided by checking
40 MHz bonded frequency list. If primary frequency is start frequency of a
bonded frequency, then secondary channel is above the primary channel,
secondary channel offset should be set to 1, else set to 3.

For example, if SAP primary frequency is 5220 MHz, {5220, 5240} is 40 MHz
bonded frequency, secondary channel offset only can be 1, can't be 3.

Change-Id: I491c2351c4c89d6344adf40a46150dc7577ee783
CRs-Fixed: 3241004
2022-07-15 19:07:06 -07:00