Commit Graph

306 Commits

Author SHA1 Message Date
Jeff Johnson
a8edf330f0 qcacmn: dp: Replace explicit comparison to NULL
Per the Linux Kernel coding style, as enforced by the kernel
checkpatch script, pointers should not be explicitly compared to
NULL. Therefore within dp replace any such comparisons with logical
operations performed on the pointer itself.

Change-Id: I61f3adab1208682d36235421f44a048e35df346d
CRs-Fixed: 2418258
2019-03-27 06:10:00 -07:00
Amir Patel
468bded892 qcacmn: Add RDK statistics changes for Hawkeye
Add RDK statistics changes to collect below stats
a. Tx rate statistics
b. Tx sojourn statistics
c. Rx rate statistics

CRs-Fixed: 2416141
Change-Id: I0c8127cd387b7665a76847f4125977bbb8c5a57a
2019-03-21 23:04:43 -07:00
Shashikala Prabhu
550e69c726 qcacmn: Restrict the tx descriptors for low mem config
For low mem config, use user configured max tx descriptors to limit the
allocation of software tx descriptors.

Use dp_txrx_pflow_update_pdev_params function to print stats and to update
pdev param.

Change-Id: I8fa6f0bb8841de68e8dc205ffcb0fde264f1b0e0
CRs-Fixed: 2414452
2019-03-15 23:15:06 -07:00
Dustin Brown
b5b21cac42 qcacmn: Remove qdf_*_outline() APIs
Several qdf_*_outline() APIs exist which are straight aliases to their
regular qdf_*() counterparts. Remove them, and update any callers to use
the regular APIs instead.

Change-Id: Ibe6e9cced521b93061e89690ab817ceafe49a469
CRs-Fixed: 2408267
2019-03-12 13:58:27 -07:00
Varsha Mishra
a331e6e55f qcacmn: Implement delay VOW stats for hawkeye
Delay counters per TID have been implemented for following types:
1. Linux stack to hw enqueue delay
2. HW enqueue delay to tx completion delay
3. TX interframe delay
4. RX interframe delay
5. RX frame delay from ring reap to networking stack

Change-Id: I836596cbd878a43955c18b4981cb5b7b43d4df5e
2019-03-12 06:10:05 -07:00
Varsha Mishra
18281794c8 qcacmn: Implement VOW stats for hawkeye
VOW stats is an extension of regular stats to capture
all drops per TID. Delay counters per TID are also
included.

Change-Id: If6087f37b32cf9ae4bb405190a358ad3c9750dd2
2019-03-06 18:20:42 -08:00
Krunal Soni
c96a1167f8 qcacmn: Use dp_verbose_debug() to print msgs which come excessively
Some of the print messages in Data-path module come very excessively.
Use dp_verbose_debug() API to print them.

CRs-fixed: 2376998
Change-Id: Ibaec3751ce3cbe98492c531548e613c7d17db898
2019-03-06 12:52:07 -08:00
Srinivas Girigowda
9cf1aa027b qcacmn: Modify IEEE80211_FC0_SUBTYPE_QOS to QDF_IEEE80211_FC0_SUBTYPE_QOS
Modify IEEE80211_FC0_SUBTYPE_QOS to QDF_IEEE80211_FC0_SUBTYPE_QOS.

Change-Id: I93eb546c04798e82c7be4660d1fe127ce13dc754
CRs-Fixed: 2408226
2019-03-06 11:00:03 -08:00
Ankit Kumar
8dc0e2a679 qcacmn: Add time_latency check for tx_completion
This patch adds support to measure latency  for tx completions

Change-Id: Ifda1c2f7ffaf8276f012e7a458f6f167ad931356
2019-03-05 20:56:42 -08:00
Venkateswara Swamy Bandaru
09444a10ed qcacmn: Fix mesh non QOS frames issue
If non QOS is enabled in meta header store it in skb priority.
Issue occurred as meta header is getting over written by ext2 header
when the frame is sent to firmware.

Change-Id: I61f90dbd188b70e8960ec84c86fda9678ab21f7c
CRs-Fixed: 2400370
2019-03-02 05:12:55 -08:00
Srinivas Girigowda
03bd4b6b30 qcacmn: Replace struct ether_header with qdf_ether_header_t
Replace struct ether_header with qdf_ether_header_t.

Change-Id: I30d06dcf94e3149bf77f1f99e7a854bc9d7ae3ac
CRs-Fixed: 2404851
2019-02-26 21:18:44 -08:00
Srinivas Girigowda
99f2a29945 qcacmn: Replace ETHERTYPE_8021Q with ETHERTYPE_VLAN
Replace ETHERTYPE_8021Q with ETHERTYPE_VLAN.

