Commit grafiek

117 Commits

Auteur SHA1 Bericht Datum
Saket Jha
540da9a56c qcacmn: Add 6GHz Monitor Mode Support
Add monitor mode support to capture packets over 6GHz frequencies by
getting capture frequency from pdev.

Change freq type to qdf_freq_t.

Change-Id: I7b6edc43e254dc98a3c2939c369874bec9d16ddd
CRs-Fixed: 2568970
2020-01-15 11:30:21 -08:00
Padma Raghunathan
1fa6534bf7 qcacmn: CFR: Capture cfr info for PPDUs from non-associated clients
CFR has specific modes where status TLVs from non-associated
clients will be used for correlation with CFR data. In the
common API used by STATS and CFR, add an exception for CFR to
collect the necessary PPDU information. STATS on the other hand,
does not collect information from non-associated clients.

Change-Id: I2987010ae84ff02a25bfce5cc77bbc3e5383560b
CRs-Fixed: 2598547
2020-01-14 05:34:11 -08:00
Padma Raghunathan
f75841764c qcacmn: CFR: Copy hal ppdu info to cdp ppdu structure
CFR information extracted from PPDU status TLVs is already stored in
HAL ppdu structure. Extract the same and copy it to CDP ppdu structure.
This is delivered to subscribers through a WDI event, similar to PPDU
stats.

Change-Id: I4315626c7f79f85b75b8d1b9e1e5caf8d65abed9
CRs-Fixed: 2593416
2020-01-14 05:33:47 -08:00
Kai Chen
011b6c668b qcacmn: add block ack and ack frame for tx capture feature
Block ack and ack frame is composed and sent to up
layer after a unicast packet to AP is received for
tx capture feature.

Change-Id: I4b6bb35fa093432539d15d09a93f85a8ec700b34
2019-12-23 05:50:44 -08:00
Ruben Columbus
282f3a5ce1 qcacmn: RSSI averaging function accuracy
improvement on function for avergaging rssi accuracy

Change-Id: I4fb231aacb2ed76a2e5e1b5843a8b095e9901406
2019-12-13 12:15:02 -08:00
Kai Chen
a8cf59455e qcacmn: Add stats on OFDMA and MU-MIMO packet
Add MCS, NSS, MPDU FCS OK, MPDU FCS ERR stats
classified by SU, OFDMA and MU-MIMO.

Change-Id: I3ade03acc06bd924fdeb8dfcaf6b18fb01f01d68
2019-12-01 19:16:58 -08:00
nobelj
1063ea0420 qcacmn: Fix nss, ru size and initialize ofdma info valid bit for UL OFDMA
add 1 to nss value received from software response reference pointer.
ofdma_info_valid bit need to set zero.
populate ru_size from software response reference pointer.

Change-Id: Iea2019211902a468d8fd180423b3dedb4c04ce41
2019-11-26 02:16:36 -08:00
Amir Patel
a1a4fe1417 qcacmn: Update avg_rssi with per_pkt_rssi + per_bw_offset
Currently for averaging rssi we do not add per_bw_offset to SNR,
add per_bw_offset value to SNR to compute avg_rssi

Change-Id: I451f90e5794235c7466f3c4f1850df246e719d0a
2019-11-21 09:13:45 -08:00
Kai Chen
99efa0dce4 qcacmn: Enable peer filtering for enhanced RX capture
Enable peer filtering for enhanced RX capture.

Change-Id: Ic8d27b575721f6fe3bae06ed7d23b1ff300306c9
2019-09-23 20:35:31 -07:00
Shashikala Prabhu
fdf5499a36 qcacmn: Update the peer rssi for entire packet bandwidth
Peer rssi is updated with the rssi measured on primary 20 and
not on the entire bandwidth.
Scale the peer rssi value by packet bandwidth offset.
Packet bandwidth offset for packet bandwidth of 20/40/80/160 is
0/3/6/9 dB.

Change-Id: I13eb8c17ec9828c0025d6b3a92a8b26b971268a1
CRs-Fixed: 2518598
2019-09-12 08:43:16 -07:00
Tallapragada Kalyan
d92f598f75 qcacmn: Pass pdev to dp_peer_stats_notify API
Pass pdev to dp_peer_stats_notify API instead of de-referencing
this from peer structure.

