Commit Graph

274 Commits

Author SHA1 Message Date
Pamidipati, Vijay
22c79d586e qcacmn: Do not use wds_en flag for ADDR search flag update
Using wds_en flag to control ADDR search flags in Transmit Descriptor was
causing DP to wrongly use ADDRY search instead of ADDRX search
on WDS repeater for DBDC repeater and SON scenarios.

Fix this by removing the use of this flag in dp_tx_vdev_update_search_flags
API

Change-Id: Id8ca40f926d58b8267e89d30c2b54cc42b4d4182
CRs-Fixed: 2335867
2018-10-31 15:00:29 -07:00
Amir Patel
756d05e9e5 qcacmn: Replace interface of dp stats updation to upper layer
Replace ol_if interface with WDI for dp stats updation to upper layer.
Define a new CDP API to get radiostats.

CRs-Fixed: 2326789
Change-Id: Ieaee2fe18fc9a0ad0e259e36f59529fe9bc4e208
2018-10-31 13:21:28 -07:00
Pranita Solanke
0588114986 qcacmn: Maintain SG/TSO desc_cnt at pdev stats
Maintain SG/TSO desc_cnt at pdev stats instead of ingress
stats to support legacy stats and change the fw_rem counter
to cdp_pkt_info to have packets and bytes information
for legacy platforms as part of convergence effort.

Change-Id: Ib908e8d1c1d78d191418d3884f41f981ba002b54
2018-10-23 04:19:38 -07:00
Chaithanya Garrepalli
1312706807 qcacmn: use ADDR_X search for PSTA vaps in HKv2
In QWRAP mode for hawkeye v2 use DA based search
for PSTA vap

Change-Id: Icbf9f5c226ae62caefb722a7c8b735fb472d6003
CRs-Fixed: 2331853
2018-10-22 15:06:47 -07:00
Chaithanya Garrepalli
85c447c46c qcacmn: donot use mcast enhancement for broadcast packets
Avoid mcast to ucast conversion for broadcast packets

Change-Id: I72b1013c9e62dfacc00285994165f81392e33af0
CRs-fixed: 2334192
2018-10-17 05:50:42 -07:00
Pamidipati, Vijay
12e8f33fc6 qcacmn: Fix a double free issue for tx descriptor
Tx descriptors that belong to a particular vdev are released in
vdev detach path. Since DP soc is not detached yet, interrupts
are not disabled, so it is possible that host gets completions
for same tx descriptor and it tries to process it again.

Add a check for vdev in tx completion path to avoid duplicate
processing of tx descriptors

Change-Id: I5a62ef4d981dbfd0a5ca7483acf4270145d016be
2018-10-13 22:24:15 -07:00
Venkata Sharath Chandra Manchala
d18887ee9f qcacmn: Compilation fixes for SM8150 platform
1. Address out of bounds array access while
   populating mcs rates.
2. Use cdp_sec_type enum inplace of htt_sec_type
   for common code.

Change-Id: I0ae1e0acaf7422e73dc26befc9f066f3f424ec6b
CRs-Fixed: 2327153
2018-10-11 10:39:55 -07:00
Mohit Khanna
91af91fb44 qcacmn: Revert additional hif_runtime_pm_put call
hif_runtime_p_put was mistakenly added at two places on the
TX completion path due to a merge issue. Revert the additional call at
dp_tx_comp_handler.

Change-Id: I26a0a9188a490d60e050adbd7ba04e88e213c0b9
CRs-Fixed: 2329466
2018-10-09 21:35:49 -07:00
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
Tallapragada Kalyan
e61f64cc4c qcacmn: Retrieve MAC address from nbuf for MEC EVENT
because of a HW issue we no longer get the MAC address in
the MEC event notifier, As a WAR we now will be reading the
source MAC address from the nbuf data instead of status word
CRs-Fixed: 2324772

Change-Id: Iab8dc346b9a2108e4cb107fb61d242700a084223
2018-10-07 13:59:01 -07:00
Tallapragada Kalyan
5e3a39c8d3 qcacmn: add support for Secondary HMWDS ast entry
add support for Secondary HMWDS ast entry

