Commit Graph

287 Commits

Author SHA1 Message Date
Akshay Kosigi
0bca9fb200 qcacmn: Change to remove void pointer usage for HAL SRNG
Add code to remove void pointer usage for hal_srng
and use opaque pointer dp_hal_ring_t instead.

Change-Id: I6907f7376d7fe3c9180b8795bd96f49fead2ec64
CRs-Fixed: 2484404
2019-07-27 13:42:41 -07:00
Akshay Kosigi
c74162c269 qcacmn: Add code to remove void pointer usage
Add code to use cdp_vdev instead of void pointer for
API dp_tx_send_exception and dp_tx_send_mesh

Change-Id: I63ca5a62c2a8cd6feb906181702888814650dfce
CRs-Fixed: 2480836
2019-07-27 13:42:24 -07:00
Shashikala Prabhu
ae2a8a6d88 qcacmn: Fix compilation errors for mesh mode feature disable
Fix compilation errors for mesh mode feature disable.

Change-Id: I8dfb401791109099a84d9c40417afddc9be6c7c7
CRs-Fixed: 2495095
2019-07-24 21:43:32 -07:00
Ankit Kumar
0ead45c2d7 qcacmn: Call log handler in case of HTT command/event
htt_command_record, htt_event_record, htt_wbm_event_record
function is used to log command,event, wbm event to
in-memory data-structure.
We call these function from htt path.

Change-Id: Ib3e18b895485c84f0010f8c3ba95c2da85b00bde
CRs-Fixed: 2428742
2019-07-09 18:51:21 -07:00
Prathyusha Guduri
1ad9ff9026 qcacmn: Correct tx_encap_type check
In exception path correct tx_encap_type check

Change-Id: I777202f593d4f37b2d51f5c4c9d6cd3e183e911a
2019-07-03 08:56:17 -07:00
Chaitanya Kiran Godavarthi
8c880d3fd2 qcacmn: Handle AP and STA Tx stats separately
AP and STA stats need to be handled separately.

Change-Id: I105856d6d4ee39a116966eb3ff47775b54f08ef4
2019-07-01 22:30:58 -07:00
Rakesh Pillai
2529ae1c8a qcacmn: Add event history logs for datapath
Add support to log the important events in
datapath, which will help in debugging the
datapath issues.

IRQ handler, Napi poll and srng access start/end
are the events which are currently logged.

CRs-Fixed: 2457854
Change-Id: Iba105b0e79443b670a01a929f999f94e00ea92f2
2019-06-17 10:23:01 -07:00
Tallapragada Kalyan
f3af8bb319 qcacmn: unmap raw mode nbufs in failure cases
currently we are not unmapping the nbuf which was
already mapped in dp_tx_raw_prepare in failure cases
We always need to unmap and free the nbuf if its mapped.

Change-Id: Ia5e6a31a7aac356a934ff2496d0542039bc3ece7
CRs-Fixed: 2462518
2019-06-14 18:19:45 -07:00
Amir Patel
5dc47f56dc qcacmn: Move multicast enhancement feature out of common code
Move WIN specific multicast enhancement feature API/data
structure outside common code

Change-Id: I35b10d61bd969a4ab6a864a55dd215049981c0c9
2019-06-07 03:23:56 -07:00
Ankit Kumar
2972a24c55 qcacmn: Ignore raw frame if is not of type Data
Non raw traffic gets enqueued to VAP in raw mode
and incorrect fc.type causes HW fault.
Lets proceed only if raw frame is of type data.

Change-Id: I9f0d608cd1b319feb9af642969b258aab813645f
CRs-Fixed: 2434391
2019-06-04 02:42:23 -07:00
Varsha Mishra
1f4cfb6c58 qcacmn: Fix tx completion and rx stats per wbm/reo ring
Tx completion stats should be counted per wbm ring on tx completion
and not globally. Similarly, rx stats should be counter per reo ring.
Change-Id: I1e4af0d38b23e60de78ca03316861db08ff0811a
2019-05-31 07:40:18 -07:00
Varsha Mishra
27c5bd3193 qcacmn: Handle tx_sniffer pakcets
Send tx_sniffer to firmware and handle ppdu completions accordingly.

Change-Id: Id19a8cba4fdcad88bca6ade8c30a587c2da26d19
2019-05-29 16:47:01 -07:00
Amir Patel
cb99026ade qcacmn: Move WDS feature out of common code
Move WDS feature specific APIs out of common code
as these features are WIN specific. Keep the usage inside
common code under feature specific flags.

