Commit Graph

216 Commits

Author SHA1 Message Date
jinweic chen
c3546321b6 qcacmn: add nbuf map result check when replenish
add the nbuf map result checking when replenish rx
nbuf to monitor status ring, this could avoid the
case nbuf map failed and invalid dma address
posted to HW or do unmap for unmapped nbuf.

Change-Id: I45cfc015f71a2d7295f7fcb4803bd6e68e2752d4
CRs-Fixed: 2182546
2018-03-13 06:00:59 -07:00
Poddar, Siddarth
a9172bf24d qcacmn: Add APIs to get data packets info
Add APIs to get TCP syn/syn-ack/ack packets,
TCP src/dst port, DNS domain name/query/response,
ICMPv4 req/res, and ICMPv4 src/tgt ip information.

Change-Id: I1e4e92997a33e64fe2e4ae28a05b54b6ba5e8cff
CRs-Fixed: 2168412
2018-03-07 03:55:46 -08:00
sumedh baikady
b882f93dbc qcacmn: Fix channel info in radiotap
Fix frequency and channel flags fields in radiotap API

Change-Id: Ic991ea796d0b19f8adc16a5bc33cfde0042c167e
CRs-fixed: 2189914
2018-03-03 23:44:46 -08:00
nobelj
9ab76e283f qcacmn: Add support for ppdu length in ppdu_stats
Rx PPDU length is calculated from number of MSDU length in each MPDU
Rx PPDU stats are populated after updating PPDU length.

Change-Id: I2af6a82eaddc4e791d4e7445c933a5886304e8f3
2018-02-27 21:17:19 -08:00
Sravan Kumar Kairam
68a824774c qcacmn: Add qdf utility functions for ARP debug stats
Implement QDF utility functions to operate on ARP data packet to
support ARP debug stats feature.

Change-Id: Idce70799bd3698dc8a8ecd8cfc8ef7d9bf1f5764
CRs-Fixed: 2019789
2018-02-26 04:07:21 -08:00
Tallapragada Kalyan
32e74e669d qcacmn: Linearize nbuf in intra-bss forwaring case
with fragmented pkts re-injected back to REO destination
ring as frag_list, we need to linearize these nbufs while
handling intra-bss forwarding cases.

Change-Id: Id692974ac5d80f369fafae39aec32e2066dffb0b
2018-02-09 01:51:24 -08:00
Keyur Parekh
4d36b32991 qcacmn: Add Indication for MSDU or MPDU level aggregation
populate flags for MPDU or MSDU level aggregation in
mon_rx_status structure.

Change-Id: I5d8d026a42ffef9e95f579178b4f8cdc581699ec
2018-02-08 19:46:08 -08:00
Varsha Mishra
d385dbe43d qcacmn: Add QDF API to find packet type
Add qdf API to know whether packet is broadcast or not

CRs-Fixed: 2125569
Change-Id: If91685ae7b72c6ce52426648e9e01cba92fee86e
2018-02-08 14:13:14 -08:00
Chaithanya Garrepalli
221c795fea qcacmn: Add nbuf count support
Add a global nbuf count variable and add support to update
this count.

Change-Id: I08a50b54cae25ab9f356cd05d7635f1ba3b6bf55
CRs-Fixed: 2008240
2018-02-07 05:43:53 -08:00
Akshay Kosigi
9e7f12f7da qcacmn: Fix Scatter-Gather and TSO
Fix SG and TSO for ftp data transfer

Change-Id: Ide7eec987436beea08711f31362c1fa61f5bf8c3
CRs-fixed: 2159610
2018-01-30 15:26:48 -08:00
Anish Nataraj
28490c4c5e qcacmn: Add checks in rx_mon_status handler to filter spurious frames
1. find_first_bit API returns Size value if it doesn’t find any bit set.
   This was causing VOICE AC counter to go high even for TID 0
2. Reset stats was not resetting the stats immediately
3. Added checks to avoid spurious stats increment
4. Detect data/mgmt pkt to avoid spurious stats increment

Change-Id: Ic9c5695fc7bdf58d1237e7e20bb79378a02a21f6
2018-01-25 05:08:23 -08:00
Dustin Brown
976a7f6f6e qcacmn: Add nbuf map/unmap history tracking
An nbuf free history circular buffer already exists for tracking recent
nbuf frees in the system. This is very useful for debugging tricky nbuf
related failures in the driver. In addition to tracking frees, track
alloc, map, and unmap nbuf events as well.

