Commit Graph

111 Commits

Author SHA1 Message Date
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
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
Jeff Johnson
117ae69181 qcacmn: hal: Fix misspellings
Fix misspellings in hal/...

Change-Id: Icf033a647e6a15d46420d7102dc161b94fa7dd2c
CRs-Fixed: 3304685
2022-10-10 23:02:47 -07:00
Amir Patel
0fe7f4446b qcacmn: Optimize monitor mode memory utilization
a. Optimize ppdu_info memory
b. Use kmem cache for ppdu info allocation

CRs-Fixed: 3265620
Change-Id: Ieee040aa703aef8c5eee5e5a34a52ef18300b696
2022-09-06 10:23:43 -07:00
Amir Patel
bf92ed7b61 qcacmn: Add sanity check while adding a-msdu subframe header
1. Add sanity check before adding a-msdu subframe header
2. Add truncate MPDU handling

CRs-Fixed: 3191386
Change-Id: I11e6f971e470e486438ece9c4a7daef3df9f71ed
2022-05-26 01:32:33 -07:00
Harsh Kumar Bijlani
5eeabf4f49 qcacmn: Update reception type from PPDU Start User Info TLV
For MU_MIMO traffic from AP to STA, RSSI Legacy TLV gives
reception type as QDF_RECEPTION_TYPE_ULOFMDA which is incorrect.

In order to fix this, update reception type from PPDU Start User
Info TLV. Also remove updation of reception type from LSIG TLVs
to avoid override of reception type value.

Change-Id: I9ef4c5bc7a15d4e68404d702bec61eca9c9bad4c
CRs-Fixed: 3178085
2022-04-29 17:21:08 -07:00
Rakesh Pillai
a8a385329d qcacmn: Add MU msdu_q only for monitor 2.0
Monitor 2.0 uses a msdu_queue (75K memory), which
is currently enabled for monitor_1.0 as well.
Add this memory under Monitor_2.0 feature, so that
there is no memory increase for monitor_1.0.

Change-Id: If0f3701787585ec2b2efde018287101919a77570
CRs-Fixed: 3176254
2022-04-20 01:37:40 -07:00
Amir Patel
19970ea217 qcacmn: Add MPDU restitch logic For Waikiki RxMON
a. For decapped frames, convert frames from 802.3 t 802.11
b. for non-decapped frames no conversion is needed
c. Apply radiotap header and deliver MPDU to osif layer

CRs-Fixed: 3074441
Change-Id: Ia03b4bad35d69aa292958782cd424f3df56dabbc
2022-04-19 05:17:25 -07:00
Amir Patel
f17d789fa6 qcacmn: Add Waikiki monitor HAL processing
Add Waikiki monitor HAL processing

CRs-Fixed: 3073467
Change-Id: I2b1768b827f34785effed6c076a099628870e2a5
2022-03-03 03:38:05 -08:00
aloksing
482fba652b qcacmn: Increment pkt type for WKK
Define DOT11_BE as per Rx tlv
Increment pkt type for WKK

CRs-Fixed: 3121279
Change-Id: Id4bf93e5dcda08cc7fccfe3f8f06b00e5b29d4e3
2022-03-03 03:37:57 -08:00
Rakesh Pillai
d0eb950a7b qcacmn: Parse matched user info header from PHY tlv
Add support to parse the matched user info header
from the PHY TLV for EHT data traffic.

Change-Id: Ic5f47461b4617e087ff95863f4c6fc744266ee29
CRs-Fixed: 3128310
2022-02-15 17:28:18 -08:00
Rakesh Pillai
02df9e2ae8 qcacmn: Parse EHT-SIG header from PHY tlv
Add support to parse the EHT-SIG header from
the PHY TLV for EHT data traffic.

Change-Id: I05773c0086d1b67df8a08872832e36a96fb4b0b0
CRs-Fixed: 3093087
2022-02-15 17:28:08 -08:00
Rakesh Pillai
1e6e99702a qcacmn: Parse U-SIG header from PHY tlv
Add support to parse the U-SIG header from
the PHY TLV for EHT data traffic.

