Commit Graph

103 Commits

Author SHA1 Message Date
Chaithanya Garrepalli
cf347d1686 qcacmn: Add APIs to get AST entry with pdev_id
With HKv1 WAR to handle DBDC backhaul SON cases a AST
entry for same mac can exist on different radio added
CDP APIs to support the same

Change-Id: I374b8af3fe5e34f62eeb5b09819e331fdeda602a
2018-10-08 03:36:21 -07:00
Chaithanya Garrepalli
7c8cf12b76 qcacmn: add API to get ast entry from peer ast list
We are adding AST entry to ast_table from
dp_rx_mcast_echo_check in STA mode as in STA mode
we will not get the peer map event.

Find AST entry from the peer ast list to get ast entry
added in host for that particular peer. As in QWRAP
mode there can exist multiple peers with same mac address
and corresponding AST entries will be added

Change-Id: Ia75f88c03c4d0eba0edbebf8e8f40d41396543d5
CRs-fixed: 2307540
2018-10-08 01:53:25 -07:00
Tallapragada Kalyan
5deeef2fec qcacmn: Add support for MEC stats and null queue stats
Add support for MEC stats and null queue stats

Change-Id: Ie523d8e5cbca6660cd5477d152360db448d75708
2018-10-05 15:46:46 -07:00
Balamurugan Mahalingam
764219e1a8 qcacmn: move some hal functions to hal_generic_api.h
Functions hal_rx_wbm_err_info_get, hal_tx_comp_get_release_reason,
hal_rx_dump_mpdu_start_tlv uses some hardware macros directly and the
value differs between qca8074v1 and qca8074v2 targets.
Move these functions to generic api file and compile it per target.

Change-Id: Ib78fb6e69238577aac64da3f60f38a72cee316b0
2018-10-03 02:44:47 -07:00
Sravan Kumar Kairam
26d471ec56 qcacmn: Take peer ref count and dec it after using
Currently peer reference is used with out taking any ref count.
In parallel context execution on different core peer reference may
be cleaned up in peer unmap event. So take ref count while using
the peer reference and decrement after done with it.

Change-Id: I02ca172cbdc4309fabd3bbbad00940826662bbd3
CRs-Fixed: 2301963
2018-09-27 20:24:36 -07:00
Amir Patel
3217ade780 qcacmn: For Rx multicast/bcast stats, make mcast as superset
make it inline with TX, make multicast stats to
include bcast packets also

CRs-Fixed: 2298834
Change-Id: Id30af0a6ddd784b268b9707ea2df1bcd255dd2cf
2018-09-12 10:23:30 -07:00
sumedh baikady
faadbb6cd0 qcacmn: Handle addba req with incompatible buffersize
In HKv1 HW there is a buffersize setting per peer, hence
once we set buffersize we have to stick to this for all
subsequent requests for all tids. If buffersize in Addba
request is more than first session's buffersize, we restrict
buffersize to old value, else we send respond with new size
and send delba to previous sessions not compatible with new
buffersize

Change-Id: Ia71d994ee06ca7b37d93273f5fa69547f816dd20
Crs-fixed: 2247816
2018-09-10 04:25:29 -07:00
Jinwei Chen
a1f53043bb qcacmn: fix excessive logging when RX invalid peer data
To avoid excessive logging to console, control the log rate when
RX data peer is invalid in function dp_rx_err_deliver, use API
QDF_TRACE_ERROR_RL instead of original QDF_TRACE.

CRs-Fixed: 2300774
Change-Id: If1bf3fd93801e0ef37c7fdb1a32cda16aa429464
2018-09-04 21:15:23 -07:00
Balamurugan Mahalingam
3715aa4dd6 qcacmn: [2/2] Support both qca8074v1 and qca8074v2 from hal
Pass hal_soc handle to hal function calls to invoke appropriate
target specific hal APIs