Change-Id: I253d454d689deb8328b3636e92063e9d33ea1a52
CRs-Fixed: 2170365
2018-01-18 05:45:52 -08:00
Dustin Brown
4082a0951f qcacmn: Add nbuf map/unmap tracking
When MEMORY_DEBUG is enabled, track calls to nbuf map/unmap to detect
the following usage problems:

	* double map
	* double unmap
	* unmap without map
	* never unmap

Change-Id: I7326bb628d4cf0be9004398fd396907b1a06bf22
CRs-Fixed: 2155599
2018-01-18 01:49:45 -08:00
Keyur Parekh
71ab9ef0b7 qcacmn: Populate mon_rx_status structure fields
Update mon_rx_status fields for HE case. Also
added rs_fcs_err field to structure and populate
its value.

Change-Id: I4681543c7d6c6c7ac0d666cd93072caaee285585
2018-01-17 23:38:07 -08:00
sumedh baikady
f7bbb3512f qcacmn: Add HE SU Radiotap Support
Keeping up with changes in radiotap header definitions
and spec. This change reads preamble info for HE SU from
phy tlv and populates the radiotap structure

Change-Id: I0663d1923f2a8277c62ab6c8378aaca026ce18db
Crs-fixed: 2144302
2017-12-19 21:25:03 -08:00
Ravi Joshi
54ee5e48db qcacmn: Enable support for HE radiotap headers
radiotap has updated HE (11ax) radiotap header extensions.
The change enables the support for those headers in the
driver.

CRs-Fixed: 2133532
Change-Id: I42c4f13e157ea981d6a276582553893921a70758
2017-12-14 11:25:18 -08:00
Ruchi, Agrawal
34721398d5 qcacmn: Host CCE Classification Changes
Host CCE Classification changes for RAW Mode workaround
H/w CCE hangs while classfiying raw packets
so the classification is moved to host

Change-Id: I75cfc6b140a7983fcdfb797c93b9fd57f01c5ee3
2017-12-06 06:57:02 -08:00
Vivek
de90e59667 qcacmn: Reorganize the tx & rx member of skb->cb structure
The current tx & rx member of skb->cb structure has lot of common members
duplicated across win & mcl sub structures.
The common members are now moved out
and new members are added as per the requirement.
Also the members are organized to avoid additional padding
and fit within the 48 byte boundary for both 32bit & 64 bit platforms.

Change-Id: I27abc95d51127513cf2e7e9657a4ee84324b2cc9
CRs-Fixed: 2120295
2017-12-02 01:40:58 -08:00
Pamidipati, Vijay
57a435a7e0 qcacmn: Move peer stats to PPDU indications
Move peer stats updation to PPDU indications from per-MSDU indications
to optimize CPU cycles. Add dp_rx_stats_update for receiver side PPDU stats

Change-Id: I4bdda8ac447e64cd1017e5be3949ec3f915a9d71
CRs-Fixed: 2123969
2017-11-15 12:39:08 +05:30
Yun Park
2fedb13531 qcacmn: Add IPA ownership clear for Intra-BSS Tx packets
Set IPA ownership for intra-BSS Tx packets to avoid skb_orphan(), and
clear the ownership after check it to avoid ipa_free_skb() is called
when Tx completed.

Change-Id: I03883773e418bb5518ea63a324d22503173ea436
CRs-Fixed: 2064191
2017-10-12 14:21:44 -07:00
Sravan Kumar Kairam
49bc225a92 qcacmn: Implement nbuf alloc fail replenish timer
Implement nbuf alloc fail replenish timer which starts when
there is an nbuf allocation failure and stops when there is
an nbuf allocation success with in the timer expiry duration.

Change-Id: Ie956ea144dec4323664632d00bb8f0f82ba22439
CRs-Fixed: 2036900
2017-10-05 12:18:20 -07:00
Poddar, Siddarth
bf4231b6d8 qcacmn: Add support to log ICMPv6 packets in DP Trace
Add support to log ICMPv6 packets such as NS/NA, RS/RA and
ICMPv6 Req/Res in dp trace.