Change-Id: Id907a5e22c27fc47e8314449e154525684a27e85
2019-05-29 11:08:21 -07:00
Chaithanya Garrepalli
ab234e56f6 qcacmn: Add Cached Descriptor support for DP SRNGs
Add support to configure any HAL SRNG descriptor to
be allocated from cached memory area. This is to
optimize of CPU cycles spent on uncached
memory accesses. Also added prefetch of cached
descriptors

Change-Id: I2544e8596d48e2f5549bf687a764c16d73397545
CRs-fixed: 2267945
2019-05-29 11:08:12 -07:00
Sravan Kumar Kairam
9d6aceacb4 qcacmn: Retain the correct file copyright years
As part of Change-Id: I0dc410ae2e7c9df58ef53e3f20ca7979d086659e
for file dp_tx.c copyright years changed wrongly. So retain the
original copyright years.

Change-Id: Ib3e918744183bc59250590bc33dc7de75b1c38fb
CRs-Fixed: 2451733
2019-05-21 06:14:25 -07:00
Chaithanya Garrepalli
ef40fec41d Revert "qcacmn: Flush ME desc while mcast enhancement disable"
This reverts Change-Id: Ieeaab082d09135b4c803d68041ebf9b4bf7bb144

Change-Id: I4d4b07ae357cffea24c2975445120df79cbddc0d
CRs-fixed: 2444484
2019-05-20 16:55:49 -07:00
Pamidipati, Vijay
480c931d7e qcacmn: Raw mode AMSDU check
Add check for AMSDU for raw mode HW WAR

Change-Id: I4c6bfbed9f01c1d28a9e7ab75a0181d1d18635e6
CRs-Fixed: 2266916
2019-05-20 13:40:51 -07:00
Jinwei Chen
79b4fc80bf qcacmn: Fix TX Desc invalid accessing when process TX completion
In some corner case, host has done Vdev destroy and TX desc flush
since there is pending outstanding TX data on this vdev, but later
FW/HW still indicate the TX completion to host and which likely
these TX completion get delayed, conflict happened due to same TX
Desc accessing.

To fix it:
(1) Only reset TX desc Vdev to NULL in dp_tx_vdev_detach().
(2) Do more enhancement in dp_tx_comp_handler() to avoid
    invalid Vdev accessing.
(3) Do TX desc flush in dp_tx_pdev_detach().

Change-Id: I44cce9451e4f07fed6e21a9cd3fc0eaefa3d54c2
CRs-Fixed: 2441455
2019-05-20 13:40:48 -07:00
Pranita Solanke
05862964ab qcacmn: Identify WIN/MCC specific features
Identify the WIN/MCC specific features. Move the features under feature
specific flags. Get rid of WIN/MCC specific code.

Change-Id: Iaf4e5befd7d574a20bea5c078201adbeac3b762c
2019-05-20 09:58:47 -07:00
Chaitanya Kiran Godavarthi
70aeda1cdd qcacmn: Handle BSS peer in STA mode
1. Set BSS peer for AP during peer-create and for STA in peer-map handler
2. Set Self peer in STA mode
3. Avoid tid cleanup in STA mode
4. Remove redundant selfmac checks in Rx
5. In MEC event handler add a check to ignore MEC events
    when STA is not connected.

Change-Id: I2a34b4742d9dedaa0709c1f4c87f3a06b794f36b
2019-05-16 07:45:55 -07:00
Mohit Khanna
e5a6e94464 qcacmn: Restrict RX softirq poll times
The following changes are made

-Yield dp_rx_process if poll time exceeds
-Yield dp_tx_comp_handler if poll time exceeds
-Interrupt statistics to track various interrupt contexts and
 corresponding interrupt masks
-Add poll times histogram buckets to NAPI stats

Change-Id: I8c7a6bbbb97c7b3dd1dde6ac3a97113c433086a2
CRs-Fixed: 2423879
2019-05-14 18:39:59 -07:00
nobelj
debe2b3b9c qcacmn: support enhance TX capture
support TX capture mode to deliver msdu along with meta data.

Change-Id: Ic84416cc4892e37bfb831dada136a4ff6b615a61
2019-05-10 12:39:30 -07:00
Varsha Mishra
5827fd091d qcacmn: Set invalid tid in multicast enhancement before enqueueing
Set tid invalid before enqueuing frame to transmit classifier.
When not set to invalid, tid is not classified by HW.

