Commit Graph

1386 Commitit

Tekijä SHA1 Viesti Päivämäärä
Amit Mehta
4d9cda5abb qcacmn: Fix invalid osif_vdev issue
Currently as part of TDLS connection if TLDS connection is formed
on secondary vdev, osif_vdev of secondary vdev is updated with
osif_vdev of primary vdev.
Due to osif_vdev update, during vdev delete 1st vdev will call
API to free osif_vdev. When 2nd vdev try to access the osif_vdev
it will result in invalid pointer access.

As current change was done to handle case where osif_vdev
for MLO connection used to point to 2 different interfaces
and where secondary interface used to point to NULL/dummy netdev.
As per latest change osif_vdev will point to per vdev dp_link
which for MLO connection will have single interface. So osif_vdev
update is not required anymore.

So, to fix invalid/stale pointer issue remove osif_vdev update for
TDLS connection.

CRs-Fixed: 3814466
Change-Id: Icac13d88411ca572c9d5823a6bd2d3d5b1ba632f
2024-05-24 00:18:04 -07:00
Ananya Gupta
00e159df45 qcacmn: Retrieve monitor flags params from dp_soc
Include CDP_MONITOR_FLAG to get monitor mode flags from
SOC structure.

Change-Id: I67992abcbb64e4f24cf42c57557d501330d3c3f2
CRs-Fixed: 3809485
2024-05-21 09:32:39 -07:00
Amit Mehta
03f346bc1e qcacmn: Add changes to distinguish between LPC and STA+MON
Currently there is no way to distinguish between
Local Packet Capture and STA+Mon mode as both mode
uses same monitor interface. So to distinguish between
two mode in local_packet_capture enable case use
mon_flags which can be passed during monitor interface
add time. If "flags otherbss" is passed during
monitor interface add driver will consider current mode
as STA+MON mode, LPC otherwise.

Change-Id: I56a724697bb187d0b809b6c43c7b5bf4b7d15ca7
CRs-Fixed: 3739438
2024-03-18 01:57:08 -07:00
Amit Mehta
0d61faf9e7 qcacmn: Add changes to store monitor interface flags
Currently STA+Mon mode is not supported in LPC case
as both mode uses monitor interface to capture
packets. So to distinguish between two different
monitor modes add changes to store monitor interface flags

Change-Id: Ied43fa50adac200bed47a4044245baca4d6cc84f
CRs-Fixed: 3739291
2024-03-18 00:36:58 -07:00
Manikanta Pubbisetty
7e58813e0e qcacmn: Optimize force free logic in dp_find_missing_tx_comp()
Currently during runtime suspend, in dp_find_missing_tx_comp(),
TX descriptors are freed forcefully if the TX completions for
those descriptors do not arrive within 60 seconds.

In certain rare corner cases, there is a chance of TX buffer (that is
in the enqueue path) getting freed in the TX completion path due to
delayed completions. This results in NULL pointer dereference.
Following is the sequence of events for such a case,

1. dp_find_missing_tx_comp() frees a TX descriptor
2. Different buffer gets attached to the same TX descriptor
3. Delayed completion for the previous TX arrives and frees
   the buffer in point 2.

Defer the free in dp_find_missing_tx_comp() when there is a delta in
HP/TP for the TX/COMP rings. If HP & TP are not same, then there is
high chance of processing the delayed completion beforehand, thus
avoiding the aforementioned race.

Change-Id: Ia835928f85ea0f79d0187a55333cb8959d0a72e9
CRs-Fixed: 3721341
2024-02-12 05:21:10 -08:00
Rakesh Pillai
a5c5711971 qcacmn: Add vdev delete notify callback
Add vdev delete notify callback for DP vdev, which
is called when dp_vdev is freed. This will notify
the osif/non-cmn dp layer upon dp_vdev delete.

Change-Id: I22110ebd048066e84644c04b4903c50dd61c61a4
CRs-Fixed: 3696638
2024-01-17 00:37:37 -08:00
jinbao liu
cf8f844d0c qcacmn: Fix an array index out of bounds issue
Sometimes when the stats of MLD_PEER is requested, Access
Violation may occur because peer_stats[1], which does not
exit, may be accessed. This change fixes this issue by
aggregating the stats of all link_peer into peer_stats[0].

Change-Id: Ib8138d4b95bef39b084756dd9f9ffae67967100a
CRs-Fixed: 3678284
2023-12-20 18:30:54 -08:00
jinbao liu
b4f2073ac3 qcacmn: Optimize rx reorder queue setup
This change optimizes rx reorder queue setup by using
tid_bitmap, which contains a group of tids, to set up
multi tids at a time instead of one tid after another.