Change-Id: I5dc679283f5822f44b4140aefb3aee44a826c720
CRs-Fixed: 2500647
2019-09-04 11:31:12 -07:00
Rakesh Pillai
836b6690cb qcacmn: reduce log level for mon status ring tlv-tag error
STATUS_DONE is missing sometimes in monitor status ring,
but logging for each entry in the ring increases the time
for which the hal_ring access lock is held. If there are
many entries in the monitor status ring, this can lead to
the hal ring access lock being held for too long and cause
inconsistencies.

Reduce the logging level of the tlv tag STATUS_DONE errors
and have a counter for the cases when this happens.

CRs-Fixed: 2502422
Change-Id: Ica77ce62bbe2c6b7691d638ac44ab0452dd2fd97
2019-08-27 20:59:22 -07:00
Amir Patel
44bd807fa7 qcacmn: Fix memleak in m_copy mode
1. Assign correct first msdu payload
2. Reset mpdu fcs ok bitmap upon reception of next ppdu
3. Free rx_ppdu_buf_q in error cases

Change-Id: I4f2e687d51d1e10693adc9cfcdee49190ba6815c
CRs-Fixed: 2502889
2019-08-16 02:58:08 -07:00
Ankit Kumar
cd66fff1ce qcacmn: Process smart antenna fields from tlv
Process smart antenna fields from tlv
HTT_PPDU_STATS_USR_COMPLTN_COMMON_TLV in tx
completion path and export it to tx_completion.

Change-Id: If14e711b0aee8e583fd329f3c3915904649ffe47
CRs-Fixed: 2491429
2019-08-15 01:28:21 -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
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
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
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
Shashikala Prabhu
0843438590 qcacmn: Use correct skb headroom size to update radiotap header
Size of rx_pkt_hdr tlv structure is used to check if there is enough
space in the SKB to add radiotap header.
The issue is seen due to a single SKB can hold the multiple TLVs and
the next subsequent SKB has the data. In this case, there is no headroom
available in the second SKB. Therefore crash seen while adding the
radiotap header in the second SKB.

To fix this issue, check if the SKB has enough headroom space. If not,
drop the frame.

Change-Id: Icd11f946c0aee974dde2ef21f59cfe3d8b87fa5d
CRs-Fixed: 2480719
2019-07-23 11:59:42 -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
Amir Patel
1d4ac98ffe qcacmn: Add rssi_chain support for lithium
Read rssi_chain per nss per bw and from rx status TLVs
and update to host data structures.

CRs-Fixed: 2445933
Change-Id: I275e9e502a0a724410fc189ac293cadc8f2981e0
2019-06-12 17:45:57 -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
Varun Reddy Yeturu
a7c21dc7f3 qcacmn: Allocate multi page memory for dp_rx_desc_pool_alloc
Allocate memory in multiple smaller chunks for dp_rx_desc_pool_alloc,
and link the pages instead of allocating one big contiguous memory to
avoid memory allocation failures.

Change-Id: Id81de10727555c4ca78963a6f01ed3b992ce9924
CRs-Fixed: 2443999
2019-05-23 20:35:07 -07:00
Jeffin Mammen
1514e796b6 qcacmn: Update Peer rx/tx rate based on DATA packets
Packets sent/received at fixed rate were also considered to
update the client rates as displayed in wlanconfig command output.
An idle client transmits NULL packets at basic rate and hence
rx rate shows up the basic rate when an idle client is connected.
Consider only data packets to update rates. Do not consider
NULL packets for rate update.
CRs-Fixed: 2435447

Change-Id: Icbf9f2a656bb0d36e16d953952c529185c119f17
2019-05-23 09:31:11 -07:00
Ankit Kumar
0ae4abc97b qcacmn: Replace QDF_DMA_BIDIRECTIONAL to QDF_DMA_FROM_DEVICE in rx
In Rx path, We really don't need to flush data and invalidate.
Hence replacing map/unmap flag to QDF_DMA_FROM_DEVICE.

Change-Id: I3de0c73e11a08a875114167a55fe9fe4432f1dd4
CRs-fixed: 2449712
2019-05-20 11:22:21 -07:00
Surya Prakash
07c81e7d77 qcacmn: Update rssi only when its valid
Peer stats struct members initial value 0, so when other functions call
to update peer stats have 0 rssi value which updates mininum
rssi since its the least value. So initialize the rssi with invalid
value initially

