Commit Graph

3590 Commits

Author SHA1 Message Date
Tallapragada Kalyan
cf404ea304 qcacmn: check if net dev is valid in nbuf
check if dev field is NULL in nbuf, if NULL
return false

Change-Id: Ie7365197be18d0575ffc4180cb956c8c56f3c27b
CRs-Fixed: 3471249
2023-04-20 03:12:18 -07:00
Prakash Manjunathappa
50c9ab56a1 qcacmn: Do not subscribe for MC/BC frames for kiwi/peach
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.

Make this change only for kiwi/peach using hal ops.

Change-Id: Id8665261a512c9db3e808f95082ff82b47f01ade
CRs-Fixed: 3464036
2023-04-19 18:12:11 -07:00
Kenvish Butani
711fb71599 qcacmn: Revert "Optimize DP Rx Error Handling (Part-2)"
This reverts the commit.

Change-Id: Ia1a304daa5d63a063bfc2d22b9b99ccad02af0e1
CRs-Fixed: 3472017
2023-04-19 05:43:51 -07:00
Nitin Shetty
7045ccc728 qcacmn: handle ppeds init/deinit
based on ppeds_handle allocate and free the
ppeds resources.

Change-Id: I70fc4bfa879fcd62c0e8a80c5b57938a2063bccc
CRs-Fixed: 3462725
2023-04-19 03:55:26 -07:00
Sreeramya Soratkal
73d7e4d15a qcacmn: Derive TID from DSCP in case of legacy SCS
With the convergence of SCS and SAWF, do not override the TID
for legacy SCS case. Retain the value obtained using DSCP in
this case.

CRs-Fixed: 3460620
Change-Id: I19502d09f5f37376bac08eb05fcf770c71331e1c
2023-04-18 22:02:50 -07:00
Surya Prakash Raajen
74c7a8d542 qcacmn: Add CDP api support for umac reset init
Add CDP api support for umac reset init API, these apis are expected
to be called whenever shmem is deinitialized.

Change-Id: I307c586454580ab8f83b0d515defa93d4e8ff656
CRs-Fixed: 3458268
2023-04-18 14:27:32 -07:00
Venkateswara Naralasetty
26099afe23 qcacmn: suspend/resume changes for WCN6450
Changes required for suspend/resume support for WCN6450

Change-Id: I4610f6bdb8de92f03884af6c07a5141dd27174be
CRs-Fixed: 3447469
2023-04-18 12:11:24 -07:00
Ruben Columbus
476546a791 qcacmn: flush ext_qdesc buffer
send CMD_FLUSH_CACHE to HW to flush extended descriptor based
on its size.

Change-Id: Ia1260e54614467215711f84fe5cf51b1d05b050a
CRs-Fixed: 3426113
2023-04-18 12:11:13 -07:00
Sushant Butta
aad187e304 qcacmn: Use monitor pkt tlvs and buffer size for monitor
Use monitor pkt tlvs size and monitor buffer size
instead of data pkt tlv size and data pkt buffer size.

Change-Id: I3099f6526aa11b353c8a5178de450d48f141a461
CRs-Fixed: 3406962
2023-04-18 12:10:42 -07:00
Nandha Kishore Easwaran
985fc0f9b5 qcacmn: Add txmonitor masks to legacy interrupt
Add txmon masks to legacy irq interrupt calculation.

Change-Id: I247008c89361c069c62c0ac90b12fb798261b9e5
CRs-Fixed: 3438542
2023-04-17 07:08:25 -07:00
Amrit Sahai
9fea4029b7 qcacmn: Fix printing of stats for TX ring for SDX_75
In SDX_75, doorbell register is only writable not readable
so fix printing of stats for TX ring.

Change-Id: I058c4241b9c91902f32ed76f099f7501e667c78b
CRs-Fixed: 3436677
2023-04-17 07:08:14 -07:00
Srinivas Girigowda
3228443af7 qcacmn: Set Tx ring packet type flag properly
Currently, HTT Tx ring packet type flag is set as bitwise operation
which is incorrect and results in "Debug Assert Caught".

Set this CTRL and DATA packet type flag with a value of 1.

Change-Id: I62e89fe637441fcc680ea8d5fe8d157d8e7142ae
CRs-Fixed: 3415733
2023-04-14 08:24:44 -07:00
Srinivas Girigowda
7a5a84d777 qcacmn: Fix compile error 'address of array will always evaluate to true'
address of array 'tx_ppdu_info->hal_txmon.rx_user_status' will always
evaluate to 'true' [-Werror,-Wpointer-bool-conversion]

