Commit Graph

993 Commits

Author SHA1 Message Date
Rakesh Pillai
0115477838 qcacmn: Monitor mode ring process changes for WCN7850
In WCN7850, there is only one common RXDMA dst ring for
both the mac.

Add changes to process the common RXDMA dst ring for
status TLVs corresponding to either MAC monitor status
ring. Also use arch ops to get rx_desc from sw_cookie.

Change-Id: Ia2c004755bc4389b587d995286093a519b995cab
CRs-Fixed: 3084442
2021-12-15 08:44:04 -08:00
Rakesh Pillai
63233c05dd qcacmn: Initialize only 1 RXDMA DST ring for WCN7850
WCN7850 has only one RXDMA DST ring, as opposed to other
lithium family chipsets, which had 2 RXDMA DST ring.

Refactor the code to pick the number of rxdma destination
rings from CFG context.

Change-Id: I20d475c02690043e969bc7a78605809b8c6814ae
CRs-Fixed: 3084440
2021-12-15 08:43:59 -08:00
Yeshwanth Sriram Guntuka
454c7361e1 qcacmn: Check for system PM state before SW2TCL HP update
In SAP mode, intrabss forwarding can happen when system
suspend is in progress. This could potentially result in
a scenario where SW2TCL HP update goes through after
WOW_ENABLE command is sent to FW.

Fix is to check for system PM states and do an explicit
system wakeup if tx packet gets enqueued to SW2TCL after
wow is enabled. Flush the SW2TCL HP on system resume.

Change-Id: I8dcd108b0dc1d703168f2f7a0ef0627e4dc0b103
CRs-Fixed: 3087727
2021-12-15 07:39:59 -08:00
Jinwei Chen
96a3c195c2 qcacmn: change parameter name 'is_assoc_link' in cdp_peer_setup_info
Currently is_assoc_link flag in cdp_peer_setup_info just means first
link peer during MLO connection, but usually assoc_link is the
link which initialize MLO association and it will be the primary_link.
this introduce confusion with another flag is_primary_link.

Change it to 'is_first_link' in cdp_peer_setup_info

Change-Id: I8d14da73e6a3bbc39a4a527d6c0aa5667255e995
CRs-Fixed: 3090270
2021-12-14 14:09:34 -08:00
Harsh Kumar Bijlani
974b9bee85 qcacmn: Correct the computation of pdev stats for ifconfig output
Memset Rx ingress stats of pdev to 0 when user makes a request
for ifconfig output for radio.
Also correct the computation of rx_errors stat for ifconfig radio
output.

Change-Id: I78110602b939db0117cf26ca0f8f70cd1ef7b1e8
CRs-Fixed: 3088982
2021-12-08 13:50:22 -08:00
Harsh Kumar Bijlani
21fb667866 qcacmn: Correct the offsets & byte cnt computation in HTT stats
Offsets used by host for HTT stats are not aligned as per the
structure declaration given in file htt.h .
Make change to use the correct offsets to get the correct stats.

Also make change for byte count computation.

Also make cleanup changes for FR65817.

Change-Id: I8bc6164cc4994c49536d7277779f25b258be1592
CRs-Fixed: 3082742
2021-12-06 21:13:41 -08:00
Chaithanya Garrepalli
97a1c8bff1 qcacmn: Changes to caluclate soc max peer id
Changes to caluclate max peer id in case
of MLO

Change-Id: Ib52cfb4f92eafb88689774e8e6c406751d30372a
2021-12-02 06:06:47 -08:00
Harsh Kumar Bijlani
356b9766fd qcacmn: Host<->FW HTT interface for HW vdev stats in BE
Define the interface for Host and FW communication required for
configuration of HW vdev stats in BE architecture and add handler
for vdev stats received from FW.

Change-Id: I5f6a703596bd1fbb5e27e6261befda25aa0c3e12
CRs-Fixed: 3067843
2021-11-30 00:58:11 -08:00
Harsh Kumar Bijlani
af17c944fb qcacmn: Rx stats changes for BE HW vdev stats
Following peer stats are updated in per packet Rx path:
    to_stack
    multicast
    broadcast

In BE architecture, HW provides the support for basic vdev stats and
hence per packet stats updation of above parameters can be done only
when enhanced stats is enabled or HW vdev offload stats is disabled.

