Commit Graph

309 Commits

Author SHA1 Message Date
Jinwei Chen
95eec89597 qcacmn: fix incorrect length setting for jumbo RX monitor MPDU
Currently for jumbo RX monitor MPDU, it will spread across multiple
RX buffers(N). host set length 112 bytes for (N-1) skbs(not include
the last skb), while the expected length should be (2048 - 400
- 112) = 1536 bytes for them, this lead to last skb length
calculation incorrectly, which will be total MPDU length -
112 * (N - 1), this will be over boundary of skb buffer room
easily.

Set length 1536 bytes for (N-1) skbs to fix it.

Change-Id: I4e73673887d5d8197cf64bed5da34a3751df1e33
CRs-Fixed: 3381528
2023-01-20 22:12:12 -08:00
Nandha Kishore Easwaran
10a1d54f1d qcacmn: Check peer_count for peer filtering
Check peer count to decide if peer filtering is required or not.
This is required to support peer filtering for full monitor mode.

Change-Id: Icb3c0fc834795dbbbfd3a7899b3b733409f5f70d
CRs-Fixed: 3372600
2023-01-11 17:24:14 -08:00
Mukul Dhiman
9164f76a01 qcacmn: remove unused var in dp/wifi3.0/monitor/dp_mon.c
remove unused var and declaration in dp/wifi3.0/monitor/dp_mon.c

CRs-Fixed: 3284798
Change-Id: Ic8054df9e2af9ff787478cdc24ae1a2360bfa525
2023-01-08 23:19:14 -08:00
Mukul Dhiman
4bc38f404d qcacmn: remove unused var in dp/wifi3.0/monitor/2.0/dp_tx_mon_2.0.c
remove unused var and declaration in
dp/wifi3.0/monitor/2.0/dp_tx_mon_2.0.c

CRs-Fixed: 3284798
Change-Id: I83f39250f90a8dbf673e517244bb0b872e40026a
2023-01-08 23:19:04 -08:00
Mukul Dhiman
953c4d69fb qcacmn: remove unnused var in dp/wifi3.0/monitor/2.0/dp_rx_mon_2.0.c
remove unused var and declaration in
dp/wifi3.0/monitor/2.0/dp_rx_mon_2.0.c

CRs-Fixed: 3284798
Change-Id: Ibae1a2b3f9376103f348e1778c0f9f88fd05e9dc
2023-01-08 23:18:55 -08:00
Mukul Dhiman
4a4f3ce161 qcacmn: remove unused var in monitor/2.0/dp_mon_filter_2.0.c
remove unused var and declarations in
dp/wifi3.0/monitor/2.0/dp_mon_filter_2.0.c

CRs-Fixed: 3284798
Change-Id: I602d0e1ce5a74b981f34f7d5d4a5cb83693f62db
2023-01-08 23:18:46 -08:00
Mukul Dhiman
cdde02d8b6 qcacmn: remove unused var in dp/wifi3.0/monitor/2.0/dp_mon_2.0.c
remove unused var and declarations in
dp/wifi3.0/monitor/2.0/dp_mon_2.0.c

CRs-Fixed: 3284798
Change-Id: Ief15786a74d7f6eb90ed1b1527b79ddb50f14159
2023-01-08 23:18:36 -08:00
Mukul Dhiman
882a13a0ce qcacmn: remove unused var in dp_rx_mon_status_1.0.c
remove unused var and declarations in
dp/wifi3.0/monitor/1.0/dp_rx_mon_status_1.0.c

CRs-Fixed: 3284798
Change-Id: Iea3f8e2213fef9d10fe20c90c2ac0017f7d17692
2023-01-08 23:18:26 -08:00
Mukul Dhiman
8a2b9325e6 qcacmn: remove unused var in monitor/1.0/dp_rx_mon_dest_1.0.c
remove unused var and declarations in
dp/wifi3.0/monitor/1.0/dp_rx_mon_dest_1.0.c

CRs-Fixed: 3284798
Change-Id: Ibfeaca928fe43e6f0cc5b52a2114708810c09805
2023-01-08 23:18:16 -08:00
Mukul Dhiman
625715ade0 qcacmn: remove unused var in monitor/1.0/dp_mon_filter_1.0.c
remove unused var and declaration in
dp/wifi3.0/monitor/1.0/dp_mon_filter_1.0.c

