Commit Graph

4218 Commits

Author SHA1 Message Date
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
Jinwei Chen
ebc572b89c qcacmn: Support RX MPDU sequence logging from DP
tcp_seq_num and tcp_ack_num in qdf_nbuf_cb is not used
for Beryllium, repurpose them to store RX MPDU sequence
number. get RX mpdu sequence number from DP and store
it in qdf_nbuf_cb for logging later.

Change-Id: I3c21b383d827f12a1e1ec6202a5fc17804dddc1b
CRs-Fixed: 3610468
2023-09-12 14:43:14 -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
Adwait Nayak
af00744c5d qcacmn: Update tlv hdr size to 8 Bytes for QCA5332 and QCN6432
Issue:
TX Monitor feature is broken recently in mainline (12.4)
for both QCA5332 and QCN6432.

RCA:
As part of tx monitor processing, it is needed to iterate
through the status buffer queue to populate TX PPDU info.
Every TLV present in the status buffer is parsed one by
one. Moving from one to next TLV is done based on:
tlv + tlv length + tlv header size

And the TLV tag gets computed from the initial 4 Bytes of
the TLV; TLV tag is generally used for further TLV parsing
methodology at HOST.

In case of QCA5332 and QCN6432, the tlv header size should
be 8 Bytes, whereas it is 4 Bytes now. Hence, right after the
first TLV is parsed, we see the TLV tag being computed as 0
for the second TLV and since there is a miscalculation of
4 Bytes in every TLV parsing, all other TLV parsings are
improper. This is the reason why the TX DATA TLV is getting
invoked before TX MPDU START; which results into system crash.

Fix:
Update the TLV header size to 8 bytes

Change-Id: Ib2857ae55e309a78ed6ee9bdbe695ae6daa71a08
CRs-Fixed: 3588743
2023-09-11 15:51:07 -07:00
Bing Sun
e6bd68e884 qcacmn: Fix API with "no previous prototype" build error
If the function neither static nor declared before, it reports
build error "no previous prototype for"。
Define the function as static if it is not declared before.

Change-Id: I12294af372ff9586c99b726bcf755a4fa3e7ba28
CRs-Fixed: 3606048
2023-09-11 03:39:08 -07:00
Chaithanya Garrepalli
31c9403303 qcacmn: Add TX global desc pool per arch type
As cookie format is different between LI and BE have
different global descriptor pool for Lithium and
Beryllium

Change-Id: Idd222f4009c017a1bc4bc4b14043b36d927a9e27
CRs-Fixed: 3608792
2023-09-09 12:57:16 -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
Hariharan Ramanathan
802d89f09e qcacmn: Changes to avoid negative parameter in function
Changes to add debug prints and avoid passing negative parameters to a
function.

Change-Id: I8d1a10e0947582c8a307e40f6871e5dad802012a
CRs-Fixed: 3603846
2023-09-08 11:30:35 -07:00
Mukul Dhiman
e9acbea027 qcacmn: fix dp_update_mlo_ctxt_stats calling location
fix dp_update_mlo_ctxt_stats calling location

CRs-Fixed: 3593264
Change-Id: I3421609b77b975a2579fc03dcbaf011520af772b
2023-09-05 15:15:01 -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
f2ec1f62b2 qcacmn: preventing potential Side effect of ++ oper in assertion
preventing potential Side effect of ++ oper in assertion

Change-Id: I3db2004f11e7668c23278754505bb6c40bd26a24
CRs-Fixed: 3603424
2023-09-04 18:34:40 -07:00
Mukul Dhiman
3764474cbd qcacmn: removing/handle DP stats asserts
removing/handle DP stats asserts

Change-Id: I8bd92a4c052a12846f9e2044ab08bdc6159644f0
CRs-Fixed: 3599818
2023-09-04 14:27:20 -07:00
Tiger Yu
dbfc30e61b qcacmn: Add pdev checking when processing the htt completion messages
Add pdev checking when processing the htt completion messages to avoid
NULL pointer dereference both in the dp_tx_process_htt_completion and
dp_tx_comp_handler.