Avoiding per packet stats updation reduces CPU load and improves KPI.

Change-Id: Id7c11c025a8464951b615a7f7b006ce61db487fc
CRs-Fixed: 3067843
2021-11-30 00:58:04 -08:00
Harsh Kumar Bijlani
66e66d88d7 qcacmn: Tx stats changes for BE HW vdev stats
Following peer stats are updated in per packet Tx completion path:
    comp_pkt: Pkt Info for which completions were received
    tx_failed: Total Tx failure

In BE architecture, HW provides the support for basic vdev stats and
hence per packet stats updation of above parameters can be done only
when enhanced stats is enabled or HW vdev offload stats is disabled.

Avoiding per packet stats updation reduces CPU load and improves KPI.

Change-Id: I7090d1a1ce0a882236e3310e3e9517149cbb146b
CRs-Fixed: 3067843
2021-11-30 00:57:59 -08:00
Harsh Kumar Bijlani
6c7fcf1d61 qcacmn: Add logic for allocation and reset of vdev_stats_id
In BE architecture, HW provides basic vdev stats support for upto
48 vdevs. For each vdev, there is vdev_stats_id which represents the
id of this vdev on HW. This vdev_stats_id is assigned by host and
is conveyed to HW at the time of REO TID Queue setup for the peer.

Add logic for allocation and deallocation of vdev_stats_id and
convey this id to HW.

Change-Id: If5611bf54d057ccf71c6444b5c79a26eb28df87e
CRs-Fixed: 3067843
2021-11-30 00:57:49 -08:00
Harsh Kumar Bijlani
f76548dd04 qcacmn: SOC config for HW vdev stats in BE architecture
Add configuration at SOC level for hw vdev stats in BE architecture.

Following config parameters are added:
    vdev_stats_hw_offload: option to enable/disable hw vdev stats
    hw_vdev_stats_timer: timer duration for hw vdev stats

Change-Id: I8cbd2b6a7378d8a9e7de920a3a6fdff0cf7785fe
CRs-Fixed: 3067843
2021-11-30 00:57:43 -08:00
Sai Rupesh Chevuru
45be95484a qcacmn: Updating the bank config in RAW mode
In the case of RAW mode, VAP parameters encap type, dscp_to_tid map id
and cipher are not updating in bank register.
Added a API to update vdev param.

Change-Id: I702bee563e7451f403fa32292bf20680cd66e213
CRs-Fixed: 3078687
2021-11-29 16:41:02 -08:00
Chaithanya Garrepalli
65ace7a19d qcacmn: fix use after free of hal_soc pointer
In case of WIN hal_soc will be freed in wifi down
path, this pointer is not valid at pdev_detach or
soc_detach.

Change to populate dmac source ring flag to dp_soc
as access is needed at pdev_detach or soc_detach

Change-Id: I628746bdd05ba3791d3d0e6b6dfdf160ed368e9a
2021-11-25 21:05:08 -08:00
Devender Kumar
aa2efbcf39 qcacmn: Split setup and cleanup APIs for IPA Rx Refill Ring
Split setup API for IPA Rx Refill Ring into allocation and
initialization APIs and call them at pdev attach and pdev init
respectively.
Similary split cleanup API into deinitialization and free APIs
and call them at pdev deinit and detach respectively.

Move procedures related to IPA Tx and WBM rings from pdev to soc.

Also add cdp support to set ipa cfg parameter in soc_cfg struct.

Change-Id: I04bb9270ae2dff51746a42b358fbe346f1087f84
CRs-Fixed: 3053542
2021-11-25 08:18:28 -08:00
Chaithanya Garrepalli
c42af1f62f qcacmn: Rx path changes for multichip MLO
Rx patch changes for multichip MLO

1. Create ini for rx ring mask for each chip
2. Configure hash based routing for each chip based
   on lmac_peer_id_msb
3. Peer setup changes to configure lmac_peer_id_msb
   to enable hash based routing
4. Rx Replenish changes to provide buffers back to owner
   SOC of reo ring

Change-Id: Ibbe6e81f9e62d88d9bb289a082dd14b4362252c4
2021-11-23 19:28:20 -08:00
Chaithanya Garrepalli
bbe062b4b7 qcacmn: DP peer changes for multi-chip MLO
DP peer changes required for multi-chip MLO.
This change includes