Change-Id: I161b0c812c436ef79d2d1db693b8d0ac41505878
CRs-Fixed: 3661593
2023-12-08 15:22:17 -08:00
Venkateswara Naralasetty
958e0db9af qcacmn: fix out-of-bound issue in scattered list setup
Fix out-of-bound issue in scattered list setup.

Change-Id: I8a0c419227de3613d70229e1b6364d7e46dfbf7b
CRs-Fixed: 3664082
(cherry picked from commit 754a729a834a4a1661afaf38ca19be3161fcfd6f)
2023-12-06 06:58:03 -08:00
Rakesh Pillai
d149d2a2e8 qcacmn: Do not unmap buffer if MSDU done is not set
Currently if the msdu_done bit is not set in the
rx_pkt_tlvs, the buffer is unmapped and freed.
There was an issue seen where hardware accessed a
buffer address, which probably was delivered to driver
without DMA of data to the buffer (thereby unmapped
and freed before hw attempted second access). This
results in unwanted recovery.

Based on the above hypothesis, add a workaround
to skip the unmap-and-free of any buffer for which
the msdu_done bit was not set in the rx_pkt_tlv.
Also mark the corresponding rx_desc as in_err_state.

The rx_desc corresponding to such aforementioned
msdu_done failure msdus are stored in a rolling
list, where the old entry is force unmapped & freed
when a new entry needs to be added. This force
unmap-and-free of the oldest buffer gives an uncertain
amount of delay between it being reaped from rx ring and
actual unmap-and-free.

Change-Id: Ibf8f3c886118d532af818466cb46218d88146271
CRs-Fixed: 3667674
2023-11-28 04:08:22 -08:00
Rakesh Pillai
5ffa24be87 qcacmn: Record msdu done fail buffers history
Record history of all the buffers where msdu_done
bit was not set.

Change-Id: Ibfe985cc8ecfed57eae2db26ef337c95ca4233c8
CRs-Fixed: 3662200
2023-11-27 08:55:05 -08:00
Rakesh Pillai
a7fe389b77 qcacmn: Fix local_link_id assignment for link peers
Currently the local_link_id is assigned to each
link peer, during peer setup, with an incremental
number, based on the number of peer setup being
done for the link peers corresponding to the same MLD.

The above logic does not handle the link switch case,
where any particular link peer can be created and deleted
multiple times, thereby leading to 'n' number of peer
setups, each assigning an incremental number as the
local_link_id to the link peer. Due to this the local_link_id
value will exceed the MAX_MLO_LINKS ceiling value, and
when this local_link_id is used to set the frequency band
it leads to an out-of-bound array access.

In order to fix the above mentioned scenario, maintain
a mapping of link peer mac address to local_link_id inside
the txrx_peer (common for all link peers) and use this mapping
table to get the local_link_id. This will make sure that during
any link re-purpose, the link peer being setup will regain the
local_link_id which it was assigned during the first time it was
setup.

Change-Id: Ia78413efe328c81bab74b3a048214d3807b6c6c4
CRs-Fixed: 3658539
2023-11-10 02:48:05 -08:00
Amit Mehta
40d1805fce qcacmn: Add changes to update band info in txrx_peer NULL case
Currently if txrx_peer is NULL in Tx completion or rx process
band update will not happen, which will result in invalid band
issue during connectivity logging.

To fix the issue maintain local link id and use link id to
find link peer and update band information in nbuf cb
based on peer frequency.

Change-Id: Ia5a6001fbc167a497660dc7be39a3e641dd28896
CRs-Fixed: 3654696
2023-11-03 10:10:11 -07:00
Pavankumar Nandeshwar
c71f2aaf75 qcacmn: Clean up global desc pool during Umac reset
Make sure that the global dp tx desc pools are cleaned
up only once during MLO umac reset.

Change-Id: Id6e0ac6532b11ffb9ea190b6ab4d481fb486d853
CRs-Fixed: 3647660
2023-11-03 10:09:59 -07:00
Jinwei Chen
e8d518c82c qcacmn: fix TX completion ring NULL pointer dereference issue
If IPA is enabled, index 1/2 in array soc->tx_comp_ring[] will
not be initialized, but initialize index 3/4 instead, if access
to index 1/2, NULL pointer dereference issue appeared.

use soc->num_tcl_data_rings as number of TX completion ring
wlan host interested, it differs between IPA enabled/disable case.