Change-Id: I9e8129cfa297d4f2e180550c50ad8a4f1be20ee0
CRs-Fixed: 3583893
2023-09-04 06:21:55 -07:00
Pavankumar Nandeshwar
978f044cfb qcacmn: Move the rx err handling API inside build flags
Move the rx err handling API inside build flags to avoid
compilation issue.

Change-Id: I41839bf2f1ee4681bcead9b8291a514e26cd7c8c
CRs-Fixed: 3605183
2023-09-04 06:21:44 -07:00
Neha Bisht
c3dfb6b22c qcacmn: Add SPECIAL descriptor flag in tx desc
Add SPECIAL descriptor flags in tx desc

Change-Id: I0ee73a939ef7734b5f37cdb278642772c1a8d2b9
CRs-Fixed: 3605272
2023-09-03 14:41:02 -07:00
nobelj
beede07860 qcacmn: Add fix to populate transmit count
Add fix to populate transmit count for exception frame

Change-Id: I3fa77783169b86779b8a3d6cc0152de8f58cbadf
CRs-Fixed: 3583259
2023-09-03 10:42:18 -07:00
Ruben Columbus
dcfc490267 qcacmn: debug and reset functionality for monitor
monitor reset functionality when bkpressure is seen.
debug logs added to inspect monitor ring in case of bp.

Change-Id: I8e79f97b315653f302da087ea8d82362ba02723d
CRs-Fixed: 3542923
2023-09-03 10:42:07 -07:00
Chaithanya Garrepalli
084db81bf9 qcacmn: Add null check for DP MLD context
Add NULL check in CDP API for MLD context as it can
be called by upper layers for non-MLO VAPs

Change-Id: Id77284ca81462a7e799a7b93e3528d9d9144372c
CRs-Fixed: 3605323
2023-09-02 21:23:49 -07:00
Neha Bisht
98bd87c4b3 qcacmn: Add call to Deinit/Free tx spcl desc
Add call to Deinit/Free tx spcl desc

Change-Id: If5809e38f61ede9dba08edd29d7320bfc40596fc
CRs-Fixed: 3603525
2023-09-02 05:09:27 -07:00
Mukul Dhiman
b5d08f5db5 qcacmn: remove useless API hal_idle_scatter_buf_num_entries call
remove useless API hal_idle_scatter_buf_num_entries call

Change-Id: Ic7071cf9e5df37e60b2915facad1de3241a77016
CRs-Fixed: 3602662
2023-09-01 10:09:07 -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
Amir Patel
dd839c2135 qcacmn: Fix compilation issues
Fix compilation issues when below macro are undefined
a) WLAN_PKT_CAPTURE_TX_2_0
b) WLAN_TX_PKT_CAPTURE_ENH_BE
c) BE_PKTLOG_SUPPORT
d) DP_RX_MOM_MEM_FRAG.

CRs-Fixed: 3571652
Change-Id: I066ace0b51fd628d31b2d7161765bf9d0c405549
2023-08-31 18:36:29 -07:00
Jeevan Kukkalli
d2a9cfa5ed qcacmn: Address asserts in rx monitor path
Remove unnecessary asserts in rx monitor path

Change-Id: Iafce86bc0c1938b0227e89e4032e36eedd9d8dc7
CRs-Fixed: 3591989
2023-08-31 18:36:08 -07:00
Amir Patel
32c2f949a6 qcacmn: Address asserts in monitor path
Address asserts in monitor path

CRs-Fixed: 3591470
Change-Id: I4a5fbda57e91da6579ca945ecfcb12488b4413f1
2023-08-31 18:35:58 -07:00
Manikanta Pubbisetty
1ca2ca9845 qcacmn: Fix fastpath nbuf reset issue for rhine architecture
Currently, fastpath CE RX buffers are not properly getting reset on
WCN6450 due to which driver is reading data at wrong offset leading to
packet drops. Properly resetting the nbufs after every CE RX buffer
processing is fixing the issue.

