Commit Graph

206 Commits

Author SHA1 Message Date
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
Pamidipati, Vijay
13f5ec2749 qcacmn: Enable DBDC WAR in Root AP mode
In current code, DBDC WAR for AST applies only for repeater mode.
Add support to enable this even in AP modex, for use in SON usecases

Change-Id: I82791fbae0cc86ac6d951c4d85b709c755334273
2018-08-17 10:30:45 -07:00
Aditya Sathish
ded018e406 qcacmn: Clean up dp component prints
Clean up datapath component prints by correcting trace levels for
regularly occurring prints and removing newlines from converged
print APIs since qdf_trace_msh appends them by default.

Change-Id: Ie8fe319fcb737720f7400a165e134b6a18bd15b5
CRs-Fixed: 2243843
2018-08-10 18:11:21 -07:00
Pamidipati, Vijay
3756b7603e qcacmn: DBDC repeater mode changes in AST
Add new ast_get_type API for DBDC repeater feature.
Add other changes required in WDS and MEC handling
required for DBDC repeater feature to function properly.

Apply sta kickout logic to handle roaming cases
only within same radio. For roaming across radios, DP should
rely on control path.

Change-Id: If9b35720082dd87de40827843a14238e818bc454
2018-08-06 13:43:58 -07:00
Balamurugan Mahalingam
96d2d41c87 qcacmn: Fix compilation issues and a minor issue
Removed qdf exports on functions defined in target specific
header files and defined those functions as static. Revert
changes on hal_rx_msdu_end_sa_idx_get and make
hal_rx_msdu_end_da_idx_get target specific

Change-Id: I2858b1d77118f0a26b54bf983bd342c7a4fe757d
2018-07-21 00:03:36 -07:00
Balamurugan Mahalingam
97ad1061a3 qcacmn: introduce few target specific hal functions
make hal_rx_msdu_end_sa_idx_get and hal_rx_dump_msdu_end_tlv
routines target specific as qca6390 implementation differs
a bit. add target specific functions for qca6290 and qca8074

Change-Id: Ie05b91d965bae3642e3264620c6d8427ad368044
2018-07-21 00:03:32 -07:00
Jeff Johnson
ff2dfb217b qcacmn: dp: Fix misspellings
Address the following issues in the dp folder:
CHECK: 'availble' may be misspelled - perhaps 'available'?
CHECK: 'catagory' may be misspelled - perhaps 'category'?
CHECK: 'endianess' may be misspelled - perhaps 'endianness'?
CHECK: 'exceded' may be misspelled - perhaps 'exceeded'?
CHECK: 'explicitely' may be misspelled - perhaps 'explicitly'?
CHECK: 'Inteface' may be misspelled - perhaps 'Interface'?
CHECK: 'lengh' may be misspelled - perhaps 'length'?
CHECK: 'messsages' may be misspelled - perhaps 'messages'?
CHECK: 'miscelleneous' may be misspelled - perhaps 'miscellaneous'?
CHECK: 'Ouput' may be misspelled - perhaps 'Output'?
CHECK: 'poiter' may be misspelled - perhaps 'pointer'?
CHECK: 'Poiter' may be misspelled - perhaps 'Pointer'?
CHECK: 'psuedo' may be misspelled - perhaps 'pseudo'?
CHECK: 'registerd' may be misspelled - perhaps 'registered'?
CHECK: 'requred' may be misspelled - perhaps 'required'?
CHECK: 'retreive' may be misspelled - perhaps 'retrieve'?
CHECK: 'succesfully' may be misspelled - perhaps 'successfully'?
CHECK: 'vaild' may be misspelled - perhaps 'valid'?
CHECK: 'virtaul' may be misspelled - perhaps 'virtual'?

Change-Id: I66b9cdc6115dd133b385e60c9d02cefd1bd0bac3
CRs-Fixed: 2241574
2018-05-19 19:41:02 -07:00
psimha
4d9c3f9806 qcacmn: Add sanity checks before retrieving rx_desc
Add sanity checks for pool id & index extracted
from the SW cookie field within buf_addr_info.

Change-Id: Icf21b94fa05f6f8887b8c7a17896348f25436dda
CRs-Fixed: 2220030
2018-05-16 19:48:38 -07:00
Tallapragada Kalyan
ee40c5657f qcacmn: handle mcast pkts in DBDC QWRAP mode
drop mcast pkts in DBDC QWRAP mode if its looped
back on a different pdev

Change-Id: Ia8a23d56e409c85f9c3be523da2041ab622dcb42
2018-05-15 04:33:58 -07:00
Prathyusha Guduri
02ed94801a qcacmn: Add support in DP for enabling multiqueue support
Enable multiqueue on VAP with 4 Tx and Rx queues in lithium.

