Commit Graph

17724 Commits

Author SHA1 Message Date
Ashish Kumar Dhanotiya
b8e6415c0b qcacmn: Parse tx and rx rate count from peer extd stats
Based on the new requirement, fw fills the tx rate count and
rx count per mcs index in the peer extd stats event.
Add logic to parse tx rate count and rx rate count from peer
extd stats event.

Change-Id: I13382366f52964b83eb26473fa03267ac7309bb9
CRs-Fixed: 3289779
2022-09-16 19:38:58 -07:00
Bing Sun
fbcb2bb588 qcacmn: Define WMI_HOST_PEER_* for no host to target conversion
Currently if ENABLE_HOST_TO_TARGET_CONVERSION is defined, WMI_HOST_PEER_*
can be translated to WMI_PEER_* through API
convert_host_peer_param_id_to_target_id_tlv.

If ENABLE_HOST_TO_TARGET_CONVERSION is not defined, WMI_HOST_PEER_* in
common code is sent to firmware directly, which is incorrect.

Define WMI_HOST_PEER_* to WMI_PEER_* if ENABLE_HOST_TO_TARGET_CONVERSION
is not defined. Then WMI_HOST_PEER_* can be used in common code.

Change-Id: I50aa604d8822a81eed223c8551e542007929424e
CRs-Fixed: 3271470
2022-09-16 16:31:31 -07:00
Rakesh Pillai
cdc30dc279 qcacmn: Set the packet start offset correctly for monitor mode
The packet start offset configuration is common
for both mission mode and monitor mode. Hence if
the packet_header tlv is not subscribed for the
regular mission mode, the packet start offset for
monitor mode also gets affected, where packet_header
is subscribed.

This causes a loss of 128 bytes in the packets
captured in monitor mode.
Fix this issue, by setting the packet start offset
based on the driver operation mode.

Change-Id: I0a0e431278bef519534c2b1be87797d9b047525c
CRs-Fixed: 3292130
2022-09-16 16:31:24 -07:00
Priyadarshnee Srinivasan
61d0f0ab4e qcacmn: Fix compilation errors when ZCDFS macro is disabled
Fix compilation errors when ATH_SUPPORT_ZERO_CAC_DFS macro
is disabled.

CRs-Fixed: 3288434
Change-Id: I78d60dcbe88620dbf01a75d95670a2c310e7c773
2022-09-16 13:27:53 -07:00
Liangwei Dong
bf0b0fed9a qcacmn: Fix P2P find failure for invalid RSN probe response
Some p2p device include invalid RSN IE in wildcard probe respone
frames in p2p discovery. Do not drop it because the wildcard
SSID entry will not be used to do association.

Change-Id: I1e390509931094d9d9a55d2caef825c5772a086b
CRs-Fixed: 3282030
2022-09-16 13:27:43 -07:00
Sajini R
92163c7875 qcacmn: Initial changes in UMAC for IPQ5332 target compilation
Added device ID and target type checks in UMAC for IPQ5332 target
compilation.

CRs-Fixed: 3273861
Change-Id: I25f9f8bd6c23b361e3b425744839dce945036bd4
2022-09-16 11:52:51 -07:00
Sajini R
7c7742990b qcacmn: Initial changes for IPQ5332 target compilation
Added device ID and target type checks for IPQ5332 target
compilation.

CRs-Fixed: 3273865
Change-Id: I98a768394cc539549fc41d756c9c9d90034627f5
2022-09-16 11:52:44 -07:00
Ruben Columbus
953a16bb46 qcacmn: delete QCA_TEST_MON_PF_TAGS_STATS for cce/fse stats
delete QCA_TEST_MON_PF_TAGS_STATS to enable stats by default
and just use flag to enable debug nbuf_head dump

Change-Id: I0b0bb627f4d597d28181a11c38fa18b191210da4
CRs-Fixed: 3278411
2022-09-14 23:43:40 -07:00
Jia Ding
79a9d0dc1d qcacmn: Set up TX bank profile for IPA
bank id is newly added in TX descriptor for BE chipsets. As such,
with IPA Offload enabled, IPA needs the bank id information to do
offload WLAN TX.

From WLAN perspective, bank id is designed to be used on a per-vdev
role basis. E.g. STA vdev and SAP vdev have separate and different
bank profiles.

However from IPA perspective, bank id needs to be on a per TX ring
basis, because IPA GSI FW is not able to identify STA or SAP vdev
role on a per-packet basis.

Hence initialize last HOST owned bank id profile for IPA usage.