Change-Id: Ibf77659cbc2d7e2b536736d89e747549e269e68c
CRs-Fixed: 2312270
2018-10-06 08:16:22 -07:00
Amir Patel
12550f6315 qcacmn: Host DP changes for TQM bypass mode
Add support to process HTT completions sent by FW for multicast/broadcast
frames sent in TQM bypass

Change-Id: If3fca3384156ce93f719bf15ef14b98ea4974f92
CRs-Fixed: 2301453
2018-10-04 01:51:56 -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
Chaithanya Garrepalli
1f64b2453e qcacmn: in tx path set the lmac_id from wlancfg
in tx path set the lmac_id in the tx descriptor
from wlancfg

Change-Id: Ib7f355983142564500a20daa1f0eef41808df449
CRs-fixed: 2320597
2018-09-24 13:02:13 -07:00
Venkateswara Swamy Bandaru
41ebb3396b qcacmn: Fix kernel panic issue in mesh tx path
Add check for headroom before pushing the head for sufficient headroom
to prevent kernel panic in skb push function.

Change-Id: Iafc963f68b35564c7f291e9d91d933b3e31d7daa
CRs-Fixed: 2315569
2018-09-21 02:06:43 -07:00
Pramod Simha
e3d4d25f62 qcacmn: Initialize local variable
Initialize local variable to zero to prevent compilation
warning for KASAN enabled builds.

Change-Id: I22a6115800ea31e0fe0c86204722664355b53947
CRs-Fixed: 2310542
2018-09-20 22:24:30 -07:00
Chaithanya Garrepalli
9c73dc02e9 qcacmn: set tx search type appropriately
Set search type only when peer map v2 messaging is enabled
as we will have the search index (AST hash) only when v2 is
enabled

Change-Id: I6c1ab4a4d7519278755d93537a8430755d708a3c
CRs-fixed: 2316418
2018-09-18 07:50:20 -07:00
Ruchi, Agrawal
fea1a84116 qcacmn: DSCP-TID map change for second hardware
Change to added entries for 48 DSCP TID  map
for second version of hardware.

Change-Id: Ie4aa0e27616e2f03b012e19d025444c8c53fe341
CRs-Fixed: 2315305
2018-09-18 07:50:15 -07:00
Chaithanya Garrepalli
2467ed1445 qcacmn: avoid wds source port learning for STA in HKV2
Changes to avoid WDS source port learning in STA mode
if ast override feature is supported by HW

Change-Id: I248c8815429e7417dcf3f451912ee5f037af9c25
2018-09-15 21:21:23 -07:00
Venkateswara Swamy Bandaru
6ca4112f46 qcacmn: Remove SW WAR in rawmode for qca8074v2 target
Remove SW WAR in rawmode for qca8074v2 target. Added flag in
vdev structure which will be filled during vdev attach time.
Based on the flag war is applied.

Change-Id: Id91d6359b0a575b1f2b1222e56ac93a0e08a3c73
CRs-Fixed: 2296584
2018-09-05 06:47:16 -07:00
Balamurugan Mahalingam
db12181289 qcacmn: Fix pointer dereference before null check
vdev getting dereferenced before null check. Fixed the same

Change-Id: If2b701fe8e59a67352aba4d37d4cecee1067c30b
2018-09-04 11:53:40 -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
Ruchi, Agrawal
2cbca3b050 qcacmn: msdu time lag update for tx completion
msdu time from hwenqueue to tx completion as part of
msdu stats.

Change-Id: I71ba6f1dec0505e4fa09b5fb123f21912b08b9c5
CRs-Fixed: 2286774
2018-08-31 00:51:20 -07:00
Yue Ma
442d36e967 qcacmn: Tie PM usage count to descriptor allocation and free
Tie increment and decrement PM usage count to descriptor allocation
and free instead of HW enqueue and TX completion since allocation
and free will be the most accurate places to track if the packet
has been sent or not.