Change-Id: I11aab230b03254ea46c019cdb4488d1439a9504d
CRs-Fixed: 2075963
2017-10-03 16:02:25 -07:00
Sravan Kumar Kairam
66d15b2908 qcacmn: Record nbuf free information for debug
During network buffer free record the information such as file name,
line number, net buff address and time stamp. This helps to debug
issues related to buffer access after free.

Change-Id: I579a4764d8ea08210a3eedd349780cab2c081e3a
CRs-Fixed: 2071563
2017-09-29 05:40:03 -07:00
Anish Nataraj
38a2956c7a qcacmn: Add PPDU Statistics Support for Rx datapath
Add support for processing rssi, mcs etc fields from
PPDU status ring and delivering to CDP interface

Change-Id: I312bef20605594645bae6ec748f0b59e4d427075
CRs-Fixed: 2098696
2017-09-13 01:48:19 -07:00
Dustin Brown
24c31020a2 qcacmn: Use refcount APIs for sk_buff.users with 4.13+ kernels
The 4.13 Linux kernel changed the sk_buff.users type to refcount_t from
atomic_t. Add conditional compilation based on kernel version to use
appropriate refcount APIs for kernels 4.13+.

Change-Id: I6918b4f45ffa247c74e54d8653a80821ceab1a86
CRs-Fixed: 2092031
2017-08-29 20:56:28 -07:00
Chaithanya Garrepalli
cdc307f70b qcacmn: Replace SKB CB vdev_ctx member with vdev_id
Removed submit_ts and replaced vdev_ctx with vdev_id
in qdf_nbuf_cb

Change-Id: Ib478aa69ee8069d1c5ff5de29ee0431c238f4b7d
CRs-Fixed: 2065367
2017-08-01 10:02:46 -07:00
Srinivas Girigowda
43977f7e6d qcacmn: Fix kernel checkpatch warnings in QDF
Fix kernel checkpatch warnings in QDF.

Change-Id: Id2f54c6c436bde55b040012fbbe9922cb177461e
CRs-Fixed: 2028128
2017-07-12 20:12:49 -07:00
Ravi Joshi
1eaf7b5b82 qcacmn: Update radiotap header to include HE parameters
Add/extend radiotap header to include high-efficiency (11ax)
parameters.

CRs-Fixed: 2071602
Change-Id: I8bfbed16edca42eb38256bccc2efff8f21e50f15
2017-07-06 21:55:15 -07:00
Tallapragada Kalyan
0cd1793ba5 qcacmn: fix skb cb corruption issue
the ftype in skb->cb is overshooting allocated 48 bytes
causing kernel crash

Change-Id: Ie33508c462a032b28624de5270ce91a93d0b067d
2017-06-27 10:32:46 -07:00
Zhu Jianmin
af3420af93 qcacmn: Add icmp dptrace for latency issue debug
Ping latency is a key performance KPI for some customers,
need log in debug mode

Change-Id: I96eebf3f249668dd220aa1062fb339f940d36975
CRs-Fixed: 2039646
2017-06-22 04:38:28 -07:00
Sravan Kumar Kairam
a46056182a qcacmn: Add support to log IP addr of the wow wakeup packet
Add support to log the IP header source and destination address
for the first Rx packet received after host wakeup.

Change-Id: Ie8cf71c8ce913378687ad2c79ab9d5f46c0c2419
CRs-Fixed: 1106593
2017-06-21 19:40:49 -07:00
Karunakar Dasineni
4055568bad qcacmn: Monitor status ring handling
Changes to process PHY TLVs from monitor status ring and extract
information required for radiotap header.

Change-Id: I99d642e7506ea797b26dbfac89fd223d1a4c0a55
CRs-Fixed: 2048006
2017-06-16 17:12:13 -07:00
Ravi Joshi
52569e2a83 qcacmn: Extend radiotap header to include HE parameters
Extending monitor/radiotap header structure to include
high-efficiency (HE) headers.

CRs-Fixed: 1113187
Change-Id: I841dcdff3a91f1c70c3b0aac0a555c2f4b40aed7
2017-06-08 11:34:39 -07:00
Nandha Kishore Easwaran
e43583f3c1 qcacmn: Dptrace changes to take per pdev stats
Initial changes for adding dp trace in common framework. Modified dp_trace
record sturcture to include pdev_id as a member to take per_pdev stats.
Dump command has been modified to dump stats per pdev.