Change-Id: I0cf71b638f5999905069aff0551d8ebeb5477e17
CRs-Fixed: 3289558
2022-09-14 23:43:33 -07:00
Rakesh Pillai
99372a8149 qcacmn: Release RTPM refcount if force wake fails
Currently RTPM refcount is not released if force
wake fails. This leads to mismatch in number of
RTPM get and put during RTPM de-init.

Fix this refcount release if force wake fails.

Change-Id: Ia6d2b4541347615afe46c79ae76114009f7805ad
CRs-Fixed: 3289451
2022-09-14 12:31:29 -07:00
Pragaspathi Thilagaraj
89f5e532f3 qcacmn: Add support for AP secure-LTF capability
Add support to advertise AP secure-LTF capability based
on ini configuration

Change-Id: I8aebbd683694e36d8d16215c0358f5bfb18d5443
CRs-Fixed: 3283114
2022-09-14 09:36:20 -07:00
Sai Rupesh Chevuru
0991ec65e2 qcacmn: Handling of scatter gather frames
Update the last msdu flag properly in nbuf cb
to handle SG frames.

Change-Id: I2fe0904bdf0d447d57354c207588519816085f63
CRs-Fixed: 3284984
2022-09-14 08:10:55 -07:00
Amir Patel
04cc044ef2 qcacmn: Remove unnecessary prints
remove unnecessary print from monitor deinit path

Change-Id: Ia38d3e3739a0e8464e2fd702d1916b95a930e9f7
CRs-Fixed: 3287637
2022-09-14 05:21:54 -07:00
Pavankumar Nandeshwar
69fe9e6427 qcacmn: Modify hal_reo_setup params for qca5332
Add qref_reset parameter to hal_reo_setup for qca5332

Change-Id: I589d2278e956cb6bfaaa892b69a2aa33ee7b7607
CRs-Fixed: 3289843
2022-09-14 03:44:54 -07:00
Sai Rupesh Chevuru
74dfcfa989 qcacmn: Handling of raw frames in mesh mode
In order to handle raw frames in mesh mode pass the valid
txrx_peer to dp_rx_process_rxdma_err()

Change-Id: I24c697c8e55533ecc6ff1992c0da7bf101c8d6cc
CRs-Fixed: 3281431
2022-09-14 00:41:10 -07:00
aloksing
d3753e856b qcacmn: Fix incorrect sgi in 11ac VHT mode
sgi is getting overwritten in cmn usr TLV.
Add check if sgi and ltf_size is already set.

CRs-Fixed: 3279670
Change-Id: I8260eb71230b2c218e45460adc8f404a19eefa80
2022-09-13 23:02:56 -07:00
Liangwei Dong
5a993dd715 qcacmn: Send ROAM MLO Config to target
Add WMI API to send WMI ROAM MLO config to target.

Change-Id: I2f4671a887b2ed772d53292f718b5a759fe31028
CRs-Fixed: 3273021
2022-09-13 21:27:48 -07:00
Ripan Deuri
94c2c62746 qcacmn: Calculate Tx delay stat in microsecond
Add changes for computing wifi host and hardware Tx delay
in microsecond.

Change-Id: I7a54e9ee9785d878660f9e5226c315cf96064572
CRs-Fixed: 3254259
2022-09-13 19:59:00 -07:00
Hariharan Ramanathan
0f046983ec qcacmn: HAL changes for QCA5332
1. Changes to get correct write address in hal_get_window_address_5332.
2. Fix for monitor init crash - Added dummy entries to match the
ring_id.

Change-Id: If59b1c231d4595a95e7c1f02de1dbe0ce27a8805
CRs-Fixed: 3268933
2022-09-13 16:46:48 -07:00
Liangwei Dong
b6165bed1f qcacmn: Don't filter channel for link vdev
If get scan filter for link vdev, that means the MLO STA has
more than 1 link, do not filter the link vdev's scan filter
channel list. Link that is causing MCC with legacy STA can
be disabled in post conenction.

Change-Id: I4aafb7168e60bf158904d3b1c4a4c42d4eaeb126
CRs-Fixed: 3285312
2022-09-13 16:46:40 -07:00
Hariharan Ramanathan
433a137917 qcacmn: HIF changes for QCA5332
1. Changes to support cmem write for AHB devices.
2. Interrupt enablement issue - Incorrect CE address was given which is
fixed.
3. dp_soc_init failure - dev_base_addr of Miami was NULL, which is
fixed.
4. Missing interrupt error logs - Added dummy entires for missing
interrupt in DTS and changes to support shared IRQ in wifi-drivers