Change-Id: Ic148f34b82ce756eb07173b43f8f155a7b4a12d9
CRs-Fixed: 3415726
2023-04-14 08:24:33 -07:00
Jinwei Chen
075d9641ff qcacmn: fix dp_peer ref_cnt leak in CFR processing
dp_peer ref_cnt is increased in dp_rx_mon_populate_cfr_ppdu_info(),
but it does not release it at last, this leads to dp_peer ref_cnt
leak which then dp_peer memory can't be freed and corresponding dp_vdev
leaked as well.

release the ref_cnt for dp_peer at the end of
dp_rx_mon_populate_cfr_ppdu_info().

Change-Id: I8ac301609deb3790ad9f3d6eda85d502cede9799
CRs-Fixed: 3461642
2023-04-14 08:24:21 -07:00
syed touqeer pasha
5b0980f461 qcacmn: Check Tx halt during umac reset
1. Check Tx halt during umac reset and avoid halt if set already.
2. Perform SRNG disable only in case of umac reset

Change-Id: Id364a6460a64e83002b5c96e08031ad2a0bc8fd7
CRs-Fixed: 3459427
2023-04-14 01:54:13 -07:00
Devender Kumar
dd97356cc5 qcacmn: Fix compilation issue for IPA when vlan is enable
variable is not defined leading to compilation
issue when vlan is enable in SDX.

Fix is to correct the variable name.

Change-Id: I2d3618d9ad3d8a48026cb8c737ce6ede733cb478
CRs-Fixed: 3462236
2023-04-13 07:36:54 -07:00
Pavankumar Nandeshwar
d7522b89ad qcacmn: Update Umac reset state machine before sending cmd to FW
Update the Umac reset state machine before sending the command
to firmware as we might get the response from firmware even
before the state is updated.

Change-Id: I3ca2560d91c39d34e7efe156521c2ba5114a7536
CRs-Fixed: 3462821
2023-04-13 07:36:43 -07:00
Manikanta Pubbisetty
b5ac9ed64c qcacmn: Record hardware TX descriptor during enqueue for WCN6450
Record hardware TX descriptor history during TX enqueue for WCN6450
(Rhine hardware). This will aid in debugging data path issues.

Change-Id: I99c2a88ca161f89d529cba92692811fadee28938
CRs-Fixed: 3462090
2023-04-13 03:32:51 -07:00
Karthik Kantamneni
dd822c960f qcacmn: Add RX error handling support for RHINE
Handle RX error MSDUs received in normal RX path
in RHINE architecture.

Change-Id: I56a4ef2e52f5b0668436594ca55c1cb0d48f97be
CRs-Fixed: 3456495
2023-04-12 14:53:59 -07:00
Karthik Kantamneni
7d007a3edf qcacmn: Add RX ring based debug history support for RHINE
Add RX debug history support and first packet marking
after WOW for RHINE architecture based RX path.

Change-Id: Ife719bdc3e5031a63b3f97c5842a220caeda8ffd
CRs-Fixed: 3452940
2023-04-12 14:53:48 -07:00
nobelj
3e8ff635aa qcacmn: Add fix to check number of users
Add fix to check number of users to avoid overrun.

Change-Id: I00286db736d10ecfae6ca0c4bfc8850cc9b02178
CRs-Fixed: 3454011
2023-04-12 11:07:57 -07:00
Varsha Mishra
ed8242ce05 Revert "qcacmn: Do not subscribe for MC/BC frames"
Revert commit to not subscribe to MC/BC frames.

Change-Id: I745df3b687d21c95189487daedba5296b471a545
CRs-Fixed: 3458087
2023-04-12 05:04:13 -07:00
Jinwei Chen
9253f32cfc qcacmn: Use HTT_MSDU_QTYPE_USER_SPECIFIED for TX ILP judgement
Per new design, FW will use HTT_MSDU_QTYPE_USER_SPECIFIED instead of
HTT_MSDU_QTYPE_LATENCY_TOLERANT for TX ILP support judgement,
change it in host part accordingly.

Change-Id: I0318801c4fe11ca623a99459d9f6820acb1c8fea
CRs-Fixed: 3462232
2023-04-12 03:20:27 -07:00
nobelj
0660a65062 qcacmn: Add fix to display WDI event and stats count
On txrx_stats 260, wdi event stats are displayed with content as zero.
Which need to be displayed only on non zero value.