Change-Id: I1d646875508cab9b2ec2af55441cbece36a020cd
2018-09-04 11:53:38 -07:00
Nandha Kishore Easwaran
e03102f60d qcacmn: Remove DP_INTR_POLL flag
Remove DP_INTR_POLL FLAG as polling is now handled runtime using
hif_is_polled_mode_enabled. This is needed as 8074 works on interrupts
whereas 6290 is still working on polling mode

Change-Id: I0e7fdc338d462735dc216c929b1b5a99dc984435
2018-09-03 05:11:19 -07:00
sumedh baikady
df4a57cd31 qcacmn: Handle 2k exception and rate limit delba
Upon receiving 2k jump exception, send delba
and track delba tx status and retries.

Change-Id: Ida35256233869dfa390c40030c9296b9c48481ce
Crs-fixed: 2239856
2018-08-20 01:36:58 -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
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
Balamurugan Mahalingam
d0159640ea qcacmn: Separate hal for qca6290 and qca8074
Create separate individual hal_srng_table and hal register
offset in target specific source files. Create separate
functions for qca6290 and qca8074 for few hal rx tx
functions as the macro value differs between the chipsets.

Assign target specific hal tx, rx ops as part of hal_attach
and call respective hal tx, rx ops through callbacks.

Change-Id: Ibbf490c678c39fdd9d54191aad7aaec786db30ec
2018-07-21 00:03:20 -07:00
Akshay Kosigi
1a9c6d1d4c qcacmn: Rename osif_pdev and os_if_vdev in dp_pdev and osif_dev
structures

Rename osif_pdev to ctrl_pdev and os_if_vdev to ctrl_vdev in dp_pdev and
osif_dev structures respectively which are
pointing to objmgr_pdev and objmgr_vdev structures to maintain
uniformity

Change-Id: Ida95a1a90ea74513573f00c652338baee3df897a
CRs-Fixed: 2241362
2018-07-09 02:02:23 -07:00
Pramod Simha
21e69f5fe2 qcacmn: Handle reinjected pkts in REO null q execption
Prevent setting of nbuf length when it's non linear
i.e. contains an extension list. This happens when a reinjected
defragmented packet encounters a NULL q exception.

Change-Id: I937b1bf9e1461edd89dec62a9c9e17b8c3b9315f
CRs-Fixed: 2256075
2018-07-05 12:44:12 -07:00
Pramod Simha
366c1e01e6 qcacmn: Add WAR for fragmented TKIP MIC error
HW wrongly calculates MIC for the last fragment of TKIP
encrypted packets due to which this packet ends up on WBM
execption ring. Add code to handle the last fragment
in WBM execption ring.

Change-Id: I2dea5b3fbcb48036435e26f32f4641e7a0840bcd
CRs-Fixed: 2214749
2018-07-02 16:09:01 -07:00
Sravan Kumar Kairam
76fb31df31 qcacmn: Reduce logging in REO NULL queue desc error case
Excessive logging to console in dp_rx_null_q_desc_handle which
executes in soft irq context is leading to scheduler watch dog bite.
Reduce the severity of the logs to prevent flooding to the console.

Change-Id: I7cced611be6f59d31d315f797fe95ea465658009
CRs-fixed: 2242652
2018-06-14 18:35:29 -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
Tallapragada Kalyan
bc62989ce4 qcacmn: Handle NULL objects properly
handle qdf_nbuf_unshare failure cases and NULL peer
in pn_error handler properly.

Change-Id: I9d271bed512a7e84a16d2b6c5b34f13235fc54e9
CRs-Fixed: 2221457
2018-05-11 16:18:10 -07:00
jiad
c26dfc85f4 qcacmn: Fix return buffer manager for REO error ring
Return buffer manager for error packets has been changed
from HAL_RX_BUF_RBM_SW3_BM to HAL_RX_BUF_RBM_SW1_BM.

Fix is to use DP_WBM2SW_RBM to check correct rbm.