CRs-Fixed: 3284798
Change-Id: I289aac6ae32c22539c98d02673b9af9a48d46192
2023-01-08 23:18:04 -08:00
Mukul Dhiman
daea04e025 qcacmn: remove unused var in dp/wifi3.0/monitor/1.0/dp_mon_1.0.c
remove unused var and declarations in dp/wifi3.0/monitor/1.0/dp_mon_1.0.c

CRs-Fixed: 3284798
Change-Id: I4c4fadba6a9af9ec6fb5c886fd014bc4ebcb26d9
2023-01-08 23:17:55 -08:00
Sushant Butta
6bab9eec62 qcacmn: Fix for memory leak
In error conditions(packet truncation or flush detected)
packet buffers are not freed, changes are done to
iterate over all the packet buffers and free them.

Change-Id: I48ef0022c7a9c8c6fd067d78d6b46daf84855cc8
CRs-Fixed: 3363841
2023-01-03 21:51:56 -08:00
Amrit
1833aa0e7f qcacmn: Add support for stats in IPA Architecture
Add support for stats in IPA Architecture.

Change-Id: I38706503719f6236fa1081342e9eb1f0bd0ba1c2
CRs-Fixed: 3345292
2022-12-29 18:34:12 -08:00
nobelj
f1dd81866f qcacmn: Add support for firmware to software tlv
Added support for parsing firmware to software tlv. which is mainly used
for populating frequency of the current packet.

Change-Id: I67c552e6d6b5caf9c12c34e553bad70b89b30c40
CRs-Fixed: 3270364
2022-12-27 17:07:35 -08:00
Pavankumar Nandeshwar
4c86eb5e8a qcacmn: Use flag RX_PEER_INVALID_ENH for invalid peer handling
Use the flag RX_PEER_INVALID_ENH for invalid peer
event instead of FEATURE_NAC_RSSI

Change-Id: I87e301a48b1ccdcd28f8e2eb0ba80b215efa384c
CRs-Fixed: 2969193
2022-12-27 07:12:18 -08:00
Yeshwanth Sriram Guntuka
34d893df39 qcacmn: IOMMU map and unmap RX buffers to LPASS SMMU CB
IOMMU map and unmap RX buffers into LPASS SMMU context
bank for LPASS to access RX buffers in direct link
usecases.

Change-Id: Ie72a008309e3abdf3fbc7198bb5d3af5e9497180
CRs-Fixed: 3356568
2022-12-22 00:45:12 -08:00
aloksing
336315bdd2 qcacmn: Fix invalid memory access
rx user status pointer is not valid

memzero ppdu_info before ppdu TLV processing and
Assign valid user status pointer from ppdu_info
user status before rtap update.

Change-Id: Ib9f8bf356a8d4710d295716cf88b8cf6a37158cb
CRs-Fixed: 3341380
2022-12-20 11:56:52 -08:00
Sushant Butta
0bffc7e7d1 qcacmn: Do length check to avoid memory corruption
Check size of the frag before passing
to trim function, which can lead to memory
corruption.

Change-Id: Icea102f9fef8c7333591337a93d32bc449704202
CRs-Fixed: 3354458
2022-12-14 21:12:31 -08:00
Amir Patel
2725ca7035 qcacmn: Adjust low watermark refill for RxMON Source ring
Adjust low watermark refill for RxMON Source ring based on
ring_fill_level.
ring_fill_level varies based on use case of monitor like
enhanced_stats, full monitor.

CRs-Fixed: 3353181
Change-Id: I4e17eecbbd7f74071283d2c5615904310a3d7c77
2022-12-07 05:50:28 -08:00
Amir Patel
05a6d5283d qcacmn: Enable low watermark interrupt for WKK RxMON
Enable low watermark interrupt for WKK RxMON

CRs-Fixed: 3347545
Change-Id: Ia78878aab1ded951a2ecd4a276696ac150910c43
2022-12-02 03:31:07 -08:00
Jeevan Kukkalli
ce1eb44128 qcacmn: Add appropriate comments
Add appropriate comments to describe actions
performed.

