Commit graph

127 Commits

Autor SHA1 Nachricht Datum
Shivani Soni
15d8bb5c6b qcacmn: QDF API and SKB debug framework support for alloc_skb
Implementation of QDF API to allocate skb to avoid recycler pool
and extending skb debug framework support.
QDF API: qdf_nbuf_alloc_no_recycler

Change-Id: I32ccae7337000c899e8fba8127aa9fb3c8551783
CRs-Fixed: 2734717
2020-08-04 14:59:03 -07:00
Ankit Kumar
2b9e4ba1cb qcacmn: Add QDF wrapper for nbuf frag ops
Introduce qdf wrapper API for nbuf frag based ops.

Change-Id: I0f4c1cb1aa9fcdd9dc2fc2f5716860eb286a1932
CRs-Fixed: 2733972
2020-08-01 21:08:57 -07:00
Nisha Menon
0bbaedb23c qcacmn: Log memory stats in host driver
Add logs in driver to log current memory footprint
in init functions. Add wlan_mem_stats to sysfs node
in both perf and defconfig builds.
The stats are included under MCL feature
DCONFIG_WLAN_SYSFS_MEM_STATS.

Change-Id: I79c6d418a5762cddf52ab3bc0b0c93993fa7fd84
CRs-Fixed: 2635192
2020-06-11 02:04:46 -07:00
Nisha Menon
12cc7c6558 qcacmn: SKB buf memory Leak@ Func dp_pdev_nbuf_alloc_and_map
Fix the skb leak in dp_rx_process where rx descriptor cookie
validity fails. This skb should be cleaned up as part of the
rx desc and nbuf free function called during the driver unload.
However this will ensure that the skb released and added rx desc
added to the free list during dp_rx_process itself.

Add skb map, unmap functions, line numbers and if the nbuf is
mapped or unmapped to the nbuf tracking table. This debug info
will be logged once the skb is leaked.

Change-Id: I52dbf38922be20fc0aaea380e0e572af16de773e
CRs-Fixed: 2662992
2020-04-30 18:21:23 -07:00
Varsha Mishra
5cd2a434e1 qcacmn: Add QDF abstraction for dmac_inv_range
Add qdf wrapper for function dmac_inv_range. This
invalidates the specified virtual address range.

Change-Id: Ia3f92cb5136dbdbfea1e9cda8a52b474456a4e0a
CRs-Fixed: 2634679
2020-04-17 20:38:34 -07:00
Yeshwanth Sriram Guntuka
2a4239d3e9 qcacmn: Move definition of qdf_proto_subtype to different file
Move definition of qdf_proto_subtype to different file.

Change-Id: Ie897ccafbe1a4e1fe0a43399673ecce686bfb7bc
CRs-Fixed: 2653765
2020-04-01 00:21:25 -07:00
nobelj
7b76263659 qcacmn: QDF API for skb_clone_fraglist along with copy expand
Add API wrapper function for skb_clone_fraglist along
with skb_copy_expand.

Change-Id: Ib03e16566368d75a7a547fea6fd863e6411f98ef
2020-03-08 00:05:27 -08:00
Vulupala Shashank Reddy
616976e2ce qcacmn: Add support to include ACK status and tx retry count
Extend radiotap header to append ACK status and tx retry count
for packets sent to virtual mon interface.

Change-Id: I51037ffd11dfdee49278d43643fb7861a514ee18
CRs-Fixed: 2627710
2020-02-26 22:39:17 -08:00
Yeshwanth Sriram Guntuka
70ea6afc3f qcacmn: Add qdf APIs to support data pkt diag logging
Add support to send protocol data packet info via diag log
command to userspace at tx entry point, on receiving tx
completion indication and in rx path, before delivering the
packet to network stack.

Change-Id: I6a95a16b7ebedf505ecb501107b1bbb89b16b67d
CRs-Fixed: 2595799
2020-01-27 07:54:57 -08:00
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
Nirav Shah
8f44a7e494 qcacmn: Add credit tracking for HL Data Path
Add credit tracking for HL Data Path in DPTRACE.

Change-Id: I6e2971209940c16a13a8ca7f1f0a3d7c1a26e305
CRs-Fixed: 2574057
2019-12-13 07:04:10 -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
Karunakar Dasineni
91da9dce36 qcacmn: QDF API for skb_copy_expand
Add QDF wrappers for skb_copy_expand

Change-Id: I401241259c87a067ed4773bee9fdfc7ee3cdcc23
2019-11-27 09:15:15 -08:00
Rakesh Pillai
534a143d8f qcacmn: Add support to flush rx packets for a vdev
When a particular vdev is deleted, the corresponding rx
packets which have been queued to the rx thread are not
flushed. Hence when such packets are submitted to the
network stack, the dev for this skb will be invalid,
since we have already freed the adapter.