Change-Id: Ic29740fb1a72a3302752cc457bcf45f8d0094c46
CRs-Fixed: 3601680
2023-08-31 11:01:53 -07:00
Amrit Sahai
b13bb9a868 qcacmn: Fix rx byte and num count for lithium platform
Fix rx byte and num count for lithium platform

Change-Id: Ic964efacec3bbfbb87dafbb8021415d4633a1393
CRs-Fixed: 3599422
2023-08-31 11:01:42 -07:00
Tallapragada Kalyan
3d0b34dab2 qcacmn: Add a WAR to free a regular msdu in REO Exception ring
SW WAR added in REO exception ring handling where only a
link descriptor is expected but HW gave a regular buffer.
instead of asserting, the WAR will simply free the nbuf
and return the descriptor to free pool.

Change-Id: I1871f0b52afaf2f1755fab51b592d89a67ad95c8
CRs-Fixed: 3530621
2023-08-31 11:01:19 -07:00
Jeevan Kukkalli
89339b7e3a qcacmn: Add check for invalid frame ctrl version
Add check for invalid frame control version while
handling raw frames with FCS errors

Change-Id: I443bb20c5516604ff3ba797570118b3b2123dbd5
CRs-Fixed: 3589137
2023-08-31 11:01:07 -07:00
Neha Bisht
5e70737f80 qcacmn: Handle special descriptor cases for global tx pool
Handle special descriptor cases for global tx desc pool

Change-Id: I33253b726b1b8a2e7438b3bc1dddcac43ad8fb25
CRs-Fixed: 3592887
2023-08-30 13:40:05 -07:00
Neha Bisht
82e9711f5b qcacmn: Move Tx desc pool to global context level
Move Tx descriptor pool to global context level.

Change-Id: Iff13a41f3bebbaa93e559c38842a596d47f4e534
CRs-Fixed: 3534184
2023-08-30 13:39:55 -07:00
Kenvish Butani
59bc72aa0f qcacmn: Use MLO Device Context for finding MLO Partner vdev's
Use vdev list present in MLO device context structure to find
MLO Partner vdev.

Change-Id: I6660ab91b27474dbe80562cc763417f07a7a2776
CRs-Fixed: 3583614
2023-08-30 01:38:35 -07:00
Kenvish Butani
8981a2f3c7 qcacmn: Cleanup MLO Partner list from DP vdev
Clean up MLO Partner vdev list and Bridge vdev
list from DP vdev_be as this is moved to MLO
device context
Also clean up the supporting DP API's and
relevant CDP API's

Change-Id: I614a2c43e493a8aba26ccf75813614ce9fbc8e5f
CRs-Fixed: 3588063
2023-08-30 01:38:11 -07:00
Amit Mehta
78b7773864 qcacmn: Add changes to set band during rx cached flush
Add changes to set band in nbuf cb during rx cached flush
for connectivity logging.

Change-Id: I2243f41349922a4dd023f6651fdb7d682e887046
CRs-Fixed: 3598261
2023-08-29 15:05:29 -07:00
Santosh Anbu
9bfc041802 qcacmn: Use lockless SRNG access for rxdma_mon_dst ring
Since rxdma mon dst srng processing interrupt is tied to single CPU core,
locking is not required to access the srng.

Hence move to lockless srng access.

Change-Id: I58ef7b4c92919bbccea5c86c266738799c0dac85
CRs-Fixed: 3592154
2023-08-28 05:43:53 -07:00
Kenvish Butani
fadd99318e qcacmn: Fix Ref leak issue in MLO dev ctx
Fix ref leak issue in MLO dev ctx detach

Change-Id: Ib42b809cd81f8e36b402d9329ea49338b420c7bd
CRs-Fixed: 3598739
2023-08-28 05:43:43 -07:00
nobelj
7de7642831 qcacmn: Remove packet bandwidth offset from snr
Remove packet bandwidth offset from SNR. So that SNR derived from TLV
path and SNR derived from periodic stats looks same.