Change-Id: I16ba2ef3f8baae3e5a5e8add1668a49acc858495
CRs-Fixed: 3346270
2022-11-28 08:37:59 -08:00
Nandha Kishore Easwaran
7432a2e275 qcacmn: Add field to indicate sw peer filtering
Add a field to indicate if SW peer filtering is needed in
Tx monitor

Change-Id: Id0ed1655dfe51632f0437c4e3e3c2ccd067f75fe
CRs-Fixed: 3333191
2022-11-28 04:58:30 -08:00
Jeevan Kukkalli
b0b3b2a793 qcacmn: Validate nbuf while processing MPDU/MSDU level TLVs
nbuf could be freed when some error conditions are hit so
always validate nbuf while processing MPDU/MSDU level TLVs.

Change-Id: I5e0756bc8ba0a8c68c6ce8d2886b5b63068626a0
CRs-Fixed: 3318966
2022-11-26 17:40:21 -08:00
Amir Patel
88194f389a qcacmn: Update Calibrated noise floor from HALPHY
Update Calibrated noise floor from HALPHY into monitor packets

Change-Id: I73d879ad7d1b22a52b447f3197989e2beb52a404
CRs-Fixed: 3345567
2022-11-26 02:37:31 -08:00
Rakesh Pillai
95dad4fa46 qcacmn: Add support to drop monitor destination ring entries
Currently, in case of station+monitor mode on KIWI target,
we are not attempting to drop the entries received in the
monitor destination ring, when no channel has been
configured for the monitor interface. This leads to the
monitor destination ring full condition and an eventual
backpressure on the ring.

Fix this issue, by dropping the entries in the monitor
destination ring, which have been received before the
monitor channel has been configured.

Change-Id: Ic9c432b438d0a5dce2d2bb38053c31ce508c27f5
CRs-Fixed: 3332327
2022-11-25 14:33:09 -08:00
Sushant Butta
31eb482274 qcacmn: Fix for u8 overflow
When high throughput is running between AP and STA,
due to u8 variable overflow, host is not replenishing
required buffers.

More than 255 buffers can be requested for replenish,
so fixed size of the variable.

Change-Id: Ia810fed29058ec527cd8e6f77e6f9c333c5c6f88
CRs-Fixed: 3306616
2022-11-25 10:25:33 -08:00
Amir Patel
af0472aa08 qcacmn: Update PPDU drop counter
Update PPDU drop counter from monitor ring

CRs-Fixed: 3341905
Change-Id: I63f5b4d6a3e1e0155cf0558bea18704df073e2a9
2022-11-23 21:52:03 -08:00
Adwait Nayak
8775c73843 qcacmn: Enable hybrid mode for QCN9224
Enable hybrid mode specific handlers

Change-Id: I764c56c217b951424d699d6861ef8771496dd592
CRs-Fixed: 3339154
2022-11-23 04:42:49 -08:00
Nandha Kishore Easwaran
bb7ee725be qcacmn: Add txmon HP TP values in stats command
Add txmon buf and destination ring in HPTP dump command

Change-Id: Ic32d1b355d5fc309225dfc5649ee7f9568a8dca6
CRs-Fixed: 3331176
2022-11-21 00:03:26 -08:00
Nidhi Jain
92cfe5ce89 qcacmn: Changes to enable CFR in monitor filter 2.0
This change enables CFR through dp_mon_filter_2_0 path.

Change-Id: Ic83d071dbc7c3dec28f025388753f07b7dba2fa5
CRs-Fixed: 3337540
2022-11-20 22:03:19 -08:00
Kai Chen
9cb6199f70 qcacmn: Add EHT debug counter on PPDU
Add debug count to count PPDU based on UL/DL and type compression
mode

Change-Id: I2b320e6562d309cc0a178a137162ab0499c81e58
CRs-Fixed: 3326278
2022-11-17 08:09:23 -08:00
Santosh Anbu
c6fd7ded28 qcacmn: Enable monitor mac filter for special vap
Add change to enable mac based filter for monitor special vap.

Change-Id: Ib189071443d5a98a84d160e7043e9bc4faf189c5
CRs-Fixed: 3317599
2022-11-16 07:55:33 -08:00
Kai Chen
83521665e6 qcacmn: Add debug counter for monitor mode
Add debug count for count MPDU received based on preamble type,
reception type, UL/DL and user for max 4 user for MU monitor
mode

