Commit Graph

18901 Commits

Author SHA1 Message Date
Harsh Kumar Bijlani
af094fe095 qcacmn: Add support to get stats for MLD interface
Add support to get stats for MLD interface in single netdev model

Change-Id: I223a5c003191147970be57b92e99f1df3c66b339
CRs-Fixed: 3444443
2023-04-03 01:36:11 -07:00
Krupali Dhanvijay
8ca91ab2bf qcacmn: Send Driver disconnect internal reason code to user space
Send the driver disconnect internal reason code as an event to user space
using QCA_NL80211_VENDOR_SUBCMD_DRIVER_DISCONNECT_REASON vendor command.

Change-Id: I0027675b809b94628b6c0c4b8e8286e38fa9f47d
CRs-Fixed: 3371398
2023-04-03 01:35:59 -07:00
Vignesh C
070e8af74f qcacmn: Add support for HMWDS add and reset cmds in Beryllium
Add HMWDS add-addr, rem-addr, reset-addr and reset-table support
to add, reset and remove AST HMWDS mac entries in Beryllium
chipsets.

wlanconfig athX hmwds add-addr wds_ni_macaddr wds_macaddr
wlanconfig athX hmwds reset-addr macaddr
wlanconfig athX hmwds reset-table
wlanconfig athX hmwds rem-addr wds_macaddr

Change-Id: Iaa110ba26a477fc0b77647a712c377029b038940
CRs-Fixed: 3429510
2023-04-03 01:35:47 -07:00
Namita Nair
2859221891 qcacmn: HTT layer fix fail_cnt for opt wifi dp
Move fail_cnt and abort_count to soc->stats
struct, so that we can retrieve stats
during a crash. Also fix few other errors
found during initial tests.

Change-Id: Ieaee10b2dd2b5e589c21aa50c83dcf352623275d
CRs-Fixed: 3428501
2023-04-02 22:58:03 -07:00
Neha Bisht
e12a986996 qcacmn: Fill src_info_valid field in HTT msg to FW
Fill src_info_valid field in HTT msg to FW

Change-Id: I597c482345eb84cac19a5ee891967a17845f300a
CRs-Fixed: 3449021
2023-04-02 13:11:53 -07:00
Namita Nair
bf8fcc25af qcacmn: Disable autonomy for opt wifi dp based on WLANflag
Currently IPA autonomy is disabled for opt wifi dp
feature inorder to set default packet routing
to HOST REO rings instead of IPA. The check currently
depends on the feature flag set from IPA.
But this does not handle the case if feature is
enabled from WLAN but disabled from IPA, as autonomy
will get enabled in this scenario and default packet
routing is set to IPA.
This fix will check if opt_wifi_dp feature is
enabled from WLAN and disable autonomy to
ensure the default routing is always set to
HOST REO rings.

Change-Id: I3673d7dbeefcadb45132ea300f4ec3ac22743b86
CRs-Fixed: 3450862
2023-04-02 06:53:35 -07:00
Aniruddha Mishra
dc75883972 qcacmn: Free buffer after processing flush_tlvs
Buffer was freed before processing the TLVs
(while flushing) leading to use after free access.

CRs-Fixed: 3425044
Change-Id: Ida3bcf9add95041c43b2b1e8e3450853bd0ed88c
2023-04-02 06:53:24 -07:00
Priyadarshnee Srinivasan
30e5729efd qcacmn: Fill only supported opclass in the AFC request buffer
In case of a split-phy 6 GHz radio, there are 6 GHz opclasses and cfis
that do not intersect with the chip range for a given pdev.
The current algorithm appends such opclasses with "num_cfis as 0" to
the AFC request buffer and the buffer with empty cfis are
sent to the AFC server.
This change ensures that the chip unsupported opclasses/cfis are not sent
to the AFC server.