Change-Id: I92b4e2c9971f93136a9f4e60ae3de32140aa2477
CRs-Fixed: 3647677
2023-10-25 23:29:34 -07:00
Himanshu Batra
7dbcea96f9 qcacmn: MLO 3 link simultaneous tx transmission
MLO 3 link simultaneous tx transmission.

Change-Id: I1f92e49a5ea634f99e354dd02737c74bae20c483
CRs-Fixed: 3634563
2023-10-25 09:39:58 -07:00
Jinwei Chen
d047565c37 qcacmn: Support watermark stats for TX completion srng
Support watermark stats for TX completion srng.

Change-Id: Id13bd12ec9c2723f5b5e5afffedcb939cd5e5d74
CRs-Fixed: 3635719
2023-10-15 22:17:35 -07:00
Himanshu Batra
f6c56895c1 qcacmn: Add support for vdev/peer create/delete cfgmgr message support
Add support for vdev/peer create/delete cfgmgr message support

Change-Id: I623b1339fe706ff4204199ff9e8745ebcdc9cae2
CRs-Fixed: 3636364
2023-10-15 12:11:57 -07:00
Sai Rupesh Chevuru
0975d3709e qcacmn: Delete the mld peer only when all link peers are deleted
During the target recovery avoid mld peer peer deletion
before all the link peers gets deleted.

if peers are deleted during the recovery DP will not receive
peer unmap event as FW is asserted, resulting peers will be
deleted form the mld link peer list where as available in
peer id to obj map. if primary soc goes for the recovery
then mld peer is getting deleted forcefully, where as other
link peer in non primary soc is having reference to mld peer
which is already freed

Change-Id: If4dcd822f4c9bc98757952725592eb6a3f64a5db
CRs-Fixed: 3625483
2023-10-14 08:38:56 -07:00
Himanshu Batra
d0faedd65a qcacmn: Add support for cfgmgr interactions
Add support for cfgmgr interactions

Change-Id: I9ac15639c61784e250318f290c47db4e840f8a13
CRs-Fixed: 3633890
2023-10-14 05:39:52 -07:00
Chaithanya Garrepalli
47296136e3 qcacmn: replenish complete rx_refill ring in UMAC reset
In case of UMAC reset if in_use buffers are sufficient
to fill complete RX refill ring we are replenishing
only 1/3rd ring at pre-reset.

In case of low threshold interrupts disabled ring might
be never refilled. At post reset refill complete ring.

Change-Id: I0e4ed942120619ef357bc91f8cbbab8c1fd1b06e
CRs-Fixed: 3628996
2023-10-10 07:08:30 -07:00
Sushant Butta
41e5a457c0 qcacmn: cdp support enable/disable dp debug logging
Added cdp support to get/set
dp debug logging in per packet path.
Enable debug logs only if dp debug logging
is enabled.
With this change there is benefit of all CPU
average around 1% to 1.5%

Change-Id: Ibe0ca4c75211cace4c5fca9ec0bce1c594ca8a6b
CRs-Fixed: 3623910
2023-10-04 08:13:23 -07:00
Himanshu Batra
3efaabd704 qcacmn: Update UIO info for DP data rings
Update UIO info for DP data rings.

Change-Id: I0c6e8c8e59aefb373dc024d91eb1379ed7564f31
CRs-Fixed: 3623839
2023-09-29 11:23:33 -07:00
Aman Mehta
3768768424 qcacmn: Update tx ingress stats with xmit field
Update tx ingress stats with xmit field

Change-Id: I86ad9c59f49213e2968751bfc488eb2bdd95baa5
CRs-Fixed: 3561679
2023-09-27 22:13:14 -07:00
Amit Mehta
73fb81505d qcacmn: Print peer info in dp_get_peer_state
Currently host is not printing peer info in
dp_get_peer_state, due to which its difficult
to check for what peer state is returned for
which peer.

To fix the issue print peer info in dp_get_peer_state
and print additional peer info in dp_peer_mlo_setup
and dp_peer_state_update

Change-Id: Iccaf46f1eb778c42e5039da14499b82502508727
CRs-Fixed: 3620093
2023-09-27 13:09:53 -07:00
Linux Build Service Account
288f8c09ea Merge "qcacmn: Add DP rings to SSR dump" 2023-09-22 01:14:07 -07:00
Linux Build Service Account
3668c4e7a7 Merge "qcacmn: Avoid alloc and init of tx desc pool for NSS offload case" 2023-09-22 01:13:51 -07:00
Gaurav Saini
b64de0cf4a qcacmn: Handle RX exception from IPA on WDS-EXT netdev
When WDS_EXT feature is enable, Host needs to redirect
the data packets to WDS extended netdevice.

