Commit Graph

397 Commits

Author SHA1 Message Date
Pramod Simha
59fcb31d81 qcacmn: check for in use flag during free
Add a in_use flag to identify if a rx desc is associated
with a valid nbuf and use this flag while freeing the nbuf.

Change-Id: Iace002ecadfd95ce60b7d1eaebc42194a433963b
CRs-fixed: 2044907
2017-06-30 20:14:16 -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
Pamidipati, Vijay
be379457e6 qcacmn: Add a flag to enable/disable per-packet sync of DP stats
Currently all Host collected DP statitics are synced to upper layers
on per-packet basis; This is causing significant CPU overhead.
Add a flag which can be controlled through iwpriv to enable/disable
updating of these statistics from DP to higher layers

Change-Id: I983c6d91803c83c1efd49c5535769a0c10fbc9b5
CRs-Fixed: 2064113
2017-06-26 17:42:34 -07:00
Tallapragada Kalyan
52b45a143a qcacmn: Add scatter-gather support in RX path
Add nbufs to frag_list of parent nbuf when ever we receive
multiple MSDUs spread across nbufs.

Change-Id: Iff7a5208408fa55306cb4137e97bc781e1e82a01
2017-06-19 12:43:26 -07:00
Pamidipati, Vijay
5379474f69 qcacmn: Enabled asserts in Rx error path
Enable qdf_assert on rx error path to detect corruption issues.
Also add a magic word in rx_desc and compare on rx indications
to detect any corruption issues early in the path

Change-Id: I4df1220f19c891928f9687f40de6f2118b530db2
CRs-Fixed: 2004658
2017-06-16 17:12:26 -07:00
Tallapragada Kalyan
274eb9e76b qcacmn: Temporary WAR for Multicast echo check in host
This is a temporary WAR in host for multicast loopback check
until we finalize on exact design, and host or firmware will
take care of this

Change-Id: I4d2d1b0f5d2a78d4c8716740b74c4fee22c28e96
CRs-Fixed: 2039038
2017-06-16 17:12:15 -07:00
Dhanashri Atre
991ee4defc qcacmn: Modify legacy LRO implementation to use QDF
Modify the legacy LRO implementation to use the implementation
in QDF instead. This is to avoid code duplication and to unify
the LRO implementations for Napier and Helium.

CRs-Fixed: 2042812
Change-Id: I38e9da3b54392a1c5781133916361aac3875d43d
2017-05-26 16:11:22 -07:00
Manjunathappa Prakash
ae66cda533 qcacmn: Remove excessive per packet logging in dp_rx_process()
Move excessive per packet logging inside undefined compile flag.
Eventually need to remove this debug logging.

Change-Id: If1470a4c780b4b718346982a69d6e5fb60e2287f
CRs-Fixed: 2049401
2017-05-22 13:16:14 -07:00
Bharat Kumar M
9a5d537249 qcacmn: changes to support lithium nss offload
Changes include
1. nss_cfg parameter to dp_soc.
2. nss_enabled field for pdev.
3. cdp api to enabled nss offload config.
4. skip rx ring configuration when nss enabled.
5. skip timter /interrupt configuration if
   nss is enabled.
6. peer map/unmap event hander.

Change-Id: Ic4a919b6b7e846e18cb15ebcb94f8736a751ecb5
2017-05-17 19:30:25 -07:00
Ishank Jain
57c42a193c qcacmn: Add missing TxRx Datapath stats
1.Add QDF_TRACE_STATS for datapath stats to remove
  module prints.
2.Fix Stats indentation for better readability.
3.Add missing stats
  a. Update Packets on Rx side on per-ring basis.
  b. Add stats for features (TSO/SG/RAW/Mesh)
  c. Add packet type count on Rx.

Change-Id: Ief1719b67330f729ff60703ec2be26bc5e4201e9
CRs-Fixed: 2034876
2017-05-05 00:27:21 -07:00
Pratik Gandhi
3da3bc731c qcacmn: Smart Mesh-NAC filtering in rx data path
Perform software based smart mesh filtering on rx packets indicated
as error packets with invalid peer. All such packets from NAC
sent to umac through monitor interface.

Change-Id: I8e4b40f74088bb8820d6ab6681756835e400d4ef
CRs-Fixed: 2017269
2017-05-04 01:40:28 -07:00
Venkata Sharath Chandra Manchala
918aefe25b qcacmn: Per ring - Per core statistics
Add ring_packets variable to collect packet count on rx
path. This stat variable is incremented on
per ring - per core basis.

Change-Id: If8b51a757b28c231a6444e6b7f2e336b8c0cdd8e
CRs-Fixed: 2035142
2017-05-03 11:00:45 -07:00
Karunakar Dasineni
ca792543cf qcacmn: Enable WDS learning only when configured
Add support to make WDS source port learning in lithium datapath
to be configurable.