Also, if the reg rule frequency range is not supported by the chip range,
reg_intersect_ranges() is expected to set the out_range as
{low_freq = 0,high_freq = 0}. However, it only sets the low_freq to 0.
Since high_freq is a non-zero value, the chip un-supported range is
considered as a valid range with frequency_low as 0.
This causes the following error from the AFC server:
"error": "The frequency range indicated in the Available Spectrum
Inquiry Request is at least partially outside of the frequency band
under the management of the AFC System (e.g. 5.925-6.425 GHz and
					6.525-6.875 GHz bands in US).

To fix this issue, assign high_freq also to 0 if the
reg rule frequency range is not supported by the chip range.

CRs-Fixed: 3442719
Change-Id: I5504376ac31203045b32e23f54a9ab6a41e63a3f
2023-04-02 05:17:27 -07:00
Namita Nair
d33baafbe5 qcacmn: WAR for opt_wifi_dp feature to disable IPA(1)
IPA_OFFLOAD will be enabled by  default for MSM.
This is a WAR to disable IPA offload during compile
time, based on the IPA_WDI_OPT_DPATH feature flag from IPA.
If the flag is not defined in the IPA test
module file, IPA offload path will be disabled.
This is a WAR, and will be fixed once a Kernel config is
available to enable or disable the optional wifi datapath
feature.

Change-Id: I7aad275f4d86a2ffc239f1fe343de31ec2988fad
CRs-Fixed: 3431972
2023-04-02 01:23:12 -07:00
Namita Nair
d252ffb791 Revert "qcacmn: WAR for opt_wifi_dp feature to disable IPA(2)"
This reverts commit 
with Change-Id: Ic1b961656f52fa009ab4c3b3d8d3cac305c2c7c4.

Change-Id: Idc5101d3bac08a64f7de0a828841222eca8d3c01
CRs-Fixed: 3443469
2023-04-02 01:23:03 -07:00
Namita Nair
149071276c qcacmn: WAR for opt_wifi_dp feature to disable IPA(2)
IPA_OFFLOAD path will be enabled by default for MSM,
inorder to support optional wifi datapath feature.
This change is a WAR to disable IPA offload during
compile time, if the feature is not enabled.
This is done using the IPA_WDI_OPT_DPATH feature flag
from IPA. If the flag is not defined in the IPA test
module file, IPA offload path and optional wifi dp
feature will be disabled.

This is a WAR, and will be fixed once a Kernel config is
available from IPA to enable or disable the optional
wifi datapath feature.

Change-Id: Ic1b961656f52fa009ab4c3b3d8d3cac305c2c7c4
CRs-Fixed: 3431972
2023-04-02 01:22:52 -07:00
Pavankumar Nandeshwar
4df32b4c7a qcacmn: Return gracefully if ingress device is NULL
If the ingress net device is NULL, return gracefully
from the API to check if the skb is from rmnet

Change-Id: I81b8cea7f311fe581e83f2310155b83b28f2fd32
CRs-Fixed: 3445050
2023-04-01 17:12:46 -07:00
Aasir Rasheed
ca023bedc9 qcacmn: Register MLO get link state event handlers
Register and unregister the MLO get link state WMI event handler.

Change-Id: I7ac0a20949cc435907e433c279f14fd792415824
CRs-Fixed: 3432102
2023-04-01 09:15:27 -07:00
Aasir Rasheed
7962020d77 qcacmn: Add WMI params for MLO link state query
New TLVs for MLO link state information is introduced for
get link info command. Add WMI changes to add these TLV in
get link info command

Change-Id: Ib8d12a727ac6f59257dcce69174271330a065c77
CRs-Fixed: 3431076
2023-04-01 09:15:04 -07:00
Aasir Rasheed
8aa9879aa0 qcacmn: Add QCA vendor commands to set and get MLO links state information
Add a new vendor command and attributes to control and fetch the state
information of the MLO links affiliated with a specific interface.

This will enable user space to dynamically control the MLO links states
based on the latency, throughput and power save requirements.

Change-Id: I1ef710a6f3a1f8723bb3d1c564c0c803bfa0b587
CRs-Fixed: 3416250
2023-04-01 09:14:47 -07:00
Namita Nair
86e2e95fc5 qcacmn: Fix function name for opt_wifi_dp_cleanup
Fix the function name dp_ipa_opt_wifi_dp_cleanup()
for IPA_OPT_WIFI_DP not defined case.