Change is added the support for forwarding the RX packets
when received from IPA as an exception by deriving the
correct netdevice interface.

Change-Id: I083a1acc72023f3ebe6ea36ec05a5706f89c16bc
CRs-Fixed: 3597357
2023-09-21 17:57:45 -07:00
Amit Mehta
0b0fde8706 qcacmn: Add DP rings to SSR dump
Add DP rings to SSR dump

Change-Id: If1d1fe0a66a0f836bd5344b14ba4187e58921568
CRs-Fixed: 3604903
2023-09-20 07:21:36 -07:00
Neha Bisht
acd794ba1c qcacmn: Avoid alloc and init of tx desc pool for NSS offload case
Avoid alloc and init of tx desc pool for NSS offload case

Change-Id: I16a06ce9d15e56e04692c9032caf04df8f477306
CRs-Fixed: 3619837
2023-09-20 17:28:33 +05:30
Sushant Butta
37c16635b1 qcacmn: Set fast_tx flag when ol_stats are disabled
Set fast_tx when ol_stats are disabled in
ultra_fastpath to avoid Tx completion overhead.
And also includes following fixes:
cdp support to get jitter stats
cdp support to set/get vow stats
cdp support to get Sojourn Stats

Change-Id: I8bdb176edbdf210b4dedfaa117f058f57bd17241
CRs-Fixed: 3604215
2023-09-16 07:45:49 -07:00
Namita Nair
1f2104b733 Revert "qcacmn: Initialize ipa_mapped to 1 in soc attach"
This reverts Change-Id: Idcb86db99f522959b639865f77178cd47a234277.

Change-Id: I3084631103fa3e1937605af5ed5e14b8348cef57
CRs-Fixed: 3569762
2023-09-15 21:09:12 -07:00
Yu Wang
3f6e59aef9 qcacmn: add support for transmit latency stats
Add support for per-link transmit latency statistics

Change-Id: Iadb87deb6e19cd4d9f86565fe687c7d9a1f05679
CRs-Fixed: 3597028
2023-09-15 17:34:02 -07:00
Amrit Sahai
ce15cf8067 qcacmn: Optimize Event Based Mechanism to reduce delay
Wait for firmware response only if the response
is pending after posting the txrx stats query to firmware.

Change-Id: Ib300f97bc2cc08a2947be9021ff3e399191d1c8e
CRs-Fixed: 3599915
2023-09-14 08:42:03 -07:00
Pavankumar Nandeshwar
a9d8a404fc qcacmn: Handle special tx descriptor pool cases
Fix the missing special tx descriptor pool cases

Change-Id: Ie6a7539e77b805483c32cb7bcfbc3143f9ef8034
CRs-Fixed: 3610126
2023-09-13 14:20:33 -07:00
Amit Mehta
c73beace9b qcacmn: Fix direct return while calling dp_set_peer_freq
Currently from dp_set_peer_param while calling dp_set_peer_freq
there is direct return which can result in peer refleak. as there
is reference taken in dp_set_peer_param.

To fix the issue instead of direct return break and release reference.

Change-Id: Ic3cfe993de64566afc13157810b80d3b3b28d244
CRs-Fixed: 3608000
2023-09-12 23:35:10 -07:00
Mukul Dhiman
eed178035d qcacmn: add check before % operation
add check before % operation

Change-Id: I4189daf130470f5182a2dec3885a68c7ecf717ec
CRs-Fixed: 3603379
2023-09-12 14:43:25 -07:00
Yu Wang
77608ba875 qcacmn: decouple TSF auto report from uplink delay feature
TSF auto report is a stand alone feature, which can
be used to sync TQM clock and TSF clock, more than
one features depend on it.
Introduce a new build flag WLAN_FEATURE_TSF_AUTO_REPORT
to decouple it from uplink delay feature.

Change-Id: I5c62bee08d44234dc4936b3c63f3060edec30df8
CRs-Fixed: 3560244
2023-09-12 14:42:24 -07:00
Pavankumar Nandeshwar
d003031f93 qcacmn: Avoid multiple pre reset done triggers in Umac reset
Make sure that the pre reset done notification is sent
only once during Umac reset.

Change-Id: I1d9e1d8caef49443d25e879086043e815ea087a1
CRs-Fixed: 3594653
2023-09-09 03:36:44 -07:00
Amit Mehta
3a860c18df qcacmn: Add support to update peer freq
Add support to update peer freq info and
add changes to map link ID to band