Change-Id: I63eb64d6f46560a31f8e40a806d05d1dceddd784
CRs-Fixed: 2004658
2017-04-20 10:51:25 -07:00
Tallapragada
aa3bfccdea qcacmn: Add support for Native wifi for Hawkeye
handle packets received in native wifi mode.

Change-Id: I146f748923e2d70fa0634f260d73fcacd213983d
2017-04-18 17:14:04 -07:00
Dhanashri Atre
0da3122669 qcacmn: Lithium LRO Support in the Data Path
Add support to extract LRO information provided by
the hardware and utilize the support provided by QDF to
perform LRO.

Change-Id: I00a26573a450e9c32586b3d5fb656dbfe802cfac
CRs-Fixed: 1107169
2017-04-17 14:52:18 -07:00
Tallapragada Kalyan
3a0005c210 qcacmn: skip wds handling for raw mode pkts
avoid  wds source port learning for RAW pkts

Change-Id: I38e27890bd4cd12b812a584a32de10499ef736fe
2017-04-12 05:22:30 -07:00
Venkata Sharath Chandra Manchala
a405eb741b qcacmn: Add dump stats feature for Lithium
Add support for dump statistics in Lithium.
Statistics include:
	1. Tx path packet flow
	2. Tx Histogram stats per interrupt
	3. Rx path packet flow
	4. Rx Histogram stats per interrupt

Change-Id: I7f399b717a9fb29a3d6ab672b669c6e323f61e27
CRs-Fixed: 2023386
2017-04-11 11:04:37 -07:00
Ishank Jain
e73c403a0b qcacmn: Add missing stats for Host Lithium Stats
Add Invalid Peer stats on rx side
Add aggregation stats missing on Tx
API to update Rx Errors

Change-Id: Ib757ee7b89d9b9113e1a41b5a520faabb9ff28bb
CRs-Fixed: 1114641
2017-04-11 11:04:18 -07:00
Ishank Jain
9f174c6e2f qcacmn: Add Non Association WDS(NAWDS) Support for Lithium
Add API to handle NAWDS packets on tx side.
Add API to handle invalid peers and pass them to umac.

Change-Id: Ie8c2508e4f51c7d6969c9eb6439919c57dd427d4
CRs-Fixed: 2008205
2017-04-03 14:38:51 -07:00
Karunakar Dasineni
1d891ed8d3 qcacmn: Fix for datapath latency issues
Reduce DP poll interval to 10ms and change per-packet prints in Rx path to debug level.
Also fixed HAL macros used to setup Rx buffer descriptors.

Change-Id: I112393a3f021b275dbe9da9df9c1bac584a96f3f
CRs-Fixed: 2026389
2017-03-31 14:50:19 -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
Venkata Sharath Chandra Manchala
87686d9a2f qcacmn: Fix for ampdu aggregation in host statistics
Ampdu count is populated in pdev
but zeroed before printing. Fix it to
be populated in peer and aggregated
in pdev before printing

Change-Id: I51d8f1968a87c0b9dbf53928acd1bbef45acc7ec
CRs-Fixed: 2025785
2017-03-28 11:03:06 -07:00
Tallapragada Kalyan
6f6166e36c qcacmn: Add support for intra-bss forwarding
pkts should be forwarded from one STA to another
STA belonging to same VAP from within the driver

Change-Id: I68eb0dd91f7ac54352b4882ffdb9d5d53d627db1

Conflicts:
	dp/wifi3.0/dp_rx.c
	dp/wifi3.0/dp_types.h

Conflicts:
	dp/wifi3.0/dp_rx.c

Change-Id: I68eb0dd91f7ac54352b4882ffdb9d5d53d627db1
2017-03-25 06:38:24 -07:00
Pramod Simha
b17d067de0 qcacmn: Changes to support LFR
Setup all TID queues during rx peer init
Add support to handle ADDBA HTT msg
Allow pkts to be fwd to stack even if peer isn't found

Change-Id: Icdfec2eeaa3e0ca62202ed278cd63209b8f79cb2
CRs-Fixed: 2016138
2017-03-21 22:01:34 -07:00
Ishank Jain
949674c4cb qcacmn: Add DSCP_TID changes for Lithium
Add command to set mapid for each VAP using:
iwpriv athX s_dscp_mapid  N

Add command to change tid values in PDEV maps using:
iwpriv wifiX s_dscp_tid_map <MAP_ID> <TOS> <TID>