Change-Id: Ie8d7db76add281025fd654d8a3e0017eddd6fbc4
CRs-Fixed: 3446301
2023-04-01 01:20:12 -07:00
Namita Nair
42381bb34d qcacmn: Handle RTPM counter for opt wifi dp
Inorder to keep the PCIe link up during
optional wifi dp transfer the
hif_force_wake_request() is called during
filter addition. This increments the rtpm_get counter.
Now if Wifi is disconnected before releasing the
filters, the corresponding hif_force_wake_release()
call is not made. This causes a mismatch in RTPM GET and
PUT calls and triggers an assert during hdd_wlan_stop_modules().
This change adds a cleanup call to release the force wake
and reduce the rtpm_put counter to prevent the assert.

Change-Id: Idd778275a015922376cf7eb0a7c3d92e75881fe8
CRs-Fixed: 3441186
2023-04-01 01:20:02 -07:00
Pavankumar Nandeshwar
2bea262d35 qcacmn: Change MSI configs for lower MSI line groups
ppe2tcl and Umac reset interrupts need dedicated irq lines.
Hence, group some of the existing dp groups togeather
to share MSI lines to make space for ppe2tcl and Umac reset
dedicated irqs.

Change-Id: I5181caeaeb4d0107b62e7ac812c2f829fd8215a2
CRs-Fixed: 3423553
2023-03-31 13:02:41 -07:00
Yu Wang
c46d796117 qcacmn: trigger panic if completing tasks takes too long
Trigger panic if it takes too long in completing
the tasks. And also modify the maximum retry count
if PANIC_ON_BUG is enabled to avoid false alarms.
It makes debug easier for tasklet stuck and schedule
latency related issues.

Change-Id: I521661c656d227ffb3f4c87ecd56bbfa938c9c25
CRs-Fixed: 3441248
2023-03-31 11:03:54 -07:00
Prakash Manjunathappa
543f94ced2 qcacmn: Do not subscribe for MC/BC frames
MC/BC frames are routed to FW ring based on routing config for MC/BC
data as SRC: FW2RXDMA and DST: RXDMA2DFW.
Data offload features in FW will take care of routing the MC/BC frames
to FW in both active and low power modes.

Change-Id: I09395978f890d9a23564bef4f974971f6de175df
CRs-Fixed: 3427204
2023-03-31 06:07:24 -07:00
Harsh Kumar Bijlani
9346230d59 qcacmn: Skip self peer for rdk stats flush on user request
Skip self peer for rdk stats flush when user makes a request for flush.

Change-Id: I2a25a798bbf1ec25aed4c4b2a7782b8d4b439a46
CRs-Fixed: 3444096
2023-03-31 06:07:09 -07:00
Jeevan Kukkalli
785b786014 qcacmn: Reduce log level to avoid console flooding
Reduce log level to debug from error to avoid console flooding
when low mem condition is hit.

Change-Id: I0341beed9059c4db2eba2cc481a797d67dd35b25
CRs-Fixed: 3442503
2023-03-31 06:06:54 -07:00
Harsh Kumar Bijlani
caa9b49954 qcacmn: Consider 4 address repeaters also for vdev stats
Consider 4 address repeaters also for vdev stats when operating in
WDS Extended mode.

Change-Id: I91d9bbeb2b917154da730b22b46645e76fa55c6f
CRs-Fixed: 3437803
2023-03-31 06:06:38 -07:00
Uraj Sasan
ab8cf64ef0 qcacmn: Connect if pri_umac & assoc link are same
Some devices in WDS station mode have limitation when connected
in 3 LINK MLD association where the Primary umac selected and assoc
link should be same. Make sure to have a sanity check before
going for association in such cases.

If the primary umac and assoc links are set to be different then
the connection will be rejected.