Flush out the packets in the rx thread queues, before
deleting the vdev.

CRs-Fixed: 2543392
Change-Id: I2490d0f5ce965f62152613a17a59232521ca058f
2019-11-01 00:18:13 -07:00
Venkata Sharath Chandra Manchala
8a4812f7fc qcacmn: Enable TSO Stats for Lithium based products
Add support to account for TSO jumbo packets on the
Tx path and print the statistics using dumpStats 3.

Change-Id: I6cc446df5c84e3ac436d922935fcd559e0704ec5
CRs-Fixed: 2356244
2019-10-28 07:11:53 -07:00
Chaithanya Garrepalli
45ecf4361c qcacmn: Fix false alarm of double nbuf allocation
In qdf_nbuf_unshare do not add new debug record when
allocation fails

Change-Id: Icece871a9e75af19841cf6824f286735660b09e3
2019-10-23 10:32:38 -07:00
Paul Zhang
1275896960 qcacmn: support msdu rx retry statistics
Add the interface to support the rx retry statistics.

Change-Id: I02bbf2e69eefbd7ef61ab2540c1aacabb4ce3aef
CRs-Fixed: 2505486
2019-08-28 12:43:06 -07:00
Mohit Khanna
c42d8036c9 qcacmn: Donot forward MDNS packets for NAN vdev
MDNS packets if forwarded for a NAN vdev can lead to potential flooding
of the air interface. Hence donot forward them.

Change-Id: Idfdedfb0b5b553745440587448230013f3b56a7d
CRs-Fixed: 2503360
2019-08-16 08:23:00 -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
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
Vivek
900c617e38 qcacmn: Remove CONFIG_WIN from QDF sources
The qdf nbuf cb has members defined as union
which would be used separately either for WIN or MCL.
There are separate header files defined for having
different accessor functions for WIN or MCL.

The inclusion of the header file is differentiated
based on CONFIG_WIN which should be removed.

Use a different macro instead of CONFIG_WIN.

Change-Id: I6709fde22a0458ec184b9a0cba832b848fd2a8fa
CRs-Fixed: 2472886
2019-06-27 03:24:17 -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
Tiger Yu
6f1fc0070f qcacmn: Add support for TCP delayed ack in driver
qcacld-2.0 to qcacmn propagation

This change adds support for driver supported TCP
delayed ack to increase TCP RX performance in
third-party platform which don't support kernel
TCP delayed ack feature.

TCP delayed ack is dependent on count and timer
values. Whatever is achieved first will trigger
sending TCP ack.

This feature can be controlled through ini values.
gDriverDelAckTimerValue - timer value in ms
gDriverDelAckPktCount - delayed ack count
gDriverDelAckEnable - enable/disable feature

Change-Id: I8105bbb90965295b5a4aefeb00d344a90155974d
CRs-fixed: 2414231
2019-05-28 03:46:49 -07:00
Ankit Kumar
e222775d39 qcacmn: Extract tid from REO descriptor and save to skb cb
earlier we were extracting the tid from the rx tlvs, this
was in the last cache line of the 384 byte tlv. we are
extracting various fields from REO descriptor, now we are
also getting tid from the descriptor to avoid accessing
the last cache line of rx TLV there by avoiding one
cache miss per packet.

Change-Id: I1f4f12dca402604692ea374599add6763d68ab01
CRs-fixed: 2449706
2019-05-21 14:43:21 -07:00
Karunakar Dasineni
142f9baf47 qcacmn: Add new feature to support protocol tags
With this feature, using appropriate commands, link layer, network layer,
transport layer and some of the application protocols can be tagged with
the user provided tag values for easier identification of protocols. The
supported protocols today are as follows.

ARP, DHCPv4, DHCPv6, DNS over TCP (v4), DNS over TCP (v6), DNS over UDP
(v4), DNS over UDP (v6), ICMPv4, ICMPv6, TCPv4, TCPv6, UDPv4,
UDPv6, IPv4, IPv6, EAP.

Receive packets are tagged by hardware. Tags are applied after the first
matching rule. Hence it is recommended that the rules are
programmed in such a way that tags are configured from application layer
to data link layer to get expected results.

Change-Id: Ibdc2bd2b78234f482074955e89fb93f05988eaca
2019-04-26 15:31:10 -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
Varsha Mishra
a331e6e55f qcacmn: Implement delay VOW stats for hawkeye
Delay counters per TID have been implemented for following types:
1. Linux stack to hw enqueue delay
2. HW enqueue delay to tx completion delay
3. TX interframe delay
4. RX interframe delay
5. RX frame delay from ring reap to networking stack