Change-Id: I00e7666b2b978c35b5ccec5da21bf442ed0a7998
CRs-Fixed: 3268936
2022-09-13 16:46:32 -07:00
Asutosh Mohapatra
19b08fc8ab qcacmn: Add missing device IDs
Currently HMT, HSP_KAILUA, HSP_WAIPIO, NETRANI_HL, NETRANI_MSL
device ids are not present in host driver code.

To address this issue add these device ids in qwlan_hw_list array.

Change-Id: I6ab7399545204e1df6ada836b7ab092fab064b38
CRs-Fixed: 3271889
2022-09-13 13:51:37 -07:00
Amit Mehta
163dd20054 qcacmn: Add API to read tsf time
Add API to read tsf time from scratch registers.

Change-Id: If736c31f9ae522a9f853e7b83b6b8a61cad990da
CRs-Fixed: 3287544
2022-09-13 10:51:38 -07:00
Himanshu Batra
b8f5d7c27a qcacmn: Update ppdu phy tx time irrespective of ACK_BA_STATUS
In case when ACK_BA_STATUS is not received, the ppdu phy tx time is not
getting calculated even though the media is used for the ppdu.
Add fix to ppdu phy tx time irrespective of ACK_BA_STATUS

Change-Id: I23d29b2d282edf6e5d49ce18aecd81e5239a118b
CRs-Fixed: 3288380
2022-09-13 09:23:04 -07:00
Himanshu Batra
f147732272 qcacmn: Add support for link airtime usage telemetry
Add support for link airtime usage telemetry.

Change-Id: I8b796f14d55d56051fb05af255e612e4655db990
CRs-Fixed: 3281355
2022-09-13 09:22:57 -07:00
Himanshu Batra
6a5ab907c1 qcacmn: Update airtime computation to per AC level
Update airtime computation to per AC level.

Change-Id: Ia8cb890d2f1dc167ec3a2610ff5a70238d55262d
CRs-Fixed: 3281256
2022-09-13 09:22:49 -07:00
Tiger Yu
6f012336ae qcacmn: Limit error logging when ce id does not match to tasklet_entry
Limit error logging when ce id does not match to tasklet_entry's ce
id. And dump all tasklet entries info to get more clue in the next
cycle.

Change-Id: Idcd9cb6ff45ef8e05fcea33cad48fa464e4f9a1e
CRs-Fixed: 3284277
2022-09-13 05:03:36 -07:00
Tiger Yu
5bdbb2c2ab qcacmn: Add return value for qdf trace rate limited func
Add return value for qdf trace rate limited function to give
the caller a chance to know whether the current logging message
is bypassed or not. This allows the caller to skip additional
logging when logs are being rate limited.

Here is the value for this return:
false: log is not limited, output is normal.
true:  log is limted, will not be output in the log.

Change-Id: Ia5ae0e5676072142c3daf9b64a9bcf609692abf2
CRs-Fixed: 3284268
2022-09-13 03:24:56 -07:00
Devender Kumar
1c3e98b8f0 qcacmn: Debug framework for SMMU buffer tracker
To support SMMU debug framework for IPA offload, change the
caller IPA component where SMMU map and unmap are done.

CRs-Fixed: 3255423
Change-Id: I5276c0b41c8e315940e8d4f5d3082d45b08b571b
2022-09-13 03:24:48 -07:00
Devender Kumar
736edd06a2 qcacmn: Definitions to support SMMU debug framework
To support SMMU debug framework, add new definitions
and add logic to track the mapping and unmapping of
a buffer via nbuf tracker.

CRs-Fixed: 3255423
Change-Id: I0b9e2828e6cd5e3204b6bba57af8806c4d080b32
2022-09-13 03:24:41 -07:00
Devender Kumar
a85ce1152c qcacmn: Debug framework for SMMU buffer tracker for IPA offload
Debug framework for tracking the SMMU mapping and unmapping of
skb buffer when IPA offload is enable and IPA_SMMU_NBUF_TRACKER
is define.

CRs-Fixed: 3255423
change-Id: I8966097945b33cb866f4642b98b3d1a4beabfad7
2022-09-13 03:24:34 -07:00
Harsh Kumar Bijlani
c84505ec7b qcacmn: Change datatype of rx_snr_measured_time to unsigned long
Change datatype of rx_snr_measured_time to unsigned long.

Change-Id: I37db568a876b15eee73f21474883eb42d4f3b18d
CRs-Fixed: 3281574
2022-09-12 20:55:09 -07:00
Anuj Khera
1417ccdbb9 qcacmn: Add parsing logic for pm_responder bit for TWT
pm_responder_bit was not getting parsed as part of twt setup completion
and stats event in case of WLAN_TWT_CONV_SUPPORTED. Added support for same.