Change-Id: Ia61c5bb26386d20590e87149d0fe88dba02d0fb7
CRs-fixed: 2302214
2018-08-28 20:10:48 -07:00
jiad
f9cb8344c4 qcacmn: Fix dptrace dump for TX path
When running dptrace dump on Napier, observed that eapol TX counters
are not incremented. Reason is that in Lithium DP nbuf->cb is reset
before dp_tx_trace_pkt() is invoked while dptrace relies on nbuf->cb.

Fix is to move qdf_nbuf_reset_ctxt() after dp_tx_trace_pkt() so that
TX counters that rely on nbuf->cb can be captured.

Change-Id: I5048113e66e8742b8f1f321c07494a6dcf84256a
CRs-Fixed: 2290500
2018-08-27 10:50:26 -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
Ruchi, Agrawal
c3e68bc67d qcacmn: desc na change
Part of base changes, move due to dependency on
other changes.

Change-Id: I7d640d2976c4c2c2c156a5223683dc4b28559577
CRs-Fixed: 2283286
2018-07-27 14:25:16 -07:00
Amir Patel
0291157bef qcacmn: Add new members for DP componentization
To consolidate the stats spread over across UMAC, OL_IF
layer and process at respective datapaths depending
on platforms.

Change-Id: I87d02c767a309e7aeef88a124567259debc1bba5
CRs-Fixed: 2283286
2018-07-27 14:25:11 -07:00
Soumya Bhat
14b6f26e71 qcacmn: Add multicast address in tx_capture header
In existing code peer's mac address is populated in tx_capture
receiver address field. In case of multicast and broadcast packets
the packets is transmitted on BSS peer so in case of broadcast/multicast
packets the transmitter address is same as receiver address in tx_capture
header.

Add change to populate receiver address field with ethernet destination
address in case of bss peer is tranmit status.

Change-Id: Ie9495d51391454313b1697ecedb8e8dec0459565
CRs-Fixed: 2261473
2018-07-25 01:24:31 -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
Venkata Sharath Chandra Manchala
faa0d8b30a qcacmn: Update statistics counters
Account for tx.success and tx.comp_pkt stats counters
at peer level and propagate them to pdev level.
NSS stats need to be updated for all packets.

Change-Id: I18de95217690c9234060253671e0d5e1ef295e2a
CRs-Fixed: 2270816
2018-07-18 00:18:15 -07:00
Mohit Khanna
163c3170a1 qcacmn: fix dptrace for data packets
Enable tracing for TX/RX data packets
Donot print stats with 0 value

Change-Id: I4bab6537494c4ee0fe290e3778fb5662bf5abd66
CRs-Fixed: 2269193
2018-07-13 02:58:46 -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
chenguo
ee42a3202b qcacmn: Reorganize skb unmap, free and tx_desc free logic for TSO
In TX completion, we need to handle TSO frames release in below
sequence: Unmap skb -> free skb -> free this tx desc. Thus separate
skb unmapping and free tx descriptors for TSO logic.

CRs-Fixed: 2250960
Change-Id: I6979b4ec64e3f51bc6d8e485e843e2ab35eee86e
2018-06-27 03:44:53 -07:00
Yun Park
aadee8cc5a qcacmn: Add ol_txrx_completion_fp in ol_txrx_ops
Add ol_txrx_completion_fp in ol_txrx_ops to provide support for
callback during TX completion.

Change-Id: I7af478636badd8f8562460cefaf5db56633df8e9
CRs-Fixed: 2253569
2018-06-21 13:52:22 -07:00
Jinwei Chen
fc76555f2e qcacmn: add the tx_desc id checking
If host receive the tx completion with invalid tx_desc ID,
panic happened. add the tx desc ID check both on dp_tx_hw_enqueue
and dp_tx_comp_handler to know that how this invalid tx_desc ID
is generated by which reason of below two:
1. host tx desc is corrupted and fill in invalid id to TCL_DATA_CMD.
2. FW or HW generate invalid TX compl to host.