Change-Id: Icba9550795f87bb8ec7aa03af135ea05eb040ded
CRs-Fixed: 3093086
2022-02-15 17:28:02 -08:00
Rakesh Pillai
dad3ff5afa qcacmn: Add support to parse and aggregate split TLVs
For KIWI, when operating monitor mode in 802.11BE,
there can be certain header fields which can be received
as split across multiple TLVs.

Add support to aggregate such split TLVs and decode them
after agregation.

Change-Id: Ia00323a8f9fbe39306b1bbab4afefaa937befdae
CRs-Fixed: 3092820
2022-02-15 17:27:57 -08:00
Rakesh Pillai
63ea23ade1 qcacmn: Parse 64-bit TLVs in monitor status ring for WCN7850
In WCN7850, the tlv header width is 64-bit and the tlv header
start is 8-byte aligned inside the monitor status ring desc.

Add changes to parse the monitor status ring TLV according
to the TLV header width.

Change-Id: I19860b871abbc3037174b9d0ae5ed6e52b1eb736
CRs-Fixed: 3084443
2021-12-15 08:44:09 -08:00
Jeevan Kukkalli
8fd6fe32e8 qcacmn: Conditionally compile scan radio special vap stats
Conditionally compile scan radio special vap stats.
Also rename spcl_vap to scan_spcl_vap to better reflect
funtionality.

Change-Id: I7d7f636209f6aa12cca0a3e808d7ae1fac9f397d
CRs-Fixed: 3009837
2021-08-15 01:53:08 -07:00
Jeevan Kukkalli
1665e7c8e5 qcacmn: Scan radio special vap stats support
-Add flag to inidicate special vap configuration
-Add frame type counters while processing tlv
 WIFIRX_MPDU_START_E
-Add function to update special vap rx stats
-Add dp pdev param to enable/disable special vap
 stats reset
-Add function to reset special vap stats
-Add fucntion to get special vap stats
-Add CDP function to retreive special vap stats

Change-Id: Ia5de6743e472dc86c9e66b9e789c909a57025e35
CRs-Fixed: 3005425
2021-08-07 11:31:43 -07:00
Shwetha G K
403d510e5e qcacmn: Populate mcs & gI parameters to cfr_info
Populate mcs rate & gI type parameters to cfr_info

CRs-Fixed: 2966865

Change-Id: Id9cc720a12d2aa3840620bde97fa44ede66d86c6
2021-06-16 08:47:35 -07:00
Rakesh Pillai
052dc539e3 qcacmn: HAL API changes for beryllium
Add HAL API changes for WCN7850

Change-Id: I1b5cedfee609d539ed03f103bbbc4394efddb0dc
CRs-Fixed: 2891049
2021-06-05 15:10:50 -07:00
Himanshu Batra
ec2e7778ea qcacmn: Modify logs for QDF_MODULE_ID_CDP
Use macros like dp_cdp_debug, dp_cdp_err, dp_cdp_info to
print logs for QDF_MODULE_ID_CDP

Change-Id: I550eefa82c3417b8bf83378d4a9c6f382098fea6
CRs-Fixed: 2855937
2021-01-30 00:51:20 -08:00
Shwetha G K
13349de3b8 qcacmn: Populate additional params to CFR info
HAL changes to populate agc gain info, CFO and rx_start_ts
parameters to CFR info

Change-Id: I71ae6bf94095e82053d59114a6ae4bdb6b4586d2
2021-01-07 08:18:03 -08:00
Harsh Kumar Bijlani
c58c061890 qcacmn: Add error print for matching ppdu_id during HAL processing
When matching ppdu_id is detected during HAL processing, then print the
error message instead of going for assert.