Change-Id: I4fb96a010fed1e0178d7d70a83503e1dcf5f755a
2019-05-06 14:58:28 -07:00
chenguo
73c7b7c744 qcacmn: more debugging information about invaild TX release source
1) Add one counter to track the invaild TX release source
2) Capture he descriptor that caused the issue
3) Print the invalid release source

CRs-Fixed: 2380964
Change-Id: I0dc410ae2e7c9df58ef53e3f20ca7979d086659e
2019-05-04 02:07:34 -07:00
Amir Patel
ac7d9465f9 qcacmn: Update correct tx rate, rx rate and sojourn stats
Currently we are upadting sojourn stats for all tid.
but rate stats maintains stats for only data tids 0-7.
updating stats for tid value exceeding 7 is leading it to
assert.
Update correct tx rate, rx rate and sojourn stats.

Change-Id: Ib2f5791aa7b8e85aac6283c46f58ce7e821a559b
CRs-Fixed: 2428648 2429575 2429575
2019-04-24 09:30:02 -07:00
Mohit Khanna
6d22eeb468 qcacmn: Tx desc alloc: remove default wakeup action
When the status is FLOW_POOL_ACTIVE_PAUSED, all queues are expected to
be paused. Still some on the fly packet can make it to the driver. In
such a case, the function dp_tx_desc_alloc takes a default action of
WLAN_WAKE_NON_PRIORITY_QUEUE. This is incorrect, since it will wake all
non priority queues, when they should be paused.
Make default action as WLAN_NETIF_ACTION_TYPE_NONE. If this is the
action to be taken, donot call the pause_cb from dp_tx_desc_alloc.

Rate limit log levels in case dp_tx_desc_alloc fails.

Change-Id: I1ef3018e90576d2c3aaa0d10d56e9b155681271b
CRs-Fixed: 2421813
2019-04-08 22:01:47 -07:00
Ankit Kumar
14b9622193 qcacmn: Flush ME desc while mcastenhancement disable
Flushing ME descriptor while disabling mcastenhancement feature.

Change-Id: Ieeaab082d09135b4c803d68041ebf9b4bf7bb144
CRs-Fixed: 2425078
2019-04-08 04:29:16 -07:00
Sravan Kumar Kairam
d55a74c8c9 qcacmn: Register tx completion callback
At the time of dp vdev registration, register tx completion
callback so that tx completions will be called for packets
whose tx completion is requested.

Change-Id: Ic3402f41a0962111901271fc8669974dfea2eb1c
CRs-Fixed: 2416554
2019-04-06 01:54:51 -07:00
Varsha Mishra
0c201e23a3 qcacmn: Typecast address before assigning in multicast enhancement path
Not typecasting 64bit value to 16bit value before assigning is causing
corruption of nearby structure members. Typecasting this value fixes
this corruption.

Change-Id: Iddaf697eb90241f9948aeaafe7985b8c2ea63048
2019-04-05 08:37:38 -07:00
Pamidipati, Vijay
cd7fda8963 qcacmn: Remove illegal access to NBUF in Tx completion handler
In Tx completion handler, nbuf was being accessed after it was
freed in vdev detach path. Fix this by moving the access to nbuf
after NULL check for vdev.

Change-Id: I08bab01bcc2f9d2e739a3897502d2d2b96bf9f43
CRs-Fixed: 2393459
2019-03-29 00:48:01 -07:00
Srinivas Girigowda
2751b6d2b3 qcacmn: Consolidate multiple MAC_ADDR_LEN to QDF_MAC_ADDR_SIZE
Consolidate multiple (redundant) MAC_ADDR_LEN to QDF_MAC_ADDR_SIZE
CDP_MAC_ADDR_LEN
OL_TXRX_MAC_ADDR_LEN
DP_MAC_ADDR_LEN
HTT_MAC_ADDR_LEN
IEEE80211_ADDR_LEN
DEFRAG_IEEE80211_ADDR_LEN
ETHER_ADDR_LEN
HAL_MAC_ADDR_LEN
WLAN_MACADDR_LEN

CRs-Fixed: 2406591
Change-Id: I4a87f8ff556920c7b341bdbba99ec43c97b873f4
2019-03-28 16:50:32 -07:00
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