Change-Id: If56461a140d4685ba279b1babe04709d919d1650
CRs-Fixed: 3443733
2023-03-30 23:15:34 -07:00
Parikshit Gune
1598a12f5c qcacmn: Add RX stats support for Direct switch
Add support to send RX stats when Direct switch is
enabled. For WDS extended mode get the stats from
peer object, else take it from vdev object. These will
be accumulated by PPEDS module

Change-Id: I1f73c50679c416536cfc1ebaaeaec9b307e8bf56
CRs-Fixed: 3421251
2023-03-30 21:45:28 -07:00
Hariharan Ramanathan
543c9847e4 qcacmn: Change to store peer_id locally and use
Get peer_id from peer structure to a local variable and pass to hal api
in order to avoid race condition between peer delete and peer unmap.

Change-Id: Ib6a89f1defcfc8f66c1146a330a373a760520aa7
CRs-Fixed: 3444998
2023-03-30 18:30:39 -07:00
Krunalsinh Padhar
6f685b0907 qcacmn: send assoc resp only once for multilink
Do not send assoc response from wlan_mlo_peer_create for
multilink MLO connection. This makes sure that assoc resp
is invoked only once.

Change-Id: Id1acf20bd5e3e3beb16e0dc3073676c421825ae6
CRs-Fixed: 3443511
2023-03-30 18:30:29 -07:00
Mohammed Ahmed
b89db375d1 qcacmn: add hif_ce_desc_history to ssr driver dump
Current code doesn't have hif_ce_desc_history in ssr driver dump.
Fix this by adding the two data structs: hif_ce_desc_history_buff
and hif_ce_desc_history to the ssr driver dump regions.

Change-Id: I9256d94db6c3c3a3588e5729b9181efabdaf18ea
CRs-Fixed: 3443230
2023-03-30 14:44:40 -07:00
Paul Zhang
310c7ce085 qcacmn: Add enums for TDLS for MLO feature
1\ Add QDF_STATUS_TDLS_MLO_SYNC,
2\ Add WLAN_ELEMID_LINK_IDENTIFIER.

Change-Id: I58e912dc46a48b9ba7c2d411a2ccd7e107df1b22
CRs-Fixed: 3435983
2023-03-30 14:44:29 -07:00
Shreedhar Parande
3bdf816735 qcacmn: Add VDEV up check before deriving bridge peer PSOC
If VDEV state is not up, skip such VDEVs for creating
bridge peer.

CRs-Fixed: 3439647
Change-Id: Ibd5eaff197ed0ce984915fc197bcd33b6e674e37
2023-03-30 10:44:02 -07:00
Namita Nair
4e3bb0b849 qcacmn: Fix 2nd filter is null in opt wifi dp
Currently if IPA wants to add 2 filters and
send the filter params in 2 separate add
requests, HOST does not handle this correctly.
This causes the second filter params to be 0.
This change updates the correct index to be accessed.

Change-Id: Ib0a4853d46585d9529e990177fb8da20382c2fdb
CRs-Fixed: 3441196
2023-03-30 09:01:34 -07:00
Rahul Gusain
4e7ff1e143 qcacmn: fetch roam vdev from pdev obj
Driver extracts the vdev from peer, self mac address and
vdev_id. But in some APIs, there can be below scenarios
For example:
1. peer is not available for that vdev( roam vdev),
2. API does not have vdev_id,
3. mac address is not known or incorrect,
4. there is no session available.
While roaming, there can be scenario where driver need to
fetch the vdev before peer creation and session is not
available.
For this, driver introduces new API to fetch roam vdev from
pdev object.

Change-Id: I4a2521773b893a8dc0553335bcadac5a84fbc300
CRs-Fixed: 3441493
2023-03-30 09:01:23 -07:00
Nandha Kishore Easwaran
109969b938 qcacmn: Add pci slot to legacy irq names
Add pci slot to legacy irq names so that it is easy to
analyze the interrupts.