Change-Id: Ife033598c7ac47a9a26595f97bff058570d3e91f
CRs-Fixed: 2403735
2019-05-02 05:24:04 -07:00
Amir Patel
ac7d9465f9 qcacmn: Update correct tx rate, rx rate and sojourn stats
Currently we are upadting sojourn stats for all tid.
but rate stats maintains stats for only data tids 0-7.
updating stats for tid value exceeding 7 is leading it to
assert.
Update correct tx rate, rx rate and sojourn stats.

Change-Id: Ib2f5791aa7b8e85aac6283c46f58ce7e821a559b
CRs-Fixed: 2428648 2429575 2429575
2019-04-24 09:30:02 -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
Amir Patel
bb69cfaeda qcacmn: Compute average rssi
Compute average rssi from last packet rssi

CRs-Fixed: 2419240
Change-Id: I20851e3804412808393121ce882245ee8f110d5d
2019-04-05 03:33:32 -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
Jeff Johnson
a8edf330f0 qcacmn: dp: Replace explicit comparison to NULL
Per the Linux Kernel coding style, as enforced by the kernel
checkpatch script, pointers should not be explicitly compared to
NULL. Therefore within dp replace any such comparisons with logical
operations performed on the pointer itself.

Change-Id: I61f3adab1208682d36235421f44a048e35df346d
CRs-Fixed: 2418258
2019-03-27 06:10:00 -07:00
Kiran Venkatappa
4b50f33d5b qcacmn: Use size of CDP rx ind struct in ppdu stats handler
cdp_rx_indication_ppdu structure is used to indicate ppdu stats to upper
layer. Use the size of this struct instead of hal_rx_ppdu_info struct
while allocating SKB for notifying this event to upper layer.
hal_rx_ppdu_info struct is smaller sized structure and this can cause
invalid access.

Change-Id: I0db5a04f6e8ca8d8d38ddc83bcb7859292b45ba1
CRs-Fixed: 2419923
2019-03-24 19:27:02 -07:00
Amir Patel
468bded892 qcacmn: Add RDK statistics changes for Hawkeye
Add RDK statistics changes to collect below stats
a. Tx rate statistics
b. Tx sojourn statistics
c. Rx rate statistics

CRs-Fixed: 2416141
Change-Id: I0c8127cd387b7665a76847f4125977bbb8c5a57a
2019-03-21 23:04:43 -07:00
phadiman
449a268392 qcacmn: Reuse Rx Descriptor Pool Array
wifi up/down will cause soc stop and soc
start which will allocate rx desc pool
array memory for each wifi up

This creates memory fragmentation issue
hence reuse Rx descriptor pool array
across wifi up/down and free only nbufs

CRs-Fixed: 2394666
Change-Id: Ic897c733dfba3d8829e2f2f51099cd615b8a7ea2
2019-03-08 20:19:16 -08:00
Pamidipati, Vijay
ba4b57f368 qcacmn: Populate LTF in rx_ppdu_indication structure
Add support for indicating LTF as part of Rx PPDU indication

Change-Id: I9a39e5a32f3e6117b53ecae5a653df8318f0b21d
CRs-Fixed:2397734
2019-02-27 08:12:13 -08:00
Amir Patel
78824b1d4e qcacmn: Add changes for RDK statistics
Change API signature for dp_getrateindex to populate rate index
and add additional stats required for RDK.
Add QDF abstraction for EWMA average rssi

CRs-Fixed: 2397918
Change-Id: Id878971799c5df2ae60057a86b2769724ee0dcc5
2019-02-27 03:13:56 -08:00
Venkata Sharath Chandra Manchala
cad74add80 qcacmn: Add support for full pktlog
1. Enable CE5 and allow it to service
   pktlog messages from the firmware.
2. Register full pktlog callback handlers
   for handling sw_events and full tx pktlog.

Change-Id: Ifb70ac0993f2402201f88758845f730cf677b1a0
CRs-Fixed: 2388906
2019-02-21 23:25:30 -08:00
Tallapragada Kalyan
a702362d34 qcacmn: Check for MAX_AST entries when adding AST entry
check for max_ast entries supported by FW and add the
entry on host accordingly.

Change-Id: Ief70ba631bb41d50c79d3673e3eea0c45b0c1e19
CRs-Fixed: 2355947
2019-02-12 04:47:37 -08:00
phadiman
ebf4cded6f qcacmn: Check for freelist in Rx Desc Pool
For some corner cases if there are no free
descriptors available in the rx desc pool
then stop processing frames

Add check for the same and break the loop
from processing further frames.