CRs-Fixed: 2404839
Change-Id: I5a1f721246ae71848f259a19ee3aa0de005ea43b
2019-02-26 21:18:40 -08:00
Aditya Sathish
2f3f538531 qcacmn: Fix compilation warnings caused by dp tx debug print
Fix compilation warnings caused by dp tx debug print due to an
incorrect specifier being used for the mentioned variable.

"%d" was used instead of "%lu" for printing the output of the
sizeof operator.

Change-Id: I051a3acbb95148fa2d9fbd6db5b4ec7a6144dd99
CRs-Fixed: 2400276
2019-02-25 14:14:19 -08:00
Srinivas Girigowda
7950297868 qcacmn: Replace IEEE80211_IS_BROADCAST with QDF_IS_ADDR_BROADCAST
Replace IEEE80211_IS_BROADCAST with QDF_IS_ADDR_BROADCAST.

Change-Id: I199797ea402ee68dd0addf6698aa5ccd0ddc8f97
CRs-Fixed: 2396621
2019-02-23 16:02:59 -08:00
hangtian
fe681a5c2d qcacmn: Use qdf_mem_zero for zero initialization, dp part
Use qdf_mem_zero for zero initialization, dp part.

Change-Id: I8cd5d43b554bf355dfcff0463ba4acb6d22ba254
CRs-Fixed: 2378005
2019-02-21 01:46:39 -08:00
Jeff Johnson
6889ddf7bb qcacmn: Replace CONVERGED_TDLS_ENABLE feature flag
The CONVERGED_TDLS_ENABLE feature flag was originally introduced when
the TDLS feature was being componentized so that one could select
either the legacy implementation or the componentized implementation.
That componentization activity has concluded and the legacy
implementation no longer exists. To align with the current usage
remove all legacy TDLS code and switch to using the FEATURE_WLAN_TDLS
feature flag since that more accurately describes the code being
protected.

Change-Id: Ieef785844bd25b06604167eae2f52e39717f502f
CRs-Fixed: 2395694
2019-02-20 09:09:44 -08:00
Manjunathappa Prakash
721bd5f339 qcacmn: Add DPT for Lithium_dp Tx completion status
Log DPT for Tx completion for Lithium_dp. Do not reset nbuf->cb
as it has DPT markings.

Change-Id: I493c3e0e5f4311b90c1ec60ac3a4b44d13c06f62
CRs-Fixed: 2385743
2019-01-29 19:39:12 -08:00
Venkata Sharath Chandra Manchala
ec9a530bc0 qcacmn: Fix statistics counters
1. Account for total Tx completions received on wbm2sw release ring.
2. Avoid multiple updates to invalid peer counter on
   wbm error path handling.

Change-Id: I904208e1bd83e98598870a1f05c4b17c3fb20e2d
CRs-Fixed: 2366790
2019-01-21 17:12:47 -08:00
Chaitanya Kiran Godavarthi
b1e2bf5c79 qcacmn: KW fixes in Tx DP
Add array bound check for Tx desc pool config
Add NULL check for nbuf in case of segment frames

Change-Id: I8b547edf641a7a21823506388b2c04715cffbf21
2019-01-16 17:10:02 -08:00
phadiman
497573091a qcacmn: Add Sanity Checks
Stats are updated periodically and
are categorized to soc, pdev, and
vdev

While the stats are getting updated
and if pdev, or vdev gets detached
in the same time, the stats handlers
will deference a NULL pointer

Hence Add basic sanity checks to DP
layer for soc, pdev and vdev inside
stat handlers

Change-Id: Ic4919b9c205679e1d6e7c571c577339be65c1bad
2018-12-26 03:39:21 -08:00
Jinwei Chen
73e0dd5719 qcacmn: do dma unmap for failed tso segments
Currently there is only tso segment and tso number segment
descriptor free operation when tso preparation failed, do dma
unmap for each segment as well.

Change-Id: I9a507f27341877dc062528ce77e02970d16aa098
CRs-Fixed: 2347279
2018-12-14 12:48:43 -08:00
Jinwei Chen
b3f9d202db qcacmn: Fix SSR nbuf unmap issue
During SSR test, TX skb sent to target will not get TX completion,
so skb unmap and free is missed. later when driver is unloaded,
nbuf unmap leak is detected then panic happened.
Take care to unmap and free the corresponding skb of pending TX
descriptor during vdev detach.

