Commit Graph

47 Commits

Author SHA1 Message Date
Gurumoorthi Gnanasambandhan
25607a7bb8 qcacmn: Handle MIC error indication from Hardware
Handle MIC error reported by Hardware and pass the event to hostapd.

Change-Id: I510808f1e714edab5d4ccc0a2e205988892ea162
2017-10-05 16:11:34 -07:00
Jeff Johnson
3f217e2a81 qcacmn: dp: Replace instances of unadorned %p
Replace instances of unadorned %p in dp.

Change-Id: I8d9c0f6efe5f03a582a36d7ff39a905a5de576a7
CRs-Fixed: 2111274
2017-09-28 04:48:10 -07:00
Dustin Brown
49a8f6e37e qcacmn: Prepend kernel includes with "kernel/"
To avoid include conflicts, prepend all kernel includes with "kernel/"

Change-Id: I1c3ae9078d5537b03486afff9c2491881c9f694c
CRs-Fixed: 2098814
2017-09-15 12:22:51 -07:00
Venkateswara Swamy Bandaru
1fecd15636 qcacmn: Add stats and filtering support in delivering of unencrypted frames
Addded stats and filtering support in delivering of unencrypted frames
in mesh mode.

Change-Id: I2fd72f766660e500affeccda9aad03a0313d0659
CRs-Fixed: 2004658
2017-08-31 06:27:38 -07:00
Tallapragada Kalyan
71cc01bb11 qcacmn: Do Multicast Echo Check for Multicast pkts only
Add a check to ensure MEC happens only for multicast
and broadcast pkts only. Also added additional check to
drop the mcbc pkt whose src MAC addr matches to the rx vdev.
This is in addition to the other MEC checks already in place.
CRs-Fixed: 2097918

Change-Id: Ie41fce0368cd6147c2a3678f8f4b31eb400f933c
2017-08-29 20:55:49 -07:00
Pratik Gandhi
7613908cb9 qcacmn: SmartMesh add support for multi radio
Add support for multi-radio  to smart mesh feature

Change-Id: I21f1a59be419cf68b3c038a08c58f17c82df33bb
CRs-Fixed: 2017269
2017-08-24 17:07:24 -07:00
Radha krishna Simha Jiguru
f70f991f45 qcacmn: Send peer create to NSS only for connected peers
Send peer create to NSS only when peer map comes for connected peers.
When peer map comes for WDS peers only update WDS peer specific entries.

Change-Id: I32d785180bcd1dae2703d40b55f4536685f10439
2017-08-17 20:51:16 -07:00
Tallapragada Kalyan
1c14d5d8e9 qcacmn: MEC loopback check even when sa_is_valid not set
There is a case when the multicast/broadcast frame gets loop backed
even before a MEC WDS entry gets added, in this case
the MEC check based on sa_is_valid will fail, hence added
another ast lookup check.

Also fix the ast entry iterator to use _safe option, since
we are deleting ast entries in the same iterations

Change-Id: I0567893783649d991c3623a61c60fbc63d1a24ef
2017-08-17 14:55:13 -07:00
Tallapragada Kalyan
fb72b637f7 qcacmn: AST based MEC support for HAWKEYE
Implemented MEC support using AST entries rather than
using a separate MEC table.

Change-Id: Ifaafb4be1f8a981ad28609ea9740e8bbccec9046
2017-08-17 14:55:11 -07:00
Kai Chen
634d53f81b qcacmn: Fix the ppdu id and buffer reading issue
Read the ppdu id from MPDU start TLV instead of
ATTENTION TLV. The MPDU could extend to multiple
SKB buffer. The ATTENTION TLV will be in the TLV
of last SKB buffer. MPDU start will be in the
first SKB buffer in MPDU. Read ppdu id from MPDU
start TLV guarentee the correct reading
The msdu count in MPDU from REO entrance ring is for
msdu count for decap frame or MPDU count for not decap
frame. msdu length in msdu desc info is for msdu
length for decap frame or MPDU length for not decap
frame. The MPDU could extend to multiple SKB.
The continous bit in msdu desc info indicate if
the MPDU/MSDU extend to next SKB. code is modified
accordingly.

Change-Id: If9aeb278f84a57d64651e1f877b5185f6db63cd2
2017-08-01 11:42:44 -07:00
Pratik Gandhi
4fbe3fe1c7 qcacmn: SmartMesh Extract status for radiotap headers
Extract rx status to add correct values in radiotap header
before sending to stack.

Change-Id: If7adf523dc61cd52c984ad0a97da82fccc608bbc
CRs-Fixed: 2017269
2017-07-26 09:24:34 -07:00
Linux Build Service Account
6e5563fc0f Merge "qcacmn: WAR for RXDMA packet drop issue" 2017-07-16 15:52:24 -07:00
Pamidipati, Vijay
eb8a92cedc qcacmn: Add support for delivering unencrypted errors
In mesh mode, it is possible to receive unencrypted frames while security
is enabled. Deliver such frames to OS stack.

Change-Id: Id148b6ecc1432b419ae97c92f2340155f3d851bf
CRs-Fixed: 2004658
2017-07-15 14:36:26 -07:00
Karunakar Dasineni
15a3d48c75 qcacmn: WAR for RXDMA packet drop issue
When monitor RXDMA is enabled, regular RXDMA will drop a good packet
whenever an error is indicated in monitor path due to a HW bug. To
avoid this, a dummy buffer will be used to receive packets passing
"monitor other" filter on regular DMA, which will be received on
RXDMA2HOST ring. These packets should be ignored based on a special
cookie value.