Change-Id: I46f88299850ca3f4402780c302a5cd47ffbc1dc7
CRs-Fixed: 3245871
2022-09-12 15:57:12 -07:00
KARTHIK KUMAR T
8267333021 qcacmn: Add cdp function to get rate/link stats
Add cdp function to get the peer extended rate and link stats.
This change is to support user level command to flush mld/link
peer extended link and rate stats.

cfg80211tool wifiX get_peer_extd_rate_link_stats <mac_addr>

Change-Id: I20cd2b38b242008b95aedc5f9914088a149093dd
CRs-Fixed: 3278042
2022-09-12 15:57:05 -07:00
nobelj
3e3726cc7a qcacmn: Add fix double free in reinject handler
Add fix for double free in Reinject handler. Issue is seen when mesh vap
is present.

Change-Id: I288b1131974c8a3edb83c1b3b2a7a856c4ccbcbf
CRs-Fixed: 3276670
2022-09-12 13:58:43 -07:00
Sushant Butta
b1a6c9543b qcacmn: Optimizations for Tx monitor buffer allocations
Currently 2K Tx buffers are allocated at init time and 6K Tx
buffers are allocated at mon vap creation time.
Changes are done to move Tx buffer allocations to 0+8K model,
where allocations are done when enable cmd is triggered.

CRs-Fixed: 3284106
Change-Id: If0a112b8138f2be1db8f764fd7aa4ef12f274bb7
2022-09-12 11:53:54 -07:00
Abhishek Singh
d14b4649c7 qcacmn: Fix the misspellings of public, module and posting
Fix the misspellings of public, module and posting in
wlan_cm_sm.h

Change-Id: I5285f189ce7befe8da5bea04bac53ba093540120
CRs-Fixed: 3287669
2022-09-12 10:15:39 -07:00
Ananya Gupta
61b836202a qcacmn: Record data if pci write during suspended state
When FW was enabling WOW, a ring HP update interrupt is seen
which led to fw crash.
This change records any PCI writes that went through during
runtime suspend from host.

Change-Id: I3c44760ebaf49a131b483813522fe3e451957215
CRs-Fixed: 3280166
2022-09-12 10:15:32 -07:00
Ripan Deuri
c0e0b4f1e1 qcacmn: Add QDF API to get skb timestamp in microsecond
Add QDF API to get skb timestamp in microsecond.

Change-Id: I14019e5e60599c1499285b92b8727e8d6a9bf782
CRs-Fixed: 3286751
2022-09-12 08:15:11 -07:00
vijaraj
8b843ae157 qcacmn: Enable EAPOL logging for FILS Authentication
In api __qdf_nbuf_data_get_eapol_subtype(), the EAPOL key_info
is evaluated only for SAE authentication, which result in EAPOL
logging failure for FILS authentication.

Check ACK and Secure bit in EAPOL key_info to determine
EAPOL packet irrespective of authentication protocol.

Change-Id: Ieef143d36d85cbf473b682810d658de93dbbdad2
CRs-Fixed: 3268362
2022-09-12 08:15:04 -07:00
Shiva Krishna Pittala
527b0343a3 qcacmn: Fix hal_get_srng_ring_id() for Beryllium LMAC rings
For Beryllium LMAC rings, hal_get_srng_ring_id() provides the ring IDs
separately per each LMAC only if that LMAC ring is a destination ring
(This is done to use a common source ring for the DMAC rings).
But the ring IDs for LMAC source rings like DIR_BUF_RX_SRC_DMA_RING are not
being provided separately per LMAC. As a result, these ring IDs in
split-PHY mode are colliding for the 2 LMACs.
Fix this by doing the following.
 - Mark the DMAC common rings within the LMAC rings.
 - Provide ring ID separately per each LMAC if the ring is an LMAC ring
   but not a DMAC common ring.

Change-Id: Ifdae085b5784a03763abfc4edb42d94593e3ea21
CRs-Fixed: 3282702
2022-09-12 05:02:13 -07:00
Rakesh Pillai
ffec5f3f9e qcacmn: Update prealloc size for srng from CFG
Update the prealloc size for RXDMA_BUF and REO_DST
rings using the ini values which have been configured.