Change-Id: Ib5ffe7161f85fe6a374f16a06a1f6f4f701abe0b
CRs-Fixed: 2231571
2018-05-07 09:14:39 -07:00
Ruchi, Agrawal
2755048d7d qcacmn: Remove NAWDS Rx Drop Count length counter
Remove NAWDS Rx Drop Count as it is not required,
drop packets in rx where length is not
available.

Change-Id: Ib4b41eefe88410137c3845090783ee43adb9147c
CRs-Fixed: 2191474
2018-05-07 07:38:53 -07:00
Tallapragada Kalyan
70539512de qcacmn: chain nbufs using phy_ppdu_id for peer invalid case
nbufs received on wbm_release ring were chained based on
first_msdu and last_msdu bits if the peer is invalid for these
frames, but these fields in the rx tlv header were in-correct as
hardware does not decap these msdu's.
Based on inputs from firmware we now changed this logic to
using phy_ppdu_id field from the rx_mpdu_start tlv & rx_attention tlv.

Change-Id: Ifc7faa2d1b0585bcc226e5cb2045fcb29d152273
2018-05-01 21:37:40 -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
psimha
2bcdb546e5 qcacmn: Dump TLVs before freeing nbuf
Call dump packet TLVs API before freeing the nbuf containing the TLVs

Change-Id: I6d27de4d3331cbf7bd45d1d2b1ba5122f25b9f24
CRs-Fixed: 2213769
2018-03-30 13:30:48 -07:00
Gurumoorthi Gnanasambandhan
8387311409 qcacmn: Handle invalid peer after deauth
Receiving HAL_RXDMA_ERR_UNENCRYPTED instead
of REO null desc exception for invalid peer.
Handle invalid peer in HAL_RXDMA_ERR_UNENCRYPTED
path also.

Change-Id: Ibb01ab7f23648bca15c86553ec53afa5fb181ad6
2018-03-28 20:01:46 -07:00
Manjunathappa Prakash
d9ce350f01 qcacmn: Initialize and reap both 2.4GHz and 5GHz MACs
Initialize MAC1 along with MAC0. 2.4GHz monitor mode operates on
MAC1 so initialize MAC1 and reap both MAC0 and MAC1.

Change-Id: Id281def37d460b224f5f571893266f193846fd0c
CRs-Fixed: 2176848
2018-03-20 15:54:58 -07:00
Nandha Kishore Easwaran
3053deedfa qcacmn: Avoid mcast check in qwrap isolation mode
Donot perform mcast echo check in case of qwrap isolation mode.
In qwrap isolation mode, packets from wired station reaches the wireless
station via the rootap. Thus we need to allow loopback packets in qwrap
isolation mode.
Also add a configuration to set isolation mode.

Change-Id: If4a63abd477596f6b48c6cf9b6e7e5bd84ec95c0
CRs-fixed: 2204033
2018-03-20 05:59:09 -07:00
Tallapragada Kalyan
084a46d276 qcacmn: memory leak in invalid peer handler
We need to free the chain of nbufs associated to
an a-msdu if its last msdu is not received and the one
received belongs to a new a-amsdu

Change-Id: Id90e58306650ad885caa79271e81de3bf81ee5bd
2018-03-16 03:36:11 -07:00
Pamidipati, Vijay
d3478efb89 qcacmn: Add CDP interface for attach/detach of extended DP
Add APIs to be used by extended DP modules to attach/detach
their respective handles with Core DP module.

Change-Id: I63cf0883f7462a11b49666bda697c7e872d7b925
2018-02-15 14:10:53 -08:00
syed touqeer pasha
4ffe1c5a1b qcacmn: Memory leakage with WiFi traffic
The buffer was not being freed after invalid peer handler.
Error are handled and returned but buffer free was not taken care.

Change-Id: I100cdc27e6ca1af3dde7ce6561f5dfb83b87127f
2018-02-15 13:24:02 -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
Pranita Solanke
a5a3ae721e qcacmn: Add support for Tx and RX Broadcast Packets
Add counters to display the broadcast packets on Tx and Rx side