Change-Id: I348527f662cd664652d8d99c01484bb310c6e705
2017-07-14 18:56:38 -07:00
Karunakar Dasineni
80cded8b4a qcacmn: WAR for incorrect MSDU count in MPDU desc
Rx MSDU count received in mpdu descriptor may be incorrect
sometimes due to HW issue. We should check msdu buffer address
in each Rx msdu buffer entry in RX msdu link descriptor.

Change-Id: I86af4797cfb79fad33977cf53d62a8d368dc3543
2017-07-13 16:08:16 -07:00
c_cgodav
bd5b3c2c9b qcacmn: Add CDP APIs to get security type from peer handler
Add CDP API to get security type for ucast and mcast from
peer handler. Add additional peer handler argument for raw mode
rx decap functions. The peer handler is needed in the raw mode
functions for getting the security type of the frame and process
it accordingly.

Change-Id: I8b4728e9eb0ff29849805bb461c81e4fc3accc81
2017-07-12 12:55:50 -07:00
Pramod Simha
e382ff88b9 qcacmn: Add RXDMA_DST ring support
Setup & process the RXDMA_DST ring to handle error frames
from RXDMA block. Pro-active fix to handle the WAR for
the WBM stuck issue seen when sending RX_FLUSH command.

Change-Id: Ibf56062da2cd9b5d447f1d43bbae5944426d88c8
CRs-Fixed: 2059870
2017-07-07 12:33:54 -07:00
Gurumoorthi Gnanasambandhan
ed4bcf8e9d qcacmn: Add changes for PN check in REO
Setup PN check in REO for Security mode.

Change-Id: I682cda20907b7f64ba18bfef9927b7f8d72d2b54
2017-06-19 12:43:30 -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
Ravi Joshi
36f68ad7cb qcacmn: Enable support for receive defragmentation
Enable support for receive defragmentation on Lithium.

Change-Id: I6c1213db29d3b6e0a11506d6945d9ea05ece2c73
CRs-Fixed: 1109359
2017-05-08 14:59:04 -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
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 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
Tallapragada
57d866024a qcacmn: fix crash found in intrabss-forwarding
We are zeroing out complete peer structure after
initialing ast_entry queue. so re-adjusted code.
Also wds source port learning is called before we
pull the TLVs from the nbuf resulting in accessing
wrong src mac address.

Change-Id: Ifd5a2056a3f9f03a1ff1cf5b79046f932dd38510
2017-03-31 05:54:35 -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
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
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
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
Venkateswara Swamy Bandaru
9fac863f73 qcacmn: Fix for kernel panic in rx path
Add Null check for peer before accessing the structure.

Change-Id: Ic1b6e0c3a7a9aeecbc9aa9cc4a118e27726d94f2
CRs-Fixed: 2010214
2017-02-23 04:18:50 -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
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
Karunakar Dasineni
e8380bbece qcacmn: REO descriptor changes
Disable CHK_2K_MODE and OOR_MODE in REO descriptor. Also set RTY bit for non-BA TID queues as temporary WAR for duplicate detection issue.

Change-Id: Ifa51c20ffbfe31c807d4e7f99014cb76f411e066
2017-01-19 12:46:37 -08:00
Venkata Sharath Chandra Manchala
8e8d8f1e82 qcacmn: Fix for compilation issues in REO management
Added suitable typecasting for qdf_set_bit and
qdf_clear_bit functions

Change-Id: I90fc0f441a6eae8dfdea43705373fced81b26b48
CRs-Fixed: 1105853
2017-01-18 20:05:32 -08:00
Karunakar Dasineni
a0f09eae1d qcacmn: REO management changes
Changes to use REO HW command/status interface to update/delete REO queues.

Change-Id: I3500d45db021ef314b4d03fa878314d407ddfe65
2017-01-18 20:05:29 -08:00
Jeff Johnson
8a4fd9bec1 qcacmn: Fix -Wmissing-prototypes in dp_rx_err.c
We want to enable the compiler's -Wmissing-prototypes switch, but
there is existing code in dp_rx_err.c that is generating warnings.
Fix these warnings by making the following functions static:
	dp_rx_frag_handle()
	dp_rx_pn_error_handle()
	dp_rx_2k_jump_handle()
	dp_rx_null_q_desc_handle()

Change-Id: I45108fff8f69194b28391eebb5e079149ae5cc5a
CRs-Fixed: 1108176
2017-01-18 09:40:10 -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
Karunakar Dasineni
79cc20c174 qcacmn: DMA unmap SKBs dropped in Rx error path
Change-Id: I7135aa08062b06b3393cc09b7a5b2e0b64b3a4d6
2016-12-20 23:34:14 -08:00
Leo Chang
5ea93a4527 qcacmn: wifi3 compile against cdp
Wifi 3.0 compile against cdp apis.
Make compilable against mobile code base.
selective hw common header include.

Change-Id: I051f917001c0d13c762d9cb5a3ec141cd278d0e7
CRs-fixed: 1075736
2016-11-17 19:13:03 -08:00
Debashis Dutt
390645c6e1 qcacmn: Add Lithium RX Core Error Processing Infrastructure
Implements the core error processing infrastructure
for:
 - REO exception ring and
 - WBM SW Release ring.

Individual error handling (e.g Defragmentation) will
be added going forward.

In this first check-in all frames routed to the WBM release ring
are dropped except MC/BC packet that get routed to this ring,
due to the default configuration (MC/BC packets cause NULL queue
descriptor violation).

Change-Id: I57a7be19d51907d6b6df2e62246a45da07325f49
CRs-Fixed: 1074199
2016-10-28 06:31:34 -07:00