Change-Id: I87f1553e1f2f8276501366a825d629cf051d8a80
CRs-Fixed: 3326272
2022-11-14 16:20:25 -08:00
Nidhi Jain
2e2003d54f qcacmn: Changes to enable CFR on special vap
This change enables CFR captures on special vap.

Change-Id: Ifdaeccf7cc2211af5a2b82feae3a0b3ee45b617a
CRs-Fixed: 3308460
2022-11-07 00:44:52 -08:00
Rakesh Pillai
559514f2b7 qcacmn: Code cleanup for one MPDU drop in monitor mode
Cleanup up duplicate code for one MPDU drop in
monitor mode.

Change-Id: Ic2f06192ec0ac27c78b5161f1d2c20b757f3b6be
CRs-Fixed: 3323287
2022-11-02 11:32:29 -07:00
Santosh Anbu
938ddb0956 qcacmn: Add mon dp ops to set monitor filter
As part of mac address filtering feature for scan radio in special
vap mode, on addition of first NAC entry or deletion of last NAC entry
the corresponding monitor filter needs to be set or reset

Add change to support ops callback function required to set or reset
monitor filter settings are runtime.

Change-Id: I916c0b246bb180363f1a181ef49618af763b261d
CRs-Fixed: 3317409
2022-10-31 13:38:08 -07:00
Himanshu Batra
f72f76ba4c qcacmn: Update pdev telemetry stats to per AC level
Update pdev telemetry stats to per AC level

Change-Id: I0f3680875d28b6c4a7e671941373e42ee886cb16
CRs-Fixed: 3316937
2022-10-29 13:02:13 -07:00
Rakesh Pillai
6271fe1a98 qcacmn: Fix the use of the incorrect rx pkt tlv length
Currently the monitor mode processing assumes the
rx pkt tlv to be consisting of RX_PACKET_HEADER tlv.
This assumption is incorrect in case of sta+monitor
mode, where the RX_PACKET_HDR tlv has not been subscribed.

Due to the above incorrect assumption, a certain portion
of the actual payload is being discarded, when the
rx_pkt_hdr tlvs are stripped off from the received buffer.

To mitigate this issue, use the rx_pkt_tlv length based
on the tlvs which are enabled, and configured to the
rxdma for reception.

Change-Id: I8f29db85bbd50316e3c2073ae9a2e79fd724be05
CRs-Fixed: 3318038
2022-10-28 04:58:54 -07:00
Rakesh Pillai
f533809136 qcacmn: Drop mpdus received on non-monitor PMAC
Currently the monitor mode filter settings are set
for both the PMAC. Hence it is possible that the
non-monitor PMAC (the PMAC on which monitor vdev
is not running), can receive packets and forward them
to the monitor destination ring.

The above scenario will lead to a ppdu_id mismatch
when reaping the monitor status ring and comparing
the ppdu_id in status ring with the one in monitor
destination ring, since monitor status ring will
have ppdu_id from the PMAC on which monitor vdev is
running, whereas monitor destination ring will have
packets from both the PMAC.

In order to mitigate the above issue, detect the
packets in the monitor destination ring, which are
not from the PMAC where monitor vdev is running, and
drop them.

Change-Id: I32392ceeadffd9cb7a4dd76336004a9dcbb99404
CRs-Fixed: 3318036
2022-10-27 21:11:35 -07:00
Jeevan Kukkalli
3bc974804e qcacmn: Add ini cfg to disable invalid decap type handling
Add ini configuration to disable invalid decap type handling
during rx mon tlv processing. This is a temporary change for
debugging purpose and will be removed once HW issue is resolved.

Change-Id: I75eb53170833224ddd144baf1b1d8034f988dd3c
CRs-Fixed: 3308998
2022-10-20 10:55:19 -07:00
Subrat Mishra
92fc6fa7c1 qcacmn: Add control frame stats accounting support
Add control frame stats accounting support.
Accumulate both per peer BAR and NDPA counts in Tx and Rx per PPDU stats
path. Accumulate per peer RTS success and failure count only in per PPDU
Tx stats path.

Change-Id: I78fb3546cd831559e208a7330feb2eb67b9a28de
CRs-Fixed: 3313435
2022-10-20 10:55:12 -07:00
Kannan Saravanan
4aa7278f36 qcacmn: Initial changes for york bringup in Common dev to DP
Add device Id and target type checks for qcn9160 target
compilation.