Change-Id: I836596cbd878a43955c18b4981cb5b7b43d4df5e
2019-03-12 06:10:05 -07:00
Dustin Brown
ae81599125 qcacmn: Add nbuf history for clone and copy
The network buffer (nbuf) history records the usual nbuf allocations
and frees, but does not record allocations due to copies or clones.
Record these allocations in the nbuf history as well to aid in
debugging.

Change-Id: If5bed9a41d301d43a1e610df4366d0bcf2c3efc4
CRs-Fixed: 2379866
2019-01-21 17:12:51 -08:00
Arif Hussain
61847a9ba6 qcacmn: Use function name instead of file name in debug logs
Replace all instance of file name to function name in debug logs.

Change-Id: Iff731675772859f02c975005b2656eaa41c6f360
CRs-Fixed: 2377894
2019-01-17 22:20:46 -08:00
chenguo
33f505ac30 qcacmn: New TLV sequence supporting for UL OFDMA in monitor mode
According to the ucode and mac team, the new TB-PPDU (UL OFDMA
Dat frame) from any other users using the TLV's fields below:

    * PHYRX_RSSI_LEGACY (has a reception type field that is
			 set to UL-MU)
    * PHYRX_RSSI_HT
    * PHYRX_COMMON_USER_INFO (has a reception type field that is
			 set to UL-MU)
    * PHYRX_USER_INFO (has more detailed modulation info)
    * PHYRX_USER_INFO (Could be more than one)
      ...
    * PHYRX_DATA
    * PHYRX_DATA (Could be more than one)

CRs-Fixed: 2329959
Change-Id: Ib5fa1734a5525d2b2d1db8756166f259be30b9c0
2019-01-03 22:29:40 -08:00
Keyur Parekh
f72cbe544a qcacmn: populate NSS value and Translate MCS value for HT
This change will resolve displaying NSS value
in stats in case of HT. And also it will give
proper NSS value to calculate rate value. Modify MCS
value to match with Tx stats from firmware.

Also retain original MCS value to use in radiotap code
for HT case.

Change-Id: I4dad068262a5e9188a5935db6b2cbf8d14138e7e
2018-12-27 17:48:03 -08:00
Chaithanya Garrepalli
4ff6e41de9 qcacmn: add peer_id and msdu_len in qdf_nbuf_cb
Add peer_id and msdu_len in qdf_nbuf_cb these
fields are used for lithium rx performance
optimization

Change-Id: Iba291812397a5e7648953c2dc1b2c18a5c5a18af
2018-12-23 21:58:51 -08:00
Rakshith Suresh Patkar
169fce61ef qcacmn: Add QDF API to update debug node for nbuf
In case of preallocation of nbufs, the debug nodes contain
allocation information with respect to the allocator
and not the user.
For more accurate debug info, add new QDF API
qdf_net_buf_debug_update_node to update the debug info
when the nbuf is requested.

Change-Id: Idfbcd15b6c561bbb57ba98a6b8376557ba909eec
CRs-Fixed: 2322989
2018-10-01 08:04:55 -07:00
Anish Nataraj
eb30aa7f83 qcacmn: Correct the Frame control info valid in hal API
Instead of frame control info valid parameter data sequence
control parameter was passed, corrected it

Change-Id: Iccaeb286c1003cbb58c5ebcacf4b0d99c979cbbc
2018-10-01 04:19:59 -07:00
Manikandan Mohan
33cfb578b0 qcacmn: Fix NULL pointer dereference in qdf_nbuf_free
Move network buffer null check to beginning of function to
cover possible case of null pointer dereference during free.

Change-Id: I8c998d4d1711ab28c94a946d04314c26a4c74278
CRs-fixed: 2309452
2018-09-17 17:53:52 -07:00
Rakshith Suresh Patkar
ecd7d60c6a qcacmn: Add QDF APIs for dev_scratch in network buffer
Kernel 4.14 and later supports dev_scratch for network
buffer which can be used to store data in a nbuf in the
format unsigned long.

Add APIs:
 1) qdf_nbuf_is_dev_scratch_supported
 2) qdf_nbuf_get_dev_scratch
 3) qdf_nbuf_set_dev_scratch

Change-Id: I2a72d369bb53f8f86d4bcee3cf6d13f5e4aff57f
CRs-Fixed: 2313270
2018-09-12 08:50:17 -07:00
sumedh baikady
59a2d33a2d qcacmn: Use monitor direct for smart monitor
Set monitor direct filter when smart monitor is
enabled. Deliver header from NAC if md bit is set
and smart mesh feature is used.

Change-Id: If1ef865e013c21bbb58bcb89a87856b12d6c7278
Crs-fixed: 2246660
2018-09-08 12:29:31 -07:00
Shiva Krishna Pittala
5f2280aa4f qcacmn: Separate out nbuf map/unmap code
Put the nbuf map/unmap code under NBUF_MAP_UNMAP_DEBUG.
nbuf map/unmap debug will be enabled on WIN once
the nbuf map/unmap related false positives are fixed.