1) Adding MLO peer to global peer hash at ML context
2) Add ML peer to all partner chips id to objtable

Change-Id: I230a6c1b14484c587b190a9a318fe9ffb1caea11
2021-11-23 19:28:15 -08:00
Chaithanya Garrepalli
31281aab2b qcacmn: Changes for MLO pdev attach
Changes for MLO pdev attach to get MLO_link_id
information.

Change-Id: Id9e6932138e314dfeb93417fce690329ec7d6ab8
2021-11-23 03:55:41 -08:00
Chaithanya Garrepalli
70398a0ccd qcacmn: Changes needed for MLO soc attach
Changes needed for MLO soc attach to pass chip_id,
dp_ml_context from upper layer.

This change also takes care of assigning appropriate
RBM id for IDLE link descriptors based on chip_id.

Change-Id: I8f5f08c524d91942e6e458f048700b7bdd900107
2021-11-23 03:55:36 -08:00
Chaithanya Garrepalli
0fb9dcb7eb qcacmn: ML peer authorize changes
Changes to set authorize bit on ML peer only
after all link peers are authorized by hostapd.

Change-Id: I4b103538533dd459e83ae688408703c4122f025e
2021-11-23 03:55:18 -08:00
Chaithanya Garrepalli
bd4f90b8c8 qcacmn: Allocate PDEV with size as per arch type
While allocating PDEV get the pdev size based on
arch type

Change-Id: Ic6a4c60a49db4d9bb40bc9bf5fd3ca321460f213
2021-11-22 02:49:01 -08:00
Yu Tian
ac2110769b qcacmn: Add an ini control to disable Dynamic GRO feature
Dynamic GRO feature is enabled by default and aimed for specific
customers. Add an ini control to allow other customers to config
this feature enable/disable.

Change-Id: I7f505599327ac131b3cdac9b4d9e038861b1aeb6
CRs-Fixed: 3074689
2021-11-21 23:59:57 -08:00
Devender Kumar
30482aa5c4 qcacmn: Change buffer replenishment model for SDX+Pine
For IPQ products, there is 1 refill ring which is of hardware type
and host replenishes the buffers onto this ring so that hardware can
use these buffers for Rx.

In IPA offload mode, the buffer replenishment model is different from
the one mentioned above. There are 3 refill rings, out of which,
2 are software refill rings (1 for host and 1 for IPA), and last ring
is hardware ring given to FW.
Ring given to IPA is to refill the buffers after processing the
regular Rx packets and ring given to host is to refill the buffers
after processing of exception packets. Since there are 2 entities to
refill the buffers, the hardware ring given to FW multiplexes these 2
software rings and provides the buffers to hardware.

Make changes to follow above replenishment model for SDX+Pine
integration.

Change-Id: I0d9e4ec811a3023a258e0a6b9ee22ccdffcebafa
CRs-Fixed: 3049633
2021-11-19 03:22:08 -08:00
Rakesh Pillai
b2e3fdcdef qcacmn: Disable intra-bss forwarding for NDI interface
Disable intra-bss forwarding for NDI interface.

Change-Id: I0f3276547795defbd6c0f1f387b5e0018ef11048
CRs-Fixed: 3073451
2021-11-16 23:30:18 -08:00
Amit Mehta
8410d24e7b qcacmn: Remove csum_enabled flag and related changes
As part of code change we are removing csum_enabled flag check.
In that case, csum_enabled becomes redundant since we are not using it
in the code base, So remove redundant code as part of the cleanup.

Change-Id: Iac411b20f06436053b1969a1af9e3b3ee418c34c
CRs-Fixed: 3070858
2021-11-12 11:32:48 -08:00
Subrat Mishra
813d7d9a43 qcacmn: Define cdp interface APIs to fetch delay and jitter stats
Define a new cdp interface to fetch peer delay stats.
Define a new cdp interface to fetch peer jitter stats.

These interface APIs will be used by upper layers to fetch delay and
jitter stats per peer for telemetry stats feature.

Change-Id: I96ee6a861fa2626e7e1fba3df7df9ec64ff7e946
CRs-Fixed: 3071493
2021-11-12 06:20:07 -08:00
Mohit Khanna
81e29163db qcacmn: Add throughput based RTPM API support
Add support to invoke HIF runtime PM APIs in TX packet path based on
throughput level. Essentially at high throughputs, where runtime PM is
not expected to provide power gains, invoking the APIs is deterimental to
performance.
Hence invoke runtime_pm APIs based on throughput level.