Change-Id: I8aede0bd8ab6f381c7fa0542d077bdd8bf66b3d2
CRs-fixed: 2038944
2017-06-05 22:52:34 -07:00
Venkata Sharath Chandra Manchala
35503cce26 qcacmn: TSO fixes
1. Unmap tso common segment only after receiving
   completions for all the tso segments for a given
   skb.
2. Keep a track of num of free tso descriptors available
   in the pool of tso descriptors.

Change-Id: I01bdbb9e40b7259f77dbcfeec22c6d8cd0c0a6dd
CRs-Fixed: 2042950
2017-05-22 17:05:21 -07:00
Himanshu Agarwal
e5b7db3baa qcacmn: Fill rate and bw info for HT/VHT frames in monitor mode
In monitor mode, while filling the radiotap header, rate and bw
info for HT and VHT frames was not filled correctly due to which
packets in tcpdump are showing incorrect rates and bw for HT/VHT
frames.

Fill rate and bw info for HT/VHT frames correctly in monitor mode.

Change-Id: I2dc9677e48fcf9fe19d61f84a253353e253b16da
CRs-Fixed: 2037501
2017-04-26 23:53:46 -07:00
Himanshu Agarwal
33d0d707bd qcacmn: Add support to add memory tracking in tx path
Add support to add memory tracking in tx path in WLAN driver using
already present infrastructure for memory tracking.

Change-Id: I6a2c9890e0af1fd51c4e2dfcded68f0075a3a4ef
CRs-Fixed: 2025670
2017-04-13 17:53:03 -07:00
Kai Chen
6eca1a62da qcacmn: Monitor mode configuration and processing
This change is for supporting monitor mode VAP.  All the monitor mode ring
is configured. The related monitor mode ring includes:
-monitor mode buffer ring
-monitor mode destination ring
-monitor mode status ring
-monitor mode link descriptor ring
The packet is not sent to monitor mode ring unless the monitor mode VAP is
configured. This release support Multiple VAP - AP/STA VAP plus Monitor
VAP configuration. The status ring is not used in this release. However,
the ring is tested and the ring is moving and there are TLV's in the ring.

Change-Id: I782ee0c3b998d8b3bbac79b5e7fdecdbff15fa93
CRs-Fixed: 2013049
2017-03-29 05:58:52 -07:00
Yun Park
2a31213ccf qcacmn: Change HDD IPA to comply with the refactored SKB CB
Refactor IPA private data stored in skb control block,
which size is reduced to 32 bits.
Owner id is changed to 1 bit, to flag if the owner is IPA.
Callback function pointer is removed by adding the callback into cdf.
Skb control block priv data is reduced to 16 bits by storing the index
to the Tx descriptor list added in HDD.

Change-Id: I0eec0636794da3b4729b8be825afe6a1275915a4
CRs-Fixed: 982728
2017-03-24 14:16:34 -07:00
Poddar, Siddarth
01c4031969 qcacmn: Add a flag in skb->cb for packet tracking
When a packet is generated internally, host adds a debug
node entry to the table and deletes the entry once received
tx completion for that packet by calling qdf_nbuf_free.
But when a packet is coming from network stack, host doesn’t
add any debug entry to the table and on receiving tx completion,
it calls qdf_nbuf_tx_free which will simply free the skb.

In case of P2P GO mode where packets are forwarded internally,
host creates a private copy of skb and add debug node entry in
the table. But when receiving a tx completion for the same packet
host calls qdf_nbuf_tx_free which will free the skb but will not
remove this node entry from the table. Currently, this api is common
for all data tx completion packets.

Add an extra flag in control block to differentiate whether skb is
generated by driver or come from network stack. If flag is true,
that means generated internally and need to remove the entry from
debug node table.

Change-Id: I61a76fdfedf0429e1b972824dc4513065d53033f
CRs-Fixed: 2020947
2017-03-20 02:47:38 -07:00
Kalyan Tallapragada
277f45e2b1 qcacmn: Add support to handle RAW packets in RX path
API to handle pkts received on vdev which has RAW mode
enabled. Currently supports only MPDU with single MSDU.

Change-Id: Ife00699646bd97c5de0021fc32db434a544058f6
CRs-Fixed: 1111781
2017-02-23 14:05:53 -08:00
Himanshu Agarwal
19d5fabddc qcacmn: Allocate memory tracking node for nbuf clone and copy
When nbuf is cloned or copied, memory tracking node is not being
created as of current implementation. While freeing the nbuf,
qdf_nbuf_free API is being called as many times as the number
of copies or clones of nbuf and as memory tracking node is being
created only once, warning print of double free is coming for all
the clones and copies of nbuf.