Change-Id: I6b62539d39664db3ff62411fe8632633f53488c8
CRs-Fixed: 2284128
2018-09-06 10:20:17 -07:00
Arif Hussain
6e9fa6a725 qcacmn: Add logs in qdf_nbuf_alloc()
In qdf_nbuf_alloc() function, pass function name and
line number of caller and log the same in case of failure,
this approach helps to remove error logs in caller function
there by reducing text segment.

Also add qdf_rl and qdf_rl_nofl_* macros.

Change-Id: Ib8ce83335807cfbd2d83d1f165d6bec1dc1e4c94
CRs-Fixed: 2281983
2018-09-06 01:42:11 -07:00
Alok Kumar
d32e9abf63 qcacmn: Add API qdf_nbuf_reset to reset netbuf
This API makes the reuse of sk_buff possible, by resetting
it with the reserve and align arguments passed by the caller.

This brings back the skb to the original state as
returned by qdf_nbuf_alloc without allocating the skb again.

Change-Id: Idefcbd4be9fae5d140805d55207dec01bdc90237
CRs-Fixed: 2301899
2018-09-03 11:27:26 -07:00
Pranita Solanke
afcd0f1289 qcacmn: Add Video/all TID Counters framework for both tx/rx
Add struct in cdp required to display VoW stats
for hawkeye and akronite

Change-Id: Ibd3a3b5e5933841cc28c9ce1b36d69615234720a
2018-08-31 04:01:24 -07:00
Mohit Khanna
7ac554bda5 qcacmn: Support for DP RX Threads
Add support for DP RX Threads as a part of the FR. Multiple RX
threads can be enabled from the ini. The code is added in a new DP
module outside of the cmn project.

Change-Id: Id966c46c2799d23c2a4fa1c884610955afed3565
CRs-Fixed: 2256470
2018-08-24 18:35:45 -07:00
Adil Saeed Musthafa
61a21697f6 qcacmn: Add new radiotap header fields
Add the following fields in Radiotap header:
Antenna noise (in dBM)
Vendor Namespace containing the following information
->L_SIG_A
->Device_ID
->L_SIG_B
->PPDU_START_TIMESTAMP

CRs-Fixed: 2285143
Change-Id: I977be73778ab27383f12214c73b56c9b80d9f02d
2018-08-10 20:45:27 -07:00
Sathish Kumar
8b2d1c7c05 qcacmn: Add CB ftype for DMS packets
Directed Multicast Service (DMS) allows a client to request the AP
to convert multicast frames that match a certain traffic classifier
into unicast frames for the client. This request can be sent either
as a DMS Request Information Element in the Association/Reassociation
Request frame or explicitly via a DMS Request Action Frame after the
client has completed association. If the AP accepts the DMS Request,
all multicast frames matching the traffic classifier specified in the
DMS Request will be unicasted directly to the client as an AMSDU.
The original multicast frame will still be transmitted for the benefit
of those clients that do not support or request for DMS.

Add new CB ftype to differentiate data packets intended for DMS subscribed
clients

CRs-Fixed: 2056341
Change-Id: I687e4f4d182869753e2c3670ec07aa64f95fda1b
2018-08-01 12:31:58 -07:00
Krunal Soni
37bf7f4d22 qcacmn: Update radiotap header with LTF symbol value
As per the updated spec, 11AX PPDU's HE SIG_A data-5 field has added
LTF symbol field which is 3bits in size.

Add logic to parse the TLV coming from hardware and update the
LTF symbol value.

Change-Id: I05e2ff8ece7e14dc22ce747e9a9b906bf130462f
CRs-Fixed: 2235233
2018-07-17 00:58:29 -07:00
Mohit Khanna
163c3170a1 qcacmn: fix dptrace for data packets
Enable tracing for TX/RX data packets
Donot print stats with 0 value

Change-Id: I4bab6537494c4ee0fe290e3778fb5662bf5abd66
CRs-Fixed: 2269193
2018-07-13 02:58:46 -07:00
Rakshith Suresh Patkar
09089f1b73 qcacmn: Remove unused APIs qdf_nbuf_set_rx_info and qdf_nbuf_get_rx_info
Currently, the APIs qdf_nbuf_set_rx_info and qdf_nbuf_get_rx_info
are no longer used in our driver code.

Cleanup the unused code for qdf_nbuf_set_rx_info and
qdf_nbuf_get_rx_info.

Change-Id: I57acbd4e5901d8922e3b650f0f3b57f056a0ae3e
CRs-Fixed: 2259212
2018-06-25 23:53:07 -07:00