CRs-Fixed: 3059712
Change-Id: I49d111bffa8a37c68abbdd54911f9ecc22430562
2021-11-08 05:19:41 -08:00
Yeshwanth Sriram Guntuka
d9eb751658 qcacmn: Add support to affine individual grp irqs
Add support to affine individual grp irqs to either
perf or non-perf cluster.

Change-Id: I90006645acb82b71c63d2255722e2c67bb7a2f46
CRs-Fixed: 3059676
2021-11-08 05:19:31 -08:00
Yeshwanth Sriram Guntuka
e4bd6bb939 qcacmn: Repurpose the IPA tx ring pairs for normal use
Repurpose the IPA tx and tx completions rings for
normal use when IPA is disabled either via config
flag or ini.

Change-Id: Ia4b6a89c73d888a217bdef40e3c05435c3bb1bb2
CRs-Fixed: 3059730
2021-11-05 12:32:35 -07:00
Himanshu Batra
ff8ee42eac qcacmn: Add API to get dp peer authorize state
Add API to get dp peer authorize state.
Also modify dp_tx_get_rbm_id_li to update rbm for IPA offload
scenario

Change-Id: I0f8cca4623a1c3b840f336aa6d67740951cb6700
2021-10-26 03:10:03 -07:00
Naga
85bfde2f0a Revert "qcacmn: Enable timer based low threshold interrupt"
This reverts commit Ia33b110337e610ab9b5d7a9cecb61f6952cd3379.

Change-Id: I07e2c8565b2aaa6cfd55b262d65ba0269a0a1d8a
2021-10-22 12:41:13 -07:00
Sai Rupesh Chevuru
ffb9ec5cae qcacmn: use appropriate MOD_ID while updating primary VDEV for a peer
In the case of MLO updating the mod id param,
where initial link is not the primary link.

Change-Id: I2fe21ffb2ebf3a081da7f07a4828d41f1bcea98e
2021-10-18 11:54:49 -07:00
Chaithanya Garrepalli
4c9b9c0ab0 qcacmn: fix compilation issue for WCN7850
Fix compilation issue for WCN7850

Change-Id: Iaf5bb6d320a2b639b20c7bc8edb0aa9c4c55a985
2021-10-15 17:54:22 -07:00
Rakesh Pillai
57e2c01e5e qcacmn: Peer id parsing changes for beryllium
Take care of the MLO peer bit indication to be
concatenated with peer_id to access the peer map
object.

Change-Id: Ia603a728101e83829a8906d1b847f42389e78ca6
CRs-Fixed: 3039326
2021-10-15 13:13:27 -07:00
Rakesh Pillai
32046ad850 qcacmn: Vdev attach changes for MLO
Add mld mac address info during datapath
vdev attach.

Change-Id: I0ea22025d19be82be0c56809871e8513c3ce7962
CRs-Fixed: 3039326
2021-10-15 13:13:17 -07:00
Jinwei Chen
5c85cfb5a0 qcacmn: cdp/dp peer change for MLO
cdp/dp peer change for MLO

Change-Id: I9b8eb741317a0dc7337aff7e773148892e531ba2
CRs-Fixed: 3031166
2021-10-15 13:13:12 -07:00
Chaithanya Garrepalli
3c3e5709ac qcacmn: Increse num TX rings for QCN9224
This change includes below
1) Changes needed to increase Tx rings to 4
2) Use WBM2SW4 ring for rx error in QCN9224
3) memset srng at alloc to avoid populating RBM_id
in per packet path and enable implicit RBM

Change-Id: Icbd5ac2378273b8f3c6adc41c611e29551fff22f
2021-10-13 13:12:19 -07:00
Naga
1648e13dbe qcacmn: Add HTT ring setup for monitor rings
Add HTT ring setup for monitor source and destination rings

CRs-Fixed: 3010856
Change-Id: Ice96ed938a25069fd60f07e2a4bebd9ad0184200
2021-10-12 02:29:29 -07:00
Naga
92ac36e016 qcacmn: Enable timer based low threshold interrupt
Enable timer based low threshold interrupt for waikiki monitor
tx/rx source rings