Change-Id: Ic0391847af824ea7f6b85b574a0c5912ccd414c8
CRs-Fixed: 3282635
2022-10-18 11:57:31 -07:00
Jinwei Chen
2a6561273c qcacmn: support more dp srng with memory pre-allocation
add more ring type's size to wlan_dp_prealloc_cfg structure,
add DP_MON_PDEV_TYPE memory pre-allocation support.

Change-Id: I23aebaf7e7e78206ac49ebf02719f6b4dee99875
CRs-Fixed: 3314209
2022-10-18 05:22:27 -07:00
KARTHIK KUMAR T
ea38e7997e qcacmn: update RSSI specific parameters in mon pdev
Before we are updating RSSI params directly into mon_rx_status
this structure will reset every PPDU this breaks iwconfig,
wlanconfig and monitor packet RSSI values.
Fix added to storing the values in the mon_pdev.

Change-Id: I9f8fa776c65cbad84fac5e8c2f65b3fce1386e20
CRs-Fixed: 3276503
2022-10-17 16:22:51 -07:00
Sushant Butta
dfed04fde0 qcacmn: Fix memory leaks
In some of the erorr cases, allocated mpdu's are not
freed leading to a memory leak.

Changes are done to iterate over mpdu queue and
frees allocated mpdu.

Change-Id: I18d3a57b366b9fa7aa934ac062c7acd1a9065d1b
CRs-Fixed: 3295577
2022-10-15 19:31:56 -07:00
Nandha Kishore Easwaran
9f3dd70ae9 qcacmn: Add peer filter support for tx monitor
Add peer filter support for tx monitor. Add changes to filter frames
in SW

Change-Id: Ie4f2f261976d3b173a417942e36a6aaccea18e47
CRs-Fixed: 3300747
2022-10-11 08:28:56 -07:00
Jeevan Kukkalli
da9acd4815 qcacmn: Add flag to indicate all type subtype FP filter
If all the type and subtypes are enabled then there is
no need to dissect frames and validate type and subtype.
Add flag to indicate such configuration.

Change-Id: Ia7f919e5bdb175019a39f23be9e1d5a9a12fec31
CRs-Fixed: 3303105
2022-10-10 02:55:52 -07:00
Sai Rupesh Chevuru
6aef607629 qcacmn: htt support for compact tlv feature
Adding htt support for compact tlv feature

Change-Id: If45b5b32c4cef482cb6c54b5f2919b56384a8a93
CRs-Fixed: 3293927
2022-10-09 20:42:33 -07:00
Rakesh Pillai
27f5c5e7b8 qcacmn: Fix mpdu re-stitch failure for fragmented wifi frames
When the length of a 802.11 frame is more than the
size of the posted receive buffers, it is split across
multiple buffers, which have to be accumulated before
submitting to network stack.

For all-but-last buffer which are used for the above
mentioned large 802.11 frame, the MSDU_CONTINUATION
flag will be set indicating that remaining data of the
same msdu has been DMA'ed to the next buffer.

The current implementation in monitor-1.0 works for
legacy chipsets, where MSDU_START tlv is available and
hence the aforementioned information was available in
all the buffers containing the large 802.11 frame.

For kiwi target, there is no MSDU_START tlv, and hence
a lot of information eg: mpdu_len_err, decap_format and
l2_hdr_offset are not available in the buffers where the
msdu_continuation flag is set. This leads to an attempt
of mpdu_restitch using incorrect data from tlv, and hence
the mpdu_restitch fails for such large 802.11 frame.

Fix this issue for kiwi target, by gathering all these
information which are available in the last buffer and
are used to process/accumulate the entire 802.11 frame.

Change-Id: I1c4fc9fd574c1c5fabc845407aa6f2d990c60906
CRs-Fixed: 3261494
2022-10-09 06:51:07 -07:00
Jeff Johnson
ebfbc0d927 qcacmn: dp: Fix misspellings
Fix misspellings in dp/...

Change-Id: I6ef7a19ee03104ae38a8a77e229b90aa80329592
CRs-Fixed: 3304682
2022-10-07 22:42:22 -07:00