CRs-Fixed: 2380041
Change-Id: Ia5d82813df644af61d898131c2987d8d2798e8c9
2019-01-30 02:32:22 -08:00
phadiman
497573091a qcacmn: Add Sanity Checks
Stats are updated periodically and
are categorized to soc, pdev, and
vdev

While the stats are getting updated
and if pdev, or vdev gets detached
in the same time, the stats handlers
will deference a NULL pointer

Hence Add basic sanity checks to DP
layer for soc, pdev and vdev inside
stat handlers

Change-Id: Ic4919b9c205679e1d6e7c571c577339be65c1bad
2018-12-26 03:39:21 -08:00
Chaithanya Garrepalli
3e4ac1cace qcacmn: Fix for the memory leak in smart monitor feature
Change with fix memory leak observed in case where
smart monitor is enabled and monitor direct bit is not set

Change-Id: Ib556482b9067dbd7418cbe226a19bbbd5844a075
2018-12-17 05:35:48 -08:00
Sravan Kumar Kairam
099671a852 qcacmn: Fix NULL pointer dereference
In dp_rx_mon_status_buffers_replenish after replenish of all
mon status ring rx buffers there is log in which function
local desc list is accessed. But after successful replenish of
all the available free desc, free desc list will be NULL. So
accessing the free desc list in the debug log leads to NULL
pointer dereference. In this change remove the debug log as
before that enough logging is in place to check how many buffers
are replenished.

Change-Id: I306aa52f6f25d9b43afb8548b8c03467aa9f27de
CRs-Fixed: 2366585
2018-12-17 00:37:37 -08:00
Mohit Khanna
705149946b qcacmn: Fix large RX desc pool memory allocation
During dp_rx_pdev_attach and dp_rx_pdev_mon_buf_attach we are allocating
three times as many rx descriptors as there are entries in the ring for
AP usecase. This is not needed for MCL and may need to kmalloc
failures for allocating that much contiguous memory

Allocate only as many RX descriptors as there are ring entries for MCL
usecase.

Change-Id: I8b559a85c3899bcbdc520e71ba5da409314db160
CRs-Fixed: 2342957
2018-12-15 10:07:15 -08:00
Chaithanya Garrepalli
7ab76aec94 qcacmn: Enable monitor dest ring in m_copy mode
In existing code, 132 bytes of OTA mgmt. and control payload is
provided to upper layers by subscribing to packet header TLV.

The requirement in M-copy mode though is to get complete payload for
mgmt. and ctrl. packets. Add change to configure monitor destination
ring and add mgmt. and ctrl. packet filter to receive full mgmt. and
ctrl. packets.

Change-Id: I0014837b51cac6f0143dcc5cb624ea2086cf4486
CRs-Fixed: 2256159
2018-12-14 16:06:06 -08:00
sumedh baikady
da15920d5b qcacmn: Support for smart monitor on HKv2
Add support for smart monitor feature on HKv2.
For HKv2, NAC filtering is done by HW and NAC is
programmed directly in the AST table. The NAC entries
in AST table have monitor direct bit set and this
is obtained by host via monitor status ring.
host subscribes for packet header in MD packets.

To these filtered packets radiotap header is added
and delivered to the stack.

Change-Id: I123f986531943e376ac5c492540e01f0b03348c4
2018-12-13 16:46:07 -08:00
Keyur Parekh
c28f839a84 qcacmn: FR-50469 Pktlog for particular peer mac address support
This FR is to enhance existing pktlog debug tool
This feature will allow to capture pktlog for particular
peer mac address.

Change-Id: I3676095536185f25b0d498e03f70246260a324fd
2018-12-06 00:03:13 -08:00
chenguo
b21a49a57e qcacmn: Peer ref count leaks in ppdu stats and descriptor deliver
Because of reference counter decrement is not triggered for every
condition path, it is possible that peer reference counter leaking
happens under some perticular circumstance. Make sure the peer ref
count unreference is called for each possible path.

CRs-Fixed: 2352433
Change-Id: I60bc5a5210519c26c57cdc563d0d1b02d799e090
2018-12-05 13:13:46 -08:00
Venkata Sharath Chandra Manchala
443b9b4da2 qcacmn: Print HP/TP Stats
Extend txrx_stats to print current HP/TP
Status for UMAC rings.

Change-Id: I50332f7507fdf1841dee51f0b1e97ef4ea68f04f
CRs-Fixed: 2332191
2018-11-13 06:56:15 -08:00