Change-Id: I510a40e71ecec5c453dd2dff1b13fd5ebedbe98a
CRs-Fixed: 1108452
2017-03-21 22:01:27 -07:00
Ishank Jain
1e7401cbc7 qcacmn: Add Host Lithium Stats
Add per peer stats
Add support to update APSTATS
Change QDF_TRACE to DP_TRACE for improved readablility

Change-Id: I4be2adf2a1d7f978eb2961a544435d525c97923d
CRs-Fixed: 1114641
2017-03-16 20:03:16 -07:00
Dhanashri Atre
1404917b6e qcacmn: Add support for hash based rx steering
This change includes:
- Adding the hooks to send LRO and hash configuration to the firmware
- Configuring the REO remap registers

Change-Id: I6d83e2a2365647f2c7a6440bd1d4b42fa7df7eff
CRs-Fixed: 1094775
2017-03-13 14:01:49 -07:00
Ishank Jain
bc2d91f8f3 qcacmn: Add TxRx Statistics for Lithium datapath
Statistics can be displayed by issuing following commands

iwpriv ath0 txrx_fw_stats 3 /*Rx Rate Info*/
iwpriv ath0 txrx_fw_stats 6 /*Tx Rate Info*/
iwpriv ath0 txrx_fw_stats 8 /* print Tx stats */
iwpriv ath0 txrx_fw_stats 27 /*print Rx stats */

To reset the stats:
iwpriv ath0 txrx_fw_stats 9 /* clear all stats */

Change-Id: If4be2549f43403e71ef092c23b1cf14b35a2e5d4
CRs-Fixed: 1114641
2017-03-09 17:37:42 +05:30
Venkateswara Swamy Bandaru
ec4f8e61c6 qcacmn: Add support for Mesh Rx filters
Added support to filter out received packets on mesh vap based on
rx filter setting.

Change-Id: Ibc541324d928a9d006531c8908f4792e0c7d854e
CRs-Fixed: 2003389
2017-03-08 08:24:49 -08:00
Tallapragada Kalyan
67ad342abe qcacmn: Add RX TLV debug prints in error path
print complete RX TLVs in human readable format
when ever we encounter an error in RX path

Change-Id: I054556fd599db75b94eadb7647f4cd589cbfb700
CRs-Fixed: 2003183
2017-03-06 04:20:06 -08:00
Venkateswara Swamy Bandaru
c64c862938 qcacmn: Add debug support for mesh
Added per packet prints for mesh both in tx and rx path for Mesh packets.

Change-Id: I4738cf682971962fe0b07cd9fb88f8586e123f89
CRs-Fixed: 2003389
2017-03-06 02:57:47 -08:00
Venkateswara Swamy Bandaru
c14b1b6f66 qcacmn: Add support for Mesh RX stats
Added suport to extract per packet rx stats from tlv headers and to send
them to upper layers in predfined format.

Change-Id: If8aea2038939162a11ab869b585a0b203a396d71
CRs-Fixed: 2003389
2017-03-04 09:02:56 -08:00
Ishank Jain
2bf04b40c0 qcacmn: Add support for WDS source port learning
Add or update WDS peer entry whenever source address of the
received pkt does not match with the peer table entries.

Change-Id: I7798a5b795777451f534be7d25d5f9b930f5c305
CRs-Fixed: 1117405
2017-03-03 08:14:16 -08:00
Tallapragada Kalyan
aae8c4177e qcacmn: modify RX path to support multi-radio
replenish buffers to the respective RXDMA pool.

Change-Id: Ib9e366efa098482419a4eac4579786bd0eb13946
CRs-Fixed: 2008301
2017-03-03 05:42:13 -08: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
Tallapragada Kalyan
1b4d08d6bb qcacmn: Add support to print MCS rate, SGI & TID
Add RX HAL APIs to retrieve the mcs, sgi & tid info
from the rx TLV headers and display them on per packet
basis.

Change-Id: Ic6ced3ad0728183437014c0e6c2a8afbdbead1c2
CRs-Fixed: 1101961
2017-02-22 23:42:40 -08:00
Tallapragada Kalyan
e7d51ef086 qcacmn: restore peer meta_data across msdus of A-MSDU
peer meta-data is copied across TLVs of individual MSDUs
of A-MSDU, This has to be saved and used till last msdu
of the MPDU.

Change-Id: Id30938eebd8f98716bf9625553aea2cd774104d0
CRs-Fixed: 2002766
2017-02-17 16:45:55 -08:00
Tallapragada Kalyan
4e3341aa2a qcacmn: RX nbuf allocation from phy addr 0x50000000 and above for x86
We should always ensure memory allocation for rx nbufs
should always happen from phy address 0x50000000 and above
else drop the nbuf and try for a new nbuf.