Change-Id: I8f58359a66fbeaf2ebc98477f65bab446c0a784b
CRs-Fixed: 2747953
2020-08-07 02:53:28 -07:00
Harsh Kumar Bijlani
cc9f9c7c1f qcacmn: VHT/HE info in radiotap header of mgmt & control frames
In monitor mode, radiotap header contains VHT/HE information in management
and control frames after association of STA to AP.For this,reset of
ppdu_info is required before processing of ppdu in order to avoid reuse
of ppdu_info.

Change-Id: Ia36ec2664f79d645ff76db016f986dfb92ec8bbd
CRs-Fixed: 2734804
2020-08-02 04:57:31 -07:00
Amir
d2e553e973 qcacmn: Add debug statistics for monitor mode
qcacmn: Add debug statistics for monitor mode

Change-Id: I3fe59af1c7f561bd22f502eb5b19265ecd49ee69
CRs-Fixed: 2677656
2020-05-07 08:44:20 -07:00
Himanshu Batra
879fd03fe1 qcacmn: Add support for Extended Mcopy Mode
Currently, mcopy mode delivers first msdu(fcs_passed 128 bytes) per-ppdu
to upper layer, add support for Extended mcopy mode to deliver first
msdu(128 bytes) per-MPDU(fcs_passed).

Change-Id: Ib345fc14a8d468788b9de78516d27e8dff24caa4
CRs-Fixed: 2644175
2020-04-29 08:19:46 -07:00
Kai Chen
93d8e4ae42 qcacmn: enable monitor destination ring interrupt
Enable monitor destination ring interrupt to fix
packet is getting stuck in monitor mode.
Fix and add monitor mode debug count

Change-Id: I74efdcf6a4373dd73e373285c8cd3aa5757cd0b2
2020-04-19 10:03:37 -07:00
sumedh baikady
e7e15e5d88 qcacmn: Convert GI and LTF to radiotap defined values
The HE GI and HE LTF values are obtained from phy
TLVs in monitor path. The stats used in host have an
enum defined used by other upper layer code.

The radiotap spec defines different set of enums.

Add translation function to convert host stats enum
to radiotap defined enum for sniffer capture purpose.

Change-Id: I8c76adb42b0623e83958f7a37147b74e72b1ce74
CRs-Fixed: 2636051
2020-03-25 22:29:56 -07:00
Amir
252b67e048 qcacmn: Add HAL layer changes for full monitor mode
Add HAL layer changes for full monitor mode.

Define HAL API and Data structures to read sw_monitor_ring
descriptor.

CRs-Fixed: 2630982
Change-Id: I015fa106d9da74222bef092d50e96fc70a117a4a
2020-03-15 23:45:58 -07:00
Kai Chen
b1a940fa76 qcacmn: Fix issue on block ACK on response to BAR
Fix the issue on block ACK on response to BAR frame.
Parse BAR frame received from monitor destination ring and
generate block ack frame from BAR frame and previous block
ACK frame.

Change-Id: Ifc242b3850630aa25827b003a1e2078a9228358a
2020-03-11 01:47:02 -07:00
Shashikala Prabhu
03a9f5b19c qcacmn: Add framework to configure varying data/monitor buf size
Add a framework to configure varying buffer size for both data and monitor
buffers.
For example, with this framework, the user can configure 2K SKB for Data
buffers, monitor status rings, monitor descriptor rings, monitor
destination rings and 4K SKB for monitor buffers through compile time.

Change-Id: I212d04ff6907e71e9c80b69834aa07ecc6db4d2e
CRs-Fixed: 2604646
2020-01-29 18:08:33 -08:00
Kai Chen
085ce4026b qcacmn: fix the issue for block ack/ack for tx capture mode
fix the issue for block ack/ack for tx capture mode.
1. Hanndle BAR frame.
2. set rate for ACK frame.
3. Check block ack session and use block ack if block
ack session is established.
4. no ACK for broadcast probe request.
5. not ack if the ack policy is set to no ack in qos control.