CRs-Fixed: 3010853
Change-Id: Ia33b110337e610ab9b5d7a9cecb61f6952cd3379
2021-10-12 02:29:23 -07:00
Naga
fa9b23b61f qcacmn: Enable monitor destination ring interrupt for waikiki
Enable monitor Tx/Rx ring interrupt for waikiki

CRs-Fixed: 3010851
Change-Id: I33537f7d4dbab700af7ccdb2ca511531fd3ade76
2021-10-12 02:29:17 -07:00
Chaithanya Garrepalli
b733f89803 qcacmn: change RxDMA rings to DMAC mode for QCN9224
For Waikiki use same SW2RxDMA ring for both radios

Change-Id: I33ab1749afada08e97d0b16fe68773c2d5532a15
2021-10-11 08:06:37 -07:00
Yu Tian
112813c1b7 qcacmn: Add API to get TX pending in WoW state
This change is used to provide an API for PMO module to
check whether there are pending TX frames before HOST sends
wake up indication to FW. PMO module uses this to indicate
FW whehter to discard HWDTIM.

Change-Id: Icc3271e87e376e3313fddc5f4f99e39daeaf6af7
CRs-Fixed: 3046947
2021-10-11 00:30:47 -07:00
Amit Mehta
76d60607f4 qcacmn: Ring History Display update
TP and HP values are assigned wrongly while
printing ring history. Fixing assignment.

Change-Id: I50ea90a3b49ab4d5459a3e0ddfa259f669764433
CRs-Fixed: 3051531
2021-10-08 08:17:32 -07:00
Surabhi Vishnoi
449ae318e0 qcacmn: Add cdp api to update the packet capture mode
Add a CDP api to update the packet capture mode in dp_soc
when it get updated by user using vendor command.

Change-Id: Id0856aeeb5e1a77e1ce6fb23562fdbff4a2fb320
CRs-Fixed: 3048344
2021-10-06 02:07:05 -07:00
sandhu
18fe5c3f02 qcacmn: Add dp functionality to support stats sysfs
Add dp functionality to collect stats for sysfs buffer.
Add both host and fw stats.

Change-Id: I64f84804d36cccec9d701925d96cc7ee96943b7a
CRs-Fixed: 3035864
2021-10-05 02:51:27 -07:00
Pavankumar Nandeshwar
851b1f68c0 qcacmn: enable MEC support for Beryllium
The multicast echo check feature is moved to hardware in
Beryllium. Enable this hardware feature and also disable
the MEC handing code for Beryllium in the host.

Change-Id: I86d319963191f3ed77aba16dcccbc659906edd9f
2021-10-01 15:18:25 -07:00
Pavankumar Nandeshwar
6b1d142d98 qcacmn: Enable wds changes in Beryllium
wds in Beryllium is managed by hardware.
Make use of hardware managedwds and disable
the corresponding wds handling done in host
for Beryllium.

Change-Id: I39f23cb40c6c5f85ada8ce59c92ff2855bb18da3
2021-09-30 15:15:25 -07:00
Chaithanya Garrepalli
9165949820 qcacmn: Enable Tx implict RBM mapping for Waikiki
Changes to enable Tx implicit RBM mapping support
for Waikiki

Change-Id: I4c30c34a250f6fb028c64741745fb5a3e6733ee3
2021-09-21 01:56:39 -07:00
Amit Mehta
cfa44c7843 qcacmn: init mon_intr_id_lmac_map in interrupt mode
Currently mon_intr_id_lmac_map is set only in poll mode
Which is only in Global Monitor mode.
In case of dynamic switch from STA to Monitor Mode
This can cause issue while removing monitor mode

Initialize mon_intr_id_lmac_map in interrupt mode also
and add sanity check for mon_intr_id_lmac_map value in
monitor ring flush.

Change-Id: Ic7dae948078661e376541b30aa70e4e12ca9d24f
CRs-Fixed: 3037952
2021-09-17 16:53:40 -07:00
Harsh Kumar Bijlani
6f20be8754 qcacmn: Add string for RXDMA Monitor Destination Ring
Ring name for RXDMA Monitor Desination Ring is missing which
results in printing Invalid Ring in backpressure prints output.

Add string name for same.

Change-Id: I02848d296bd08aa2ac9dda767e0db1475012a162
2021-09-17 08:45:32 -07:00