Change-Id: I9f4e6443682097ec76632c96a0188ffa2c1a5fcc
CRs-Fixed: 2347770
2018-12-12 07:21:01 -08:00
chenguo
60e6dd9978 qcacmn: Add missed error handling in dp_tx_send_msdu_single
If there is anything wrong, the caller of dp_tx_send_msdu_single
will only handle skb free, but not skb unmapping. So inside of
dp_tx_send_msdu_single, it is needed to make sure unmap operation
is performed after map operation.

CRs-Fixed: 2358266
Change-Id: I6379305e84f70b5b978e9504b758c7a6ccf328ee
2018-12-11 01:43:13 -08:00
Sravan Kumar Kairam
1bffc851ac qcacmn: Reduce logging in dp_tx_comp_process_tx_status
When from control path peer is deleted, peer deletion in progress
is set in dp for that peer. So any caller tries to get the peer
using peer id the return peer reference will be NULL as deletion
is in progress. In this case during peer deletion in progress at
tx completion process status console logs are flooded with invalid
peer logs in soft irq context. This is leading to scheduler watch
dog bite. In this change reduce the severity to prevent excessive logs.

Change-Id: Ife8f9e496b81b19666ef9e36db674106111a7d43
CRs-fixed: 2357807
2018-12-09 13:05:24 -08:00
Pamidipati, Vijay
7d6957294f qcacmn: fix for nbuf leak issue
Fix a nbuf leak issue in htt tx completion path for
invalid peer frames

Change-Id: I7818bd2cfe8144e1ea8b1d43e5e5c1de929f91cc
2018-11-30 14:36:54 -08:00
Anish Nataraj
e9d4c3bf33 qcacmn: Reorganise DP init-deinit path to reuse memory
Avoid memory fragmentation that happens during
attach-detach flow.
- Reuse transmit allocated static pool memory across soc up/down.
 These memories are allocated during soc attach.
- Reuse DP source ring memory, DP soc context, DP pdev context
  across soc up/down.
- Reorganise structure members of DP soc and DP pdev so that
  we can zero out structure members across soc up/down
- Add cdp soc init/deinit and cdp pdev init/deinit that
  will be active across soc up/down

Change-Id: I5732453f617bdc16995fda916b645c41845c3ecb
2018-11-30 03:40:43 -08:00
chenguo
420a4425dc qcacmn: Fix peer ref_cnt unmatch issue in TQM bypass mode
The reference counter will be increased after using peer find by
id API. So the unreference operation must be performed whenever
the peer which is returned by this API is released. Fix one peer
ref_cnt unmatch issue in TQM bypass mode.

CRs-Fixed: 2348316
Change-Id: Icae09b351315f38d9b7521b29c0e930339c9f83a
2018-11-19 08:04:11 -08:00
phadiman
4213e9ca61 qcacmn: Separate MEC, DA and WDS Enable Flags
Add new flags for MEC and DA enable/disable
and keep it independent of WDS enable flag

Change-Id: Idb49c45ebb34a38f876dbdb293806c4e96d49b5d
CRs-Fixed: 2336332
2018-11-15 01:38:27 -08:00
Shashikala Prabhu
8f6703be71 qcacmn: Add support to override tid value
Add support to configure a specific tid for unicast packets derived from
multicast packets.

Set the user provided tid value when both multicast enhancement and
tid_override_en flag is set.

Change-Id: I770166a37c920a7e642c6649f918456846fb5f90
Acked-by: Shashikala Prabhu <pshashik@codeaurora.org>
CRs-Fixed: 2342717
2018-11-14 02:35:14 -08:00
jiad
5728624cee qcacmn: Fix misleading-indentation build error
This change fixes build errors with compiler option
-Werror=misleading-indentation.

Change-Id: I7dbafdc60f0e143c33e4abe12dfd2dbc2d7756cd
CRs-Fixed: 2346027
2018-11-12 21:23:05 -08:00
Venkata Sharath Chandra Manchala
f0b7fdb82e qcacmn: Remove excessive logging in tx path
Invalid status completions have already been accounted
in the counters. Remove error message for every
invalid status completion as it would lead to excessive logging.

Change-Id: I4af025f3a8731e8488d1d49799c65399a6cc9e37
CRs-Fixed: 2342963
2018-11-07 10:52:25 -08:00
Nandha Kishore Easwaran
800b18c640 qcacmn: Revert Retrieve MAC address from nbuf for MEC EVENT
This reverts change Iab8dc346b9a2108e4cb107fb61d242700a084223

Change-Id: I63826f31a7fc65518d19c8bce699e4ca789451c1
2018-10-31 23:04:37 -07:00
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