Change-Id: I0c11c3399c0b9f1d6d4136d158e5ab4a571f4f52
CRs-Fixed: 3438542
2023-03-30 09:01:12 -07:00
Tallapragada Kalyan
e4798ea69b qcacmn: optimization changes to improve RX KPI for WIN
done the following changes to improve the RX path KPI
	1. remove the extra invalidate in RX path as
	we no longer dirty the RX TLV cache lines.
	we now store the rx error codes in nbuf cb instead
	of RX TLVs reserved memory bytes.

	2. with features like flow tag and wds extended mode
	enabled by default, the rx_fast_flag is always set
       	to false, this resulted	in lot more instructions
       	being executed in RX path.
	Now we ensured this flag is at least set for other
	features which are not enabled by default.

Change-Id: I04c6bdc52a2b3f1248b822a108d8bd1a70abcc7c
CRs-Fixed: 3406505
2023-03-30 02:32:40 -07:00
Shiva Krishna Pittala
45da3822ae qcacmn: Fix use-after-free of MGMT Rx params in wlan_mgmt_rx_reo_algo_entry
Once an incoming MGMT frame is inserted in the MGMT Rx REO egress list from
wlan_mgmt_rx_reo_algo_entry(), there is always a possibility that the same
frame could be sent to upper layers from the other CPUs before
wlan_mgmt_rx_reo_algo_entry() completes its execution in the original
MGMT Rx path. This means that nbuf and MGMT Rx params of a given frame
could be freed before wlan_mgmt_rx_reo_algo_entry() completes.
Hence, make sure to not access frame's nbuf and MGMT Rx params once the
list updates are done for that frame.

Change-Id: I91cbdef4b1ea5b81d39606e47a46021f30193ce5
CRs-Fixed: 3433621
2023-03-30 02:32:30 -07:00
Santosh Anbu
a9419151d6 qcacmn: Support MAC filtering for York platform
Add change to support MAC based filtering for York platform.

Change-Id: I4815c53f3d4babd11f3ebae95175d0ba0871aafe
CRs-Fixed: 3442299
2023-03-30 02:32:20 -07:00
Adwait Nayak
c2c736472a qcacmn: Subscribe RX PPDU START USER INFO TLV for pktlog modes
As of now, RX PPDU START USER INFO TLV is not subscribed as
part of pktlog. Since enable_ol_stats is set by default and
it subscribes RX PPDU START USER INFO TLV, we can see
RX PPDU START USER INFO TLV being available as part of pktlog
data. But recently, with all the automation testing scripts
it is decided to set enable_ol_stats to 0, hence subscription
of RX PPDU START USER INFO TLV is taken care during the filter
set up for all the pktlog modes.

Change-Id: Ib8c7e668a17fcb8e791784d29ef6f00fbdd2df34
CRs-Fixed: 3440721
2023-03-29 11:30:04 -07:00
Nidhi Jain
2bebf5e953 qcacmn: Add 11az TBR rsta host enum and wmi service
This change is to populate wmi service for 11az TBR rsta.
Also, this adds host based enum id for corresponding wmi service.

Change-Id: I9687855651bff222616adb3a8cf346e6264688ee
CRs-Fixed: 3437035
2023-03-29 11:29:54 -07:00
Nidhi Jain
4f84ad378c qcacmn: Add 11az TB rsta ext feature flag support
The existing code does not support capability to be set
if trigger based ranging rsta wmi service bit is enabled.
This require addition of ext feature flag for trigger based
ranging rsta support.
Add 11az TB rsta ext feature flag and set the same as per
firmware capability for 11az feature.

Change-Id: I12512175d0b33daa906586c7f96f0c8c3f7400a3
CRs-Fixed: 3437057
2023-03-29 11:29:44 -07:00
Kiran Venkatappa
7c49c2a5eb qcacmn: Add memory debug disabled version for __qdf_nbuf_alloc_ppe_ds
On some profiles memory debug is disabled. Add memory debug disabled
version to fix compilation error on such profiles.

Change-Id: I1ea99767a02e9b2e919cb1892c5d9ecbf04d470a
CRs-Fixed: 3442812
2023-03-29 09:45:34 -07:00
Rahul Gusain
b629391f22 qcacmn: Extract MLD addr for BSSID
In some scenarios, there can be need to get the peer MLD address.
For this, add new API to extract the MLD address from the scan entry
by the BSSID.