Change-Id: I5ad4595e35e977dd141584c92cdc164e153b7c0f
CRs-Fixed: 3454039
2023-04-12 01:33:26 -07:00
Chaoli Zhou
533fc12e2f qcacmn: Fix null pointer issue in LPM case
In the LPM case, if the tx desc has been force
freed in the dp_bus_suspend ->dp_find_missing_tx_comp,
then after data transfer resumed, fw may report
tx complete for the same tx desc, and we should
skip it to avoid null pointer access.
The reason why set default vdev_id to 0xff is:
Since in this case, it happned disconnect before
suspend, so the tx desc pool will be deleted and
reinitalized when resume, so the pdev is null in
the force freed tx_desc and vdev_id should be changed
from 0 to DP_INVALID_VDEV_ID, otherwise the below logic
in the tx complete handler will not skip handling
this freed tx_desc.

if (qdf_unlikely((tx_desc->vdev_id == DP_INVALID_VDEV_ID) &&
    !tx_desc->flags)) {
	DP_STATS_INC(soc, tx.tx_comp_exception,1);
	dp_tx_desc_check_corruption(tx_desc);
	continue;
}

Change-Id: I5f3ff6fd783893f92a0fd6b3db7457b280fcb1c8
CRs-Fixed: 3447465
2023-04-12 01:33:16 -07:00
Amit Mehta
8019cce45c qcacmn: Add new variable in dp peer to store link ID
Add new link_id variable in dp peer to store link ID.

Change-Id: I5445e2adc43c8bec895d79283ba5e5f8d6c0b095
CRs-Fixed: 3443916
2023-04-11 22:38:02 -07:00
Harsh Kumar Bijlani
56c08d2ecf qcacmn: Store MSCS context in MLD peer in case of MLO connection
Store MSCS context in MLD peer in case of MLO connection

Change-Id: I482e2259077eb8c74aeed93beb8472a683ce2817
CRs-Fixed: 3457780
2023-04-10 01:20:06 -07:00
Devender Kumar
b0e26ae525 qcacmn: Add support for Third WKK radio in IPA context
Currently we only support DBDC with IPA, to support
TBTC we need to provide pipe setup for third WKK
radio to IPA, so that IPA can register the pipes
in wlan2 smmu context bank for third WKK radio.

Change-Id: I941c0ddec4f23406aa5acabbfb80a7499d830d75
CRs-Fixed: 3456002
2023-04-10 01:19:56 -07:00
Vignesh C
fa0f65caaa Revert "qcacmn: Add support for HMWDS add and reset cmds in Beryllium"
This reverts commit Iaa110ba26a477fc0b77647a712c377029b038940.

Change-Id: Ifed1cf1e73ac03a09fc03acdc273958c9789f8a8
CRs-Fixed: 3458091
2023-04-10 01:19:45 -07:00
Chaithanya Garrepalli
e61eaa37e2 qcacmn: in fast xmit API memcpy 7 words for AP mode also
As we are using index_look_up_overwrite field in TX
descriptor with WDS_EXT need to reset this field in
FAST TX API even in AP mode

Change-Id: I6027a2d99be715973af5f8091755f0a4a9256010
CRs-Fixed: 3450922
2023-04-09 23:13:26 -07:00
Chaithanya Garrepalli
fdc228f338 qcacmn: Fix intraBSS issue between legacy and MLO clients
Fix intraBSS MCAST traffic issue between legacy and MLO
clients. Fix includes below changes

1. Change get_mcast_primary_vdev to return correct value
in case current VDEV is mcast primary
2. Avoid checking vdev->mlo_dev as it is set only for
mcast primary VDEV
3. In intraBSS ucast case use destination SOC to get the
destination peer with da_peer_id

Change-Id: I0d7a890bc62f703cd92e7c9edc20768a9a487d06
CRs-Fixed: 3456458
2023-04-09 23:13:15 -07:00
Namita Nair
59a36d8e87 qcacmn: Handle deprecated interface calls to IPA
As IPA has moved out of the kernel, ipa_uc_reg_rdyCB
interface call from WLAN is not needed anymore
as ipa_wdi_init_per_inst() initialization call will
handle this. This change will add support to retain
this call only for legacy devices.

Change-Id: Icb479562e091d388e03ef5a38b3e95d4dbf06271
CRs-Fixed: 3459071
2023-04-08 13:33:12 -07:00
Kenvish Butani
d0d9a987fc qcacmn: Optimize DP Rx Error Handling (Part-2)
In WBM2SW Rx Error path for BE
specific functionality
1) HAL API's/Function pointers are replaced
with specific function calls.
2) Efficient read/write of WBM Error Info
from HAL Rx desc.
3) Minimize reading data from Nbuf TLV.

Change-Id: Ic8793ffcbeb2411c9b81fb32acae062e8a1f40cc
CRs-Fixed: 3362828
2023-04-07 09:13:49 -07:00
syed touqeer pasha
df5ce68791 qcacmn: Umac reset support for direct switch
Umac reset support for direct switch.