In Rx path set the rx queue of skb based on the reo ring id on which it
is received.

In Tx path use the queue_mapping of skb to map to the hardware Tx ring
on which it has to be transmitted.

Change-Id: I103a21e91d1ed5c0e1d8441863d4fcd273b7bed9
2018-05-14 03:00:07 -07:00
Chaithanya Garrepalli
72dc9132a6 qcacmn: Raw mode re-factoring and cleanup in rx
Cleaned raw mode specific code and moved the rx
processing to single API dp_rx_sg_create

Change-Id: I7696786d9a0f10983d3299956b46b2ec76b388a5
CRs-fixed: 2204824
2018-05-11 21:12:39 -07:00
Pamidipati, Vijay
d578db10c0 qcacmn: Handle STA roaming to another AP/Repeater
Add support in DP WDS source port learning handler to kickout a STA,
when direct associated peer(SA) roams to another AP/Repeater and
reachable via TA peer

Change-Id: I84d0b92c9b4e39c05f4d7c25b3f5afb1d535ca02
CRs-Fixed: 2219924
2018-04-17 05:09:05 -07:00
Venkata Sharath Chandra Manchala
16fcceb7de qcacmn: Change the buffer manager
Change the buffer manager from HAL_RX_BUF_RBM_SW3_BM to
HAL_RX_BUF_RBM_SW1_BM to handle regular and error packets.

Change-Id: I696d41f6cf0be1d5045ab27841ccc3ee2afea7de
CRs-Fixed: 2189452
2018-04-06 13:25:31 -07:00
Manjunathappa Prakash
86f4ba70f3 qcacmn: Allocate HW link desc pools for each mac
MCL operates on both macs with single pdev. So allocate HW link
descriptor pools for each macs.

Change-Id: I5a373bfbd1d15557e1fc66b8af17c2a130cdf5f9
CRs-Fixed: 2176848
2018-03-20 15:55:02 -07:00
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
Mohit Khanna
e1d7e0ecc9 qcacmn: fix double unmap issue in monitor mode
Currently while reaping the rxda destination ring in dp_rx_mon_mpdu_pop,
we end up un-mapping the nbuf twice when -
1. msdu_ppdu_id > ppdu_id
2. msdu_ppdu_id = ppdu_id

For case 1, we exit from the dp_rx_mon_mpdu_pop without reaping the
descriptor completely, but we unmap the nbuf corresponding to it.
Next, when case 2 happens, we end up un-mapping the nbuf again to reap
the same descriptor.

Introduce a flag in the rx_desc to keep track of un-mapping the nbuf. If
the nbuf is already unmapped, donot unmap it.

Change-Id: Icb64fbc00312d6d0e6d41f7b475eb1285530c3d0
CRs-Fixed: 2185301
2018-02-16 22:58:09 -08:00
Tallapragada Kalyan
57b6bb3e1d qcacmn: Add support for DBDC repeater
Added CDP callback APIs so the DBDC repeater module
outside of cmn_dev can add, delete and update the AST
entries. Also with this change the sending of wds cmds
to fw is tied to adding AST, deleteing AST and updating
the AST entries.

Change-Id: I48d31962236860f50e16b771abaf3b8825b798df
2018-02-13 02:00:41 -08:00
Aniruddha Paul
80f52e70ca qcacmn: Add API to return the msdu link descriptor for NSS offload
Add API to return the msdu link descriptor from obtained from NSS back to
host link descriptor pool.

CRs-Fixed: 2178692

Change-Id: Ib4f967ea887e013d6461ba760a45dbda6fd92baa
2018-01-30 23:55:22 -08:00
chenguo
91c9010216 qcacmn: Fix memory leak for invalid peer error
In dp_rx_null_q_desc_handle, if peer is invaild and no need to
deliver to the upper layer, the nbuf must be freed before recycle
the rx descriptor.

CRs-Fixed: 2153932
Change-Id: I1b373d1b5b50da42b896f0b2fd7bbd13b0e2466d
2018-01-01 23:25:10 -08:00
Nandha Kishore Easwaran
47e7416b12 qcacmn: Add check to drop mcast loopback packet
Added a check in RX path to detect multicast loopback packets in
qwrap mode. In qwrap mode, there are multiple station vaps and
multicast loopback packet from one station vap should not come into
the other station vap. Added a check for this by iterating through
the vap list and checking if any of the vdev mac address matches
with the source address of the packet.

Also added a new vdev parameter to check if qwrap isolation mode is
enabled. In qwrap isolation mode, loopback packets should not be
dropped.

Change-Id: I7d35bf657a87337871156e4caec9038432e23a87
CRs-fixed: 2149190
2017-12-28 01:26:17 -08:00
Chandru Neginahal
ccf1cbd063 qcacmn: Expose dp_rx_mic_error_process() to other modules
dp_rx_mic_error_process() api is needed for nss wifi offload mode also