Change-Id: Iaed3e3321768bef16ac1ea164920dc35eea8f002
CRs-Fixed: 3585817
2023-08-26 05:24:51 -07:00
Amit Mehta
fcf4ae51f3 qcacmn: Add changes to update band info in nbuf cb
Add changes to update band info into nbuf cb for
connectivity logging.

Change-Id: Iec5e91fe6b39a9a0f8a7a37d4945914d7a9e748f
CRs-Fixed: 3571823
2023-08-25 18:06:06 -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
Pavankumar Nandeshwar
ad866ad37f qcacmn: Avoid asserts in dp related to HW interactions
Avoid asserts in data path which related to HW interactions
and instead use work arounds.

Change-Id: I86089d21c5be23784f8a077b085f3f3b8a2308e4
CRs-Fixed: 3564940
2023-08-23 10:33:18 -07:00
Kenvish Butani
b3f6de339b qcacmn: Move CDP common MLO ops under MLO Macro
Move CDP common MLO ops under MLO Macro

Change-Id: Icd1f13856091c973d213d0d90aabfe86bd588cdd
CRs-Fixed: 3590973
2023-08-18 18:10:17 -07:00
Amrit Sahai
f223bd29ee qcacmn: Add support for to_stack at link level
Add support for to_stack at link level

Change-Id: I794a1bd8ef78a3af15f006ac3306b1c9b23e457d
CRs-Fixed: 3571870
2023-08-18 18:10:07 -07:00
Venkateswara Naralasetty
c62ef80144 qcacmn: Change number of RXDMA_STATUS_RING allocations
Currently two RXDMA_STATUS rings are allocated for the station targets
irrespective of whether DBS supported or not. Only one RXDMA_STATUS_RING
being used for non-DBS targets like QCA6750 and WCN6450, hence change
the number of RXDMA_STATUS_RING allocations to 1 for non-DBS targets.

Change-Id: I4f14c8b5cee892979765f776b37d44e99ba2d558
CRs-Fixed: 3578733
2023-08-16 13:37:11 -07:00
nobelj
d754731461 qcacmn: Add start and end flag set for raw frame
For RAW frames, setting zero to start and end flag make difficult
to reconstruct amsdu frame.

Change-Id: I28ffb87682427c7986f98730d514a0421eae1972
CRs-Fixed: 3584549
2023-08-16 13:36:59 -07:00
Kenvish Butani
e617b8791c qcacmn: Add Mcast Seq num in MLO dev ctx
Move multicast sequence number field from
dp_vdev_be to MLO device context struct.

Change-Id: I28c3a9f4480a5da5b622f9dd2a070ac25b9b6e5b
CRs-Fixed: 3586918
2023-08-16 13:36:38 -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
Mukul Dhiman
0ad05f4a1a qcacmn: aggregate vdev stats in to mlo ctxt at vdev detach
aggregate vdev stats in to mlo ctxt at vdev detach

Change-Id: I002e48e4b95a32a0ff58e3e1cc26ea97d94f7a5d
CRs-Fixed: 3572527
2023-08-16 02:17:17 -07:00
Namita Nair
f06f5e0791 qcacmn: Fix TX completion configurations
Currently when OPT_WIFI_DP is enabled, dp_tx_get_queue()
sets the ring_id always to one ring. This could potentially
affect the Tx data rates. This change is to ensure
all the Tx data rings are used.

Change-Id: Ib1ecf7f36f6967c0edf947d6310d6ae7caf43e5b
CRs-Fixed: 3577829
2023-08-16 02:17:06 -07:00
Adwait Nayak
9c55f0cc3c qcacmn: Add pdev_id for word mask subscription
Add missing argument pdev_id in dp_mon_rx_wmask_subscribe
to avoid compilation issue.

Change-Id: I3a13163d062c93f67ba0101b881f48ab239a585f
CRs-Fixed: 3551975
2023-08-15 17:52:55 -07:00