Change-Id: I3b78501cb5320b3e834313a048b6fa0a84eab03b
CRs-Fixed: 3441498
2023-03-29 05:23:49 -07:00
Nandha Kishore Easwaran
41d3710c17 qcacmn: Change monitor print to debug level
Change monitor print to debug level as this print causes flooding
and could potentially lead to CPU flooding.

Change-Id: I76cda51c9d3d0658ebd02b2112fba5310d8eb22c
CRs-Fixed: 3439802
2023-03-29 05:23:39 -07:00
Srinivas Pitla
3edff068ab qcacmn: Primary TQM changes
1) select lower bw vdev link as primary umac for first station
2) Added support to increase group size to distribute stations
   on all PSOCs

Change-Id: Ic6762fbe8e6bc5feef70ddaaa118af121d38a1f4
CRs-Fixed: 3366442
2023-03-29 05:23:29 -07:00
Venkateswara Naralasetty
76e5c1f345 qcacmn: separate dp_rx_tid functionality
As of today, dp_peer.c has the peer management and rx_tid
functionality(create/setup/remove) which is used by the REO HW.

WCN6450 does not have REO HW and dp_rx_tid functionality is not
required for WCN6450. Hence, separate out dp rx tid functionality
from dp_peer.c so that we can avoid compiling unnecessary code
for WCN6450.

Change-Id: I322823704f38ff72e485f050941be6b1254bad09
CRs-Fixed: 3383330
2023-03-29 02:59:59 -07:00
Priyadarshnee Srinivasan
5b3d70f9a2 qcacmn: Address memory leak in dfs_init_chan_state_array
Fix memory leak in dfs_init_chan_state_array() API.

CRs-Fixed: 3442778
Change-Id: If2d7db598077975dc33617f6c30f6f86fb2d1247
2023-03-29 02:59:48 -07:00
Jeevan Kukkalli
34bcece450 qcacmn: Move cfr mon filter cdp func ptr to mon ops structure
Move cfr monitor filter cdp func ptr to cdp mon ops structure.
cfr monitor filter cdp function is different for 1.0 and 2.0
hence moving the func ptr to mon ops structure ensures that
func ptr is initialized appropriately.

Change-Id: I82b9c85e96f2f219521ae6ed908ade120081c748
CRs-Fixed: 3428791
2023-03-29 01:17:22 -07:00
chunquan luo
9ee8244cd8 qcacmn: Add flag to filter special vendor roam log
Since special vendor roam log is not need for common roam,
add flag to filter the log.

Change-Id: Ide67de16ae68c507a7b4e81672cbf5e0fc0e4c5d
CRs-Fixed: 3442621
2023-03-29 01:13:32 -07:00
Manikanta Pubbisetty
b5f74912c1 qcacmn: Add TX completion logic for WCN6450
In the case of WCN6450, WBM HW block is removed in the UMAC.
TX completions come via HTT messages. Add logic to handle
HTT TX completion messages from the firmware.

Changes are specific to WCN6450 and hence implement the logic
in the arch specific code.

Change-Id: I447020354ce26e8948e4b49648c434fb2ed302cd
CRs-Fixed: 3381814
2023-03-29 01:13:21 -07:00
SACHIN AHUJA
21ec2f5d16 qcacmn: Remove the duplicate soc ID entry
Currently 0x400f0000 is assigned to 2 helium targets

Remove WCN3990_v2_2 from the SOC ID entries and keep
correct target for this ID.

CRs-Fixed: 3432410
Change-Id: Iab5c6ade70038953e729e4e7994484d4f192022b
2023-03-28 22:49:26 -07:00
Namita Nair
51e4b595d7 qcacmn: Fix filter delete check in opt wifi dp
If only a single filter is installed,
then the ip version of the second filter
param will not be set. Hence fix the check
for ip version in htt layer as it is already
verified when received from the IPA layer.

Change-Id: I05dff71aa27a254023599df0cbab51bafd0c4f82
CRs-Fixed: 3441760
2023-03-28 16:13:18 -07:00