Change-Id: I3666bf3133ea59d5d286931c205bd09b8f6d6c72
CRs-fixed: 2155250
2017-12-21 21:25:56 -08:00
Kris Muthusamy
7e36889461 qcacmn: Adding vdev id for WDS add/del/update API's
- Update the WDS add/del/update dp api's with vdev context

Change-Id: I68bf5670232aaa4bb4cce6a6fe0f7b3b2e921143
CRs-fixed: 2133484
2017-12-20 11:45:07 -08:00
psimha
223883fb88 qcacmn: Handle RX defrag in exception path
- Perform SW chaining of fragments.
- Reinject only the head fragment to REO.

Change-Id: I198db3ba4319b8a2e800eb7495cf190c5e86d4cd
CRs-Fixed: 2144197
2017-12-18 15:55:14 -08:00
chenguo
85d964f48b qcacmn: Add AST type for DP path
There is a hard-coded AST type number used for DP path, which will
cause poor readability. Fix this problem by using a pre-defined
constant type value.

CRs-Fixed: 2142975
Change-Id: I3520970bf59ea7152a0851cfdc3b8e7943ddbc19
2017-12-13 23:38:12 -08:00
Tallapragada Kalyan
2a5fc625d2 qcacmn: Add WDS Vendor Extension ECM Framework
Add WDS tx/rx policy checks in Tx and Rx datapaths.
In Rx path, check packets against rx policy configured
In Tx Reinject path, checks are to process or drop 4-addr/3-addr packets
to peers decisively

Change-Id: I0a6c01b7555fa5d369ab2c9baf454d49808857fc
2017-12-13 12:15:54 -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
Tallapragada Kalyan
a867edf5ee qcacmn: pass correct argument to qdf_nbuf_alloc
till date we were passing wrong argument to qdfnbuf_alloc
now we are passing the right argument.

Change-Id: Ie3ee8f1d870b410cbea3236d2fa42ae035a67e0f
2017-11-24 02:36:53 -08:00
Tallapragada Kalyan
0017291c13 qcacmn: return msdu link descriptors to wbm release ring
add support to return msdu link descriptors received on rxDMA error ring
to wbm release ring without freeing the nbufs (msdus).

Change-Id: Ic12c3f0531a639b61d3d77cee6266ce595e4d1c9
2017-10-23 10:05:40 -07:00
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
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
85a1455795 qcacmn: Do WDS source port learning if it is a 4-addr pkt
Added one more check for wds source port learning only
if it is a 4-address pkt.

Change-Id: I85c7859008fd6e5c060c7bf444e49e86c96e32c4
2017-08-28 08:11:56 -07:00
Aniruddha Paul
fbeb4bb9fa qcacmn: API for upating astentry active flag
API added to update the astentry active flag

Change-Id: I749960135d645cdf736fef01200c200147700f91
2017-08-20 05:16:17 -07:00
Karunakar Dasineni
dbaf4bed59 qcacmn: Link descriptor IDs to assist debug
We need only 3 bits of cookie field in link descriptor buff_addr_info
to store bank ID. The remaining bytes will be used set a unique ID,
which will be useful in debugging. Also fixed an issue in scatter idle
list setup.

Change-Id: Id3cc9a8a316fe942e749611c2f57e9324419dd40
2017-08-08 12:06:10 -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
Pamidipati, Vijay
b8bbf16192 qcacmn: Add support for WDS aging
Add support for monitoring receive traffic from WDS nodes and
aging out inactive WDS nodes

Change-Id: Iedea826832a5421714c00bccadc6e0dc4acd4c7e
CRs-Fixed: 2004658
2017-07-15 11:38:57 -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
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
Keyur Parekh
fad6d088fa qcacmn: Packet log changes for wifi3.0
Change-Id: I82462f426e4e449c5bc65331e39f07a062e8e242
2017-06-27 23:37:33 -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
a3088d9a34 qcacmn: WDS changes to address multi-radio scenario
Because of mult-radio changes where we have soc and scn
structures modified we need to address the same for WDS

Change-Id: I63f95d93ac15cdbcdd2b05cb80ce364115e9c16e
2017-06-16 17:12:23 -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
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
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
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
Kiran Venkatappa
5dba3a3f9a qcacmn: Fix init failure and DP detach crash
Skip free of nbuf with physical address less than 0x50000000. This will
ensure that same buffer is not getting allocated again resulting longer
DP init time and affecting WMI init sequence. And use correct pointer
in pdev detach function.

Change-Id: Iaab70c92adef741d5f20115cba164bcd7718886b
CRs-Fixed: 2013500
2017-03-05 21:38:40 +05:30
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