Change-Id: I4f22c1c976334978fb971b42319fb3a6e43a00c2
2020-01-27 11:52:36 -08:00
Padma Raghunathan
5cd2e56349 qcacmn: CFR: Process PPDU status TLVs and extract CFR information
Channel Frequency Response(CFR) feature requires PPDU information
for correlation with CFR data. Host subscribes for the relevant PPDU
status TLVs via the Host RX monitor status ring. During monitor status
ring reap, all information needed for CFR correlation is accumulated
in a HAL PPDU structure and delivered to WDI event subscribers.

Change-Id: I3662b60375cb8886447a2fba3efead6a1ef3a98d
CRs-Fixed: 2593408
2020-01-09 10:34:35 +05:30
Aniruddha Paul
33fce952a9 qcacmn: Fix the next link descriptor read issue
Link descriptor were getting freed by the pointer
of the previous freed link descriptor. This patch
fixes by copying the address of the current in a
local descriptor info and using it to free the
current.

Change-Id: I95e137ba5b1f0ad21b0e6fb39f6671e1d5b65ba6
CRs-Fixed: 2577624
2019-12-30 05:53:14 -08:00
Ruben Columbus
fadeef890b qcacmn: populate qos_null in rx state
sw_frame_group_id decides process for frame. USER_STATS tlv case uses
sw_frame_group_id to add qos_null frame control to rx_status.

Change-Id: Ia3da8dbe4fc4c2d0f21fa8864e6b4e87170ba8f6
2019-12-11 00:19:50 -08:00
Venkata Sharath Chandra Manchala
84d5092701 qcacmn: Add hal_rx_hw_desc_get_ppduid_get API
Implement hal_rx_hw_desc_get_ppduid API based
on the chipset as the macro to retrieve
ppduid value is chipset dependent.

Change-Id: I7d3457d731ea486f04367f98f9f18d3f1c0fcfd7
CRs-Fixed: 2522133
2019-10-17 15:09:23 -07:00
Chaithanya Garrepalli
1f89b97be2 qcacmn: Read 256 fcs_ok bitmap from user ext TLV
Read extra bits of fcs okay bit map from
RX_PPDU_END_USER_STATS_EXT TLV and use the same
to send first fcs okay packet in case of M COPY

CRs-Fixed: 2499150
Change-Id: I1a25971ea789dd7fddddb312af8a18a4cccdc178
2019-08-10 05:10:36 -07:00
Sumeet Rao
c4fa4df717 qcacmn: Add a new feature to support tagging of IPv4/v6 flows
Tags are programmed using wlanconfig commands. Rx IPv4/v6
TCP/UDP packets matching a 5-tuple are tagged using HawkeyeV2 hardware.
Tags are populated in the skb->cb in the REO/exception/monitor data
path and sent to upper stack

CRs-Fixed: 2502311
Change-Id: I7c999e75fab43b6ecb6f9d9fd4b0351f0b9cfda8
2019-08-07 11:28:21 -07:00
nobelj
1453164d24 qcacmn: add per user RX stats in Rx PPDU struct
1)Add per user RX stats in Rx PPDU struct
2)Add per RU size counters in wifistats/iwpriv txrx_stats 10
3)Modified RX ppdu indication structure.

CRs-fixed: 2458732
Change-Id: Id8f3d6cce97503c0529642c4f5d66f3bbc59785d
2019-08-05 23:27:05 -07:00
Kai Chen
93f7e1be90 qcacmn: Add support for OFDMA UL per user info
Add support for OFDMA UL per user info such as
nss, mcs, ofdma RU start and ofdma RU size

Change-Id: Ibb4397f262d1a5df5b01d80a8a741a9b193168e7
2019-07-31 19:43:56 -07:00
Akshay Kosigi
8eda31cab3 qcacmn: Remove void ptr usage in HAL
Add code to replace usage of void pointers from
HAL layer and instead use appropriate opaque pointers