Change-Id: I675a0f1289e04f720949ad9b6917bbb733270a78
CRs-Fixed: 2003174
2017-02-17 15:57:41 -08:00
Tallapragada Kalyan
3549b43aab qcacmn: Drop pkts with same source MAC addr as BSS peer
Drop packets received with source mac address which match
BSS-peer MAC address

Change-Id: Ia89bdef8c747856e6eb0ade5946f2109aa6ee106
CRs-Fixed: 2003187
2017-02-17 11:13:14 -08:00
Dhanashri Atre
bda02dc9c2 qcacmn: Fix rx packet queue processsing
- Ensure the head and tail pointers are reset after
processing the packets on each vdev
- Ensure the network buffer is null terminated when
processing the null queue

Change-Id: I7bfab46b7fc6054e782f7f1fc09dd56a58e46a4d
CRs-Fixed: 2001835
2017-02-02 20:09:41 -08:00
Debashis Dutt
af64522cc3 qcacmn: Add debug logging To Tx/Rx path
Add Tx completion status value to the logging
of Tx completions. In addition dump Rx meta-data
and first few bytes of Rx packet only on NAPIER
EMULATION platform. This is only to facilitate
faster debug from the logs, and will be disabled,
once we have more stability.

Change-Id: I69d9e2fd6ad32efe01b8e56f355db5ed6d4d2e70
CRs-Fixed: 1116939
2017-02-01 16:23:39 -08:00
Houston Hoffman
fc0a960b55 qcacmn: Handle allocation failure in dp_rx_buffers_replenish
Need to handle allocation failure when replenishing rx buffers.

Change-Id: Iad9fad5b14bd0f9599105e255689f8fa174b816d
CRs-Fixed: 2000138
2017-01-31 18:53:12 -08:00
Tallapragada Kalyan
603c594e45 qcacmn: DP RX optimization changes
Added a separate loop to dequeue the rx pkts and relinquish
REO and rx-Refill ring faster. Additionl rx processing is
moved to a different per vdev loop.

CRs-Fixed: 1098453
Change-Id: I43b1fa302cf7e7c77f6114ea491306c0b724e365
2017-01-10 11:47:43 -08:00
Tallapragada Kalyan
1ef5480ea4 qcacmn: Added support to handle NULL Q descriptors
The MC BC packets cause a NULL REO queue descriptor exception,
and hence are directed to the ring that is configured to receive
this exception from REO. As of now, this error is directed to
WBM release ring. Add handling to pass these packets to stack
instead of dropping them, when received on the WBM release ring.

Note that, the final fix may be route these to REO exception ring
from which the driver may need to pass them to stack.

CRs-Fixed: 1098153
Change-Id: If544911e7882a9f5e7dbffa5ef705618e9fcbbda
2016-12-29 01:48:29 -08:00
Dhanashri Atre
6d90ef32d5 qcacmn: Separate peer object creation from other initialization
Seperate the dp peer object allocation from setting the peer's
default routing and default rx tid queues.

This change is to address a race condition where the HTT peer map
message arrives before the peer object is created.

Change-Id: Ibb0671d29ffac41fd06bb8a88476f37120d99ccb
CRs-Fixed: 1089662
2016-11-26 13:35:33 -08:00
Dhanashri Atre
7351d17b41 qcacmn: MCL Buffer Replenishment
Add support for replenishing the rx buffers using the host to
firmware buffer ring.

This includes adding a flag QCA_HOST2FW_RXBUF_RING:
When QCA_HOST2FW_RXBUF_RING is enabled the host will do the following:
- Allocate the refill buffer ring (HTT_HOST1_TO_FW_RXBUF_RING) and
populate it with
 rx buffers
- Send the refill buffer ring configuration to the firmware
- Allocate the rx DMA ring (HTT_RXDMA_HOST_BUF_RING), leave it empty.
- Send the rx DMA ring configuration to the firmware

When QCA_HOST2FW_RXBUF_RING is disabled, the host will do the following:
- Allocate the rx DMA ring (HTT_RXDMA_HOST_BUF_RING), and populate it with
 rx buffers
- Send the rx DMA ring configuration to the firmware

CRs-Fixed: 1074199
Change-Id: Iec05a973cd9d628c742e3aaa16b8dabc7797625d
2016-10-28 05:21:59 -07:00
Debashis Dutt
c4c52dc1fd qcacmn: Add Lithium RX Core Processing Infrastructure
Add Lithium Rx basic packet processing path from REO.
Implement the following in this patch:

 - Rx buffer replenishment directly to RxDMA rings (WIN)

 - Rx descriptor management

 - Rx Path Processing for non-error packets

 - RxDMA optimization (access on 128 byte boundary)

Change-Id: I25aea3a79d5494a0447bc7ca919acb87b74f2760
CRs-Fixed: 1074199
2016-10-28 04:36:42 -07:00