Change-Id: I85bea07b83d34dc15b185297e7ec63208d8ab8e8
2018-01-30 05:39:04 -08:00
psimha
fc2f91b86a qcacmn: Add RX defrag timeout handler
Add tid to the defrag waitlist & timeout if further fragments are not
received.

Change-Id: Iff2d2c23fe796cf70bcc6aa43ab02a308a33ee9f
CRs-Fixed: 2174750
2018-01-23 22:29:16 -08:00
chenguo
d70b7d958d qcacmn: Fix memory leak in rx_wbm_error_process
The nbuf is not freed for all possible branches in rx_wbm_error_pr
cess function. Add fix to ensure the nbuf free for all conditions.

CRs-Fixed: 2171899
Change-Id: I8e40fc7dc5afb0be0257244e1e704a0200ffacc0
2018-01-17 11:00:37 -08:00
Gurumoorthi Gnanasambandhan
306de84f27 qcacmn: Add mic error and decrypt error stats
Add mic error and decrypt error stats for Hawkeye

Change-Id: Id7f9b7bd47b4e33ead5493f92a517fbe0ee718af
CRs-Fixed: 2156676
2018-01-13 01:28:25 -08:00
Soumya Bhat
d4ad6afa37 qcacmn: Fix Rx pkt len in stats
Fix packet length updated in data path RX stats

Change-Id: I136901a526441f55361f3d7079a03608188996dc
2018-01-09 06:12:46 -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
Tallapragada Kalyan
9403463db3 qcacmn: refactor wbm_err_process function
In wbm_err_process function we are releaseing the sw rx
descriptors at the end and we are calling replenish after
we processed all the pkts in wbm_release ring. FW team said
that the re-fill ring is empty for high throughput scenarios.
To avoid re-fill ring being empty replenish buffers
first and then process the nbufs later. Also free any invalid
peer MSDUs during pdev detach.

Change-Id: I3e1088a3df3658965ffb31e0e0420a37203ba70e
2017-12-20 21:28:02 -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
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
jiad
9dee72a40c qcacmn: fix invalid vdev for group tkip mic error
In tkip mic error handler, addr1 (RA) is used to find vdev.
This is fine for unicast tkip mic error. But for group tkip
mic error, addr1 will be group address thus vdev will not
be correctly returned.

Fix is to use sw_peer_id in rx_mpdu_start tlv to find peer.
And use peer to find corresponding vdev and pdev.

Change-Id: I1e9e461318e25184ef7113132adaa7fe7853924d
CRs-Fixed: 2157532
2017-12-13 05:40:24 -08:00
Tallapragada Kalyan
c5ac638d51 qcacmn: Save first msdu and last msdu flags in NULL queue handler
We need to save the first msdu and last msdu flags in nbuf cb
so we can do WDS source port learning only for the first msdu
even in the null_q_handler. Without this fix we observed traffic
stops when WMM is disabled.

Change-Id: Ic7870354519ebebb8a5025b3e6c9741064686199
2017-12-12 03:24:38 -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
Manjunathappa Prakash
e23acaf21e qcacmn: Setup RXDMA to software Ring for WMAC1
Setup RxDMA to software ring of both MACs, required for
DBS MCC case.

Change-Id: I1a094c1fafe39a2a41e8867c82c1236c4b9b6593
CRs-Fixed: 2135851
2017-11-30 23:40:37 -08:00
Ruchi, Agrawal
bd894b3bb9 qcacmn: NAWDS multicast issue CR2130039
Multicast frames in NAWDS mode causing flood of packets between the
nawds enabled AP's due to continuous sending of mutlicast frames received
from  another AP and vicevera.Resolved the issues by droppping the 3
address Multicast frames and 4 address multicast frames with sa_peer
same as tx_peer.

Change-Id: I5edbcb060720510eb6ea5f5ffd46402535ba6748
CRs-Fixed: 2130039
2017-11-27 03:34:02 -08:00