Change-Id: Ic04880549ef4a38c795165e09a9f0d42673ae5f0
CRs-Fixed: 3438456
2023-04-07 06:29:42 -07:00
Chaithanya Garrepalli
9a52f07701 qcacmn: Fix use after free of AST entry
In WDS learn API add changes to avoid accessing the
AST entry which is deleted

Change-Id: I9f0152e72ec99fe0ae6029d5ddbc125f3b1e9d5a
CRs-Fixed: 3453018
2023-04-06 15:03:36 -07:00
Neha Bisht
af9bf76f1b qcacmn: Fix overrun issue of rx_user_info array
Fix overrun issue of rx_user_info array

Change-Id: I09b97f189e52a05aa42cdb0269385b5d9b497313
CRs-Fixed: 3451734
2023-04-06 10:38:46 -07:00
Sushant Butta
623d334801 qcacmn: Fix typo while getting ppdu_info
Use ppdu_free_list_elem while getting
free ppdu_info from kmem_cache.

Change-Id: I4ea921deb962dafd3f751954d6e7d2f1f98d3125
CRs-Fixed: 3455202
2023-04-06 10:38:34 -07:00
jinbao liu
ce762cce81 qcacmn: Fix a coding error of ill use of qdf_mem_set()
There is an ill use of qdf_mem_set() in dp_htt_t2h_msg_handler().
This change fixes this issue by assigning 0 to the local struct
variable instead of the memset, which can also reduce some code.

Change-Id: I303c1adc167a8e1ab82692a294fe28bc4e8a97dc
CRs-Fixed: 3443572
2023-04-05 22:23:53 -07:00
Jinwei Chen
401521fc7c qcacmn: Add DP API to evaluate if TX ILP needs to be enabled
Add DP API to evaluate if TX ILP needs to be enabled,
it is only enabled if following two conditions are met,
(1) INI for TX ILP is enabled
(2) htt msdu index to qtype mapping table index 3 value is
HTT_MSDU_QTYPE_LATENCY_TOLERANT

Change-Id: I4d0c1103941b8b12b8441762dc6b45d28ee1df21
CRs-Fixed: 3447096
2023-04-05 18:26:51 -07:00
Azmath Mohammed
800bc3ca85 qcacmn: Initialized the defined arrays to NULL
Arrays are not initialize and due to which
elements in array might be used uninitialized.
To avoid this case, arrays are initialized to NULL.

Change-Id: Ib83c8f512369f877b9c39d9e6eb431e9bdca7ad9
CRs-Fixed: 3449024
2023-04-05 14:05:46 -07:00
Devender Kumar
576ea0d8b2 qcacmn: Update the DB address pcie status to IPA
With pcie 1 and pcie slot 2, if ipa updates the 40th bit then
access to pcie memory region is going in pcie_0 memory region.
IPA is not allowed to update 40th bit for any address given
from pcie_1 and pcie_2 memory region.

Fix is do not send the pcie update status as true to IPA for DB address,
so that IPA will take long path of mapping the address in smmu context and
then it will access the pcie region.

Change-Id: Ieeaf1262cef927ca89cded3714c6e37550b8f197
CRs-Fixed: 3448895
2023-04-05 09:04:28 -07:00
Harsh Kumar Bijlani
82afb1d8d2 qcacmn: Mask ppdu_id received in Tx HTT PPDU completion path
FW sends ppdu_id for every TLV in Tx HTT PPDU completion path.
This ppdu_id has 8 MSB bits filled with FW metadata which is different
for every TLV. Host uses this ppdu_id for list maintenance.
Presence of the FW metadata results in ppdu_id mismatch for different
TLVs even when they belong to the same PPDU.
Consider only LSB 24 bits for ppdu_id on host side.

Change-Id: Ic6ec780fe97f0597fcd841b33ac0dce33ad986c9
CRs-Fixed: 3445603
2023-04-05 09:04:11 -07:00
Namita Nair
92d4955468 qcacmn: Default routing for SAP mode with IPAoffload
CUrrently if IPA offload is enabled in SAP mode
the default Rx routing is to IPA serviced REO rings.
With this change the default raouting is set to
WLAN HOST serviced REO rings.

Change-Id: Ibf9dead063c9d9fbc6b1fd502342ea13456b2473
CRs-Fixed: 3421879
2023-04-04 19:52:00 -07:00
Ripan Deuri
73e98e34e8 qcacmn: Add CDP op to get SAWF MSDU Queue info
Add CDP op to get MSDU Queue info

Change-Id: If76a6e4209d80e5da6093632e0f3d99b9aeaef77
CRs-Fixed: 3435987
2023-04-03 04:31:44 -07:00
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
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
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
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