Change-Id: Id950bd9130a99014305738937aed736cf0144aca
CRs-Fixed: 2487250
2019-07-27 13:43:07 -07:00
Akshay Kosigi
a870c6181a qcacmn: Change to clean up of void pointers
Add code to cleanup usages of void pointer usages
in DP code.

Change-Id: I0736bcc0a547d858ed02f1ee59084a44e5fe4bec
CRs-Fixed: 2487249
2019-07-27 13:43:04 -07:00
Akshay Kosigi
91c56523d3 qcacmn: Remove void pointer usage for ring desc's
Make change to remove usage of void pointers for
ring descriptors and instead use a opaque pointer
dp_ring_desc_t.

Change-Id: Ia1e9a3da9eaa3cccf297b2135b52a72f2fe21431
CRs-Fixed: 2484409
2019-07-27 13:42:37 -07:00
Akshay Kosigi
6a206753d6 qcacmn: Add code to remove void pointer usage
Add code to remove void pointer usage for hal_soc
and introduce opaque pointer to be used intead of void
from dp layer into hal layer

Change-Id: Ia38571174c6ed79558d0f0c9cd1a0f4afaa66483
CRs-Fixed: 2480857
2019-07-27 13:42:34 -07:00
Amir Patel
5a8bbbe05d qcacmn: Add support for rx evm and rx antenna
Add Host support for rx evm and rx antenna

CRs-Fixed: 2493515
Change-Id: I6c6e3edd8d6650eabb69cea08ec275da7067f37d
2019-07-27 09:53:29 -07:00
Amir Patel
57e7e055f2 qcacmn: Filter rx fcs error frames for m_copy mode
Filter fcs_err frames and pass only first fcs ok msdu payload
from ppdu to upper layer

Change-Id: Ibf739193275f4f5a5c3e786abbbaa45165b5aa13
CRs-Fixed: 2439392
2019-07-05 14:32:20 -07:00
Kai Chen
e0dd94dd4c qcacmn: Add user id range check to prevent out of range access
A random crash may be caused by out of range access. Add MU
user id check to prevent out of range access.

Change-Id: I531d6c03024c4a6af4e0db97ea00d0874aaef387
2019-06-14 16:23:38 -07:00
Karunakar Dasineni
acc8b565b3 qcacmn: Protocol tag support in lite rx monitor
Add protocol tagging support in lite rx monitor mode.

Change-Id: I1966fc4f54e1f4a1486162a88853f68f7644a766
CRs-Fixed: 2448517
2019-05-30 19:29:52 -07:00
Kai Chen
52ef33fca3 qcacmn: Support enhanced Rx capture
Support Rx capture mode to deliver first 128 bytes of
each MSDU, along with some meta data.

Change-Id: I1ffa8b1a029d46f68aa78520bacc019de8af7a82
2019-04-19 04:08:56 -07:00
Keyur Parekh
44d8f8f9b1 qcacmn: Populate LTF size for Rx stats
Populate LTF size value from TLV for HE and modify
HE_LTF enum value to match with Firmware values

Change-Id: I8e5cce31cbae4aa8722050b06d89c933b74aa752
2019-04-02 11:17:38 -07:00
Srinivas Girigowda
2751b6d2b3 qcacmn: Consolidate multiple MAC_ADDR_LEN to QDF_MAC_ADDR_SIZE
Consolidate multiple (redundant) MAC_ADDR_LEN to QDF_MAC_ADDR_SIZE
CDP_MAC_ADDR_LEN
OL_TXRX_MAC_ADDR_LEN
DP_MAC_ADDR_LEN
HTT_MAC_ADDR_LEN
IEEE80211_ADDR_LEN
DEFRAG_IEEE80211_ADDR_LEN
ETHER_ADDR_LEN
HAL_MAC_ADDR_LEN
WLAN_MACADDR_LEN

CRs-Fixed: 2406591
Change-Id: I4a87f8ff556920c7b341bdbba99ec43c97b873f4
2019-03-28 16:50:32 -07:00