Change-Id: Id2b070697199b19f83e5d9fd89eadcfe0423d617
CRs-Fixed: 2243455
2018-06-14 11:47:07 -07:00
Ruchi, Agrawal
bd22540e0d qcacmn: CCE Classify only for non encrypted packets
Enable raw mode cce classification only for packets for
which WEP bit is not set

Change-Id: I5249f197d5a3e00c73c6866011ba5f3a36868c0f
CRs-Fixed: 2132317
2018-05-21 01:37:55 -07:00
Jeff Johnson
d087edef2e qcacmn: Fix typo "fuction"
Replace typo "fuction" with correct spelling "function".

Change-Id: I32a3ec69c161e16b694a856db86448103900c759
CRs-Fixed: 2238309
2018-05-17 00:46:59 -07:00
Aditya Sathish
7131fc8147 qcacmn: Fix for TX Unicast Packet Count Statistic
Fix for obtaining the correct value for the total unicast packets
transmitted.

Change-Id: I06071846f1dc3610cb8de1e73d7abcd869f2b172
CRs-Fixed: 2237301
2018-05-16 03:57:51 -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
Venkateswara Swamy Bandaru
97ca7e92fa qcacmn: Fix htt included bit set for mesh exception packets
There may be race condition in setting htt included when tx desciptors
getting prepared in two cpu cores. This is fixed by not setting the
bit globally.

Change-Id: I861cb2f0cf51a5a14a8fb6fbc6b64b00b82af675
CRs-Fixed: 2229350
2018-05-08 04:15:46 -07:00
Neil Zhao
488763687b qcacmn: fix tid overwrite/save FRs for HK
Fix tid overwrite and save features' brokage for HK

Change-Id: I71985a73f65ad4ddf79ae9a2efb00c5de12b9cd8
2018-04-26 16:02:11 -07:00
Ruchi, Agrawal
1ca70f07c8 qcacmn: Resolve KW issues
Add NULL check for nbuf_clone after calling
qdf_nbuf_clone

Change-Id: Ibffff984b0ace3c5ea19fb72f0e56e041eba0b14
CRs-Fixed: 2209137
2018-04-09 13:35:24 -07:00
Venkateswara Swamy Bandaru
7fc11f76a3 qcacmn: Fix htt_included bit set for tx frames
Set htt_included bit for frames that have only valid htt header.

Change-Id: I481282c74ca7d247dece25aedf5f95f641260bda
CRs-Fixed: 2206348
2018-03-30 04:04:36 -07:00
Soumya Bhat
33a8822118 qcacmn: Fix use after free for vdev
In existing code vdev is getting referenced after being
freed, during pdev detach while releasing tx descriptors.

Add code to drain tx descriptiors during vdev detach.

Change-Id: I2ea447d5d0a5be6539fddacb4b1c0b5f4601a71e
CRs-Fixed: 2203070
2018-03-23 07:20:04 -07:00
Tallapragada Kalyan
71c46b9357 qcacmn: WDS and AST specific code under different compile time flag
Based on requirement from customer we have re-organised
AST specific and WDS specific code under different compile
time flags.

Change-Id: Icbb0dff7c2e7a2239d82c296468fa8d3e4f53021
2018-03-20 05:59:07 -07:00
Anish Nataraj
5034701e13 qcacmn: Assign ldpc from ppdu info and non-amsdu counter increment
Update ppdu rx stats ldpc value into cdp rx indication structure
Also, increment non-amsdu counter for peer/vdev/pdev level stats

Change-Id: I252b71756db7019c5a6d60eeebf9f0c782266e34
2018-03-20 02:10:09 -07:00
Soumya Bhat
2f54de20b0 qcacmn: Enable promiscuous mode for M-copy feature
In existing code M-copy feature was designed to provide
first 100bytes of payload of self BSS packets.

Add change to enable promiscusous mode and provide metadata and
100bytes of payload of all the packets received by the radio.

Change-Id: I5b1f168028a4fba3a24e9d2ccd0d68c246661d76
2018-03-09 02:03:10 -08:00