Allocate memory tracking node for nbuf clone and nbuf copy APIs as well.

Change-Id: I95fa6e7b2789dd97c0c500d0854210240feaac17
CRs-Fixed: 1114632
2017-02-09 13:46:39 -08:00
Himanshu Agarwal
4f162b59fc qcacmn: Add support to dump ICMPV6 RS and RA in wow wakeup stats
Propagation from qcacld-2.0 to qcacmn.

Add support to dump information for ICMPV6 RS and RA packets in
wow wakeup stats.

Change-Id: I1a2852189664fff31e29b487d7a8c66ee83931c5
CRs-Fixed: 1115364
2017-02-03 23:37:17 -08:00
Poddar, Siddarth
d56844e3e5 qcacmn: TSO MAP-UNMAP individual segments one by one
Change the static allocation of tso common info to dynamic
allocation to use this structure later on.
Introduce one more element in tso common info structure
use to store the dma address of EIT header which can be
repeatedly use to assign to the dma address of the 0th fragment
of all the tso segments corresponding to one jumbo skb.

CRs-Fixed: 1106688
Change-Id: I572c7dcd2d29cb19b398e13e0fe7ce6f88ee1641
2017-01-26 22:27:27 -08:00
Himanshu Agarwal
c0b7145916 qcacmn: Add infrastructure to log roam events in DPTRACE
Add infrastructure to log all roam related commands and
events in DPTRACE.

Change-Id: I66773fc23dfeacf3a63688819e099bf44676d95b
CRs-Fixed: 1081851
2016-10-26 10:49:22 -07:00
Mohit Khanna
2235081d87 qcacmn: Maintain length for each TSO segment
In current codeflow, we are maintaining the length of the TSO segments
belonging to one jumbo packet inside tso_info, which is common for
all the segments of one jumbo packet. This works if the length of
the segments (frag[1]) is the same. In case it is not, it ends up
assigning incorrect length to all the segments. This is resulting
GMS login failure.
Fix issue by maintaining the total length of the segment in the
qdf_tso_seg_t structure.
Re-factor code for easy readability
Add TSO_DEBUG prints which can be enabled (compile time) to debug
TSO issues

Change-Id: Ifb5a0f1493224c66c3acc394e47a74b2dd84bbc9
CRs-Fixed: 1062556
2016-09-12 18:02:29 -07:00
Sathish Kumar
5947138237 qcacmn: Implement QDF API to get queue mapping and total ram size
This change adds the following QDF APIs -

qdf_nbuf_get_queue_mapping: To get the queue mapping set by linux kernel

qdf_get_totalramsize: To get total ram size in Kb

Change-Id: I86daffebba759c086d15951dfcc72ea626c74bb4
CRs-Fixed: 1055387
2016-09-01 13:27:55 -07:00
Himanshu Agarwal
feeffba91b qcacmn: Add API to update mark parameter in sk_buff structure
Propagation from qcacld-2.0 to qcacmn.

Add API to update skb->mark whenever first packet after WOW wakeup
is received through HTT layer.

Change-Id: I877dd7af9a58ebc02d73461cc2a29e86a3945dec
CRs-Fixed: 989984
2016-08-24 11:33:27 -07:00
Himanshu Agarwal
81ce26de0d qcacmn: Add API to find IPV6 mcast packet
Propagation from qcacld-2.0 to qcacmn.

Add API to find IPV6 mcast packet to use it in wma_wow_wake_up_stats
func. This is required to know if there is a IPV6 mcast packet embedded
in a link layer unicast packet.

Change-Id: Ic2af69032262237b8751019817ae181913346818
CRs-Fixed: 1049254
2016-08-19 18:34:06 -07:00
Himanshu Agarwal
bf1a7c223b qcacmn: Add API to find IPV4 mcast packet
Propagation from qcacld-2.0 to qcacmn.

Add API to find IPV4 mcast packet to use it in wma_wow_wake_up_stats
func. This is required to know if there is a IPV4 mcast packet embedded
in a link layer unicast packet.

Change-Id: Iceaf1226edbf909ca3881e049c33f7d121860ef2
CRs-fixed: 1049254
2016-08-19 18:34:05 -07:00