Change-Id: Id47fbca3a79b37bba902d1b5bd0bf8c6073648cc
CRs-Fixed: 3283986
2022-09-12 00:28:20 -07:00
Chaithanya Garrepalli
cd40aa85ab qcacmn: Add few missing stats
1. Add stats to indicate REO ring size and Rx desc pool size
2. Add low threshold interrupt stats
3. Update SW2RxDMA ring size max to 16K

Change-Id: If84b88bc08e447774ab445df36b9f2f2219356b8
CRs-Fixed: 3286940
2022-09-12 00:28:13 -07:00
Amith A
dbb1efa360 qcacmn: Disable SP channels in super chan list if AFC not done in indoor
In reg_update_sup_ch_entry_for_mode function, mas_chan_list_6g_ap is
copied to super chan list when AFC power event is not received.
mas_chan_list_6g_ap would have SP channels enabled based on the regulatory
rules and this is propagated to super channel list. In outdoor deployment,
the SP channels can be marked enabled when AFC power event is not received
as there is REGULATORY_CHAN_AFC_NOT_DONE flag set for such channels. But
in indoor deployment, as this flag is not applicable, SP channels should
not be marked enabled.

To fix this, return from reg_update_sup_ch_entry_for_mode function before
enabling the SP channels if the deployment type is not outdoor.

Change-Id: I3c5ccdc4826c33002bf1bb33f686404fa0ffcc65
CRs-Fixed: 3270672
2022-09-11 22:56:07 -07:00
abhinav kumar
2888b71da7 qcacmn: Save jiffies value for QDF timer
Save the jiffies value in a per-timer context
in qdf_mc_timer_t while processing qdf_mc_timer_start
and scheduler_mc_timer_callback. It will help the
debugger to know the exact time gap between the
start and stop/expiry of the QDF timer.

Change-Id: Ia79011971184de9390632253417ee35dc7d26cf8
CRs-Fixed: 3283746
2022-09-10 10:42:23 -07:00
Sai Rupesh Chevuru
65d7505a94 qcacmn: Configure HW to copy valid msdu_len for all the buffers
Copy msdu_len from last buffer of MSDU to all
descriptors of the MSDU.

Change-Id: I9da18d3d1da948bedc07f091b800ffedbcae7add
CRs-Fixed: 3267841
2022-09-10 04:46:11 -07:00
Srinivas Dasari
be121546e8 qcacmn: Synchronize disconnect in RSO stop req-resp path
Host driver sends RSO stop request to firmware as part of
disconnect and waits for RSO stop response. It pauses the
disconnection and resumes once RSO stop response is received
from the firmware.
But cm_lock is not taken when disconnection is resumed from RSO
stop response path. This causes synchronization issues with
north bound thread which issued the disconnection.
Acquire cm_lock by using cm_sm_deliver_event() API to provide
synchronization between disconnect initiator thread and
scheduler thread.

Change-Id: I3c287a020e0a12abab2ad6237594e022adc904a7
CRs-Fixed: 3287190
2022-09-10 01:31:00 -07:00
Jia Ding
c6704fac9a qcacmn: Properly set WDI version for KIWI family
Set WDI version to IPA_WDI_3_V2 for KIWI and KIWI_V2 chipsets.

Change-Id: I2cda2c32f2d56f06c8a8ee84002c2dff2ea28a12
CRs-Fixed: 3247917
2022-09-09 23:53:37 -07:00
Jianmin Zhu
0e52b90c77 qcacmn: Fix assert when disconnect after roam from legacy to mlo
When roam from legacy to mlo, vdev1 is updated first, ml peer is created,
but failed to attach since it is link vdev, then vdev0 is updated, ml peer
is created again, ref count is 1.

When disconnect, stop vdev1 first, in stop event handler, ml peer ref count
becomes 0, mlo_peer_cleanup is called unexpectedly.
mlo_peer_cleanup  should be called after MLO vdev0 stopped.

To fix it, change wlan_mlo_peer_create, mlo_dev_mlpeer_attach is called if
the ml peer not attached and can't be found.

Change-Id: Iae3b2b498849646ae71154484b555a7fc9a36017
CRs-Fixed: 3277886
2022-09-09 04:09:09 -07:00
Devender Kumar
07327b6ea8 qcacmn: Send client disconnect event to IPA
When AP vap disconnect aburputly or by doing channel switch then for WDS
node, client disconnect event is not sent to IPA driver, hence IPA is
not aware of any new wds client coming behind that peer as the previous
delete event is not handled properly

Fix is to send wds client disconnect event when ast entry are flushed.

CRs-Fixed: 3271481
Change-Id: Id507f543c8f4cb8f69e26ba6ca3a23787af21ed7
2022-09-09 04:09:02 -07:00