Change-Id: I1115573c70d73ff83df415bb5732b8ff4109a787
CRs-Fixed: 3589666
2023-09-04 18:35:01 -07:00
Mukul Dhiman
8f9aadc071 qcacmn: add wrapper function to dp_txrx_get_peer_stats
add wrapper function to dp_txrx_get_peer_stats to handle
identical mlo and link peer case

Change-Id: Ia2d05eca143dd2759c6765c54f26da7f73210271
CRs-Fixed: 3595756
2023-08-31 18:37:09 -07:00
Venkateswara Naralasetty
b5028a76d4 qcacmn: Enable interrupts on RXDMA MONITOR STATUS ring for wcn6450
Enable interrupts in monitor mode for wcn6450.
Interrupt configuration related code is moved from dp_main.c file to
dp_rings_main.c file as part of 'Ie58eae34a2da77c2d63870fab74b9d2d9d49c14a'
as Evros does not use dp group interrupts.

Move back the interrupt configuration related code from dp_rings_main.c
to dp_main.c  to enable interrupts in monitor mode for wcn6450.

Change-Id: I7a3cbbe905072dad1cf38799ac6ef441281f78f9
CRs-Fixed: 3565734
2023-08-25 03:03:23 -07:00
Chaithanya Garrepalli
a0e560c475 qcacmn: Add arch ops for get chip id API
Add arch ops for dp_mlo_chip_id to avoid access
of dp_soc_be struct for LI platforms

Change-Id: Idc7612ef3c517aa62668fe15e51b5e5ec74bb253
CRs-Fixed: 3582795
2023-08-24 04:18:49 -07:00
KARTHIK KUMAR T
39bb6afc38 qcacmn: added MLO MCAST packet stats
added MLO MCAST packet stats in tx stats

Change-Id: I46ad1a94bf986d21a9b865d7531298e805abcda8
CRs-Fixed: 3582328
2023-08-16 13:36:26 -07:00
Amit Mehta
b7b5ec0c8a qcacmn: Do not set ref count as 1 for MLD peer
During dp_vdev_flush_peers after peer unamp ref_cnt
for peer is set to 1. Which in case if peer unamp
for MLD peer is called before link peers from dp_vdev_flush_peers,
it will result in MLD peer delete before link peer.

To avoid MLD peer delete before Link peer, after peer unmap
in dp_vdev_flush_peers do not explicitly set ref_cnt as 1
for MLD peer.

Change-Id: If7ab63eb213dc482205f3847f0b32e246ca76d51
CRs-Fixed: 3585860
2023-08-15 00:44:40 -07:00
Sai Rupesh Chevuru
98eff70aff qcacmn: skip WDI peer creation and deletion events in STA mode
In the case of STA mode, will be marking bss peer as part of
peer map events during the creation.
Due to this create event will be triggered during the peer creation
as bss flag is not set and there won't be any peer delete event
to bss peer resulting stale entries in mld hash.
Hence will be avoiding creation and deletion events.

Change-Id: I15a78ad0b8a90b34505880af94522abbe1de8fb5
CRs-Fixed: 3581548
2023-08-10 14:43:49 -07:00
nobelj
641a8433ff qcacmn: Add support to enable monitor peer for all peer
monitor peer is not allocated for MLO MLD peer this lead to drop in
broadcast and multicast frame in legacy tx monitor path. Added support
to enable monitor peer for all peer.

Change-Id: I786554a918bae966a929e4c9188c1b0f324b5846
CRs-Fixed: 3544695
2023-08-07 16:29:04 -07:00
Sai Rupesh Chevuru
7157add22c qcacmn: Avoid wdi events for bss peer
As the bss peer is closely tied with the vdev creation
and deletion, listeners might be uninitialized and result
race conditions. send an event only to the connected peers.

Change-Id: Ia0ae063c92bba38d2fb67fe4eae84f5562991fa2
CRs-Fixed: 3574176
2023-07-31 02:12:38 -07:00
Mukul Dhiman
59ec56d44f qcacmn: add partner vdev debug prints in TXRX_AST_STATS
add partner vdev debug prints in TXRX_AST_STATS

Change-Id: Icf3cc557572519e43e3135e2b22ff457982a8d32
CRs-Fixed: 3571207
2023-07-30 19:08:19 -07:00
Sai Rupesh Chevuru
227c8c9aaa qcacmn: In peer WDI events use the vdev id instead of osdev
In peer WDI events use the vdev id instead of osdev.

Change-Id: I1dd702acba2721712222a4985b4747050647b4e0
CRs-Fixed: 3571299
2023-07-27 08:32:32 -07:00