Graf commitů

887 Commity

Autor SHA1 Zpráva Datum
Venkata Sharath Chandra Manchala
368fb3aff9 qcacmn: Reduce the log level for fragmented packets
Reduce log level from info to debug level for
received fragmented packets in dp_rx_defrag path.

Change-Id: I0d1c7bf91e0337a56ea9e52565e0cbdf47a1772d
CRs-Fixed: 2385483
2019-01-31 19:58:39 -08:00
Sravan Kumar Kairam
deb899b182 qcacmn: Fix implicit conversion error
Fix implicit conversion from enum type QDF_STATUS to
different enum type A_STATUS.

Change-Id: I549c9284e18d73685e879c2f0bb8c54330a35bda
CRs-Fixed: 2389838
2019-01-30 21:46:28 -08:00
phadiman
ebf4cded6f qcacmn: Check for freelist in Rx Desc Pool
For some corner cases if there are no free
descriptors available in the rx desc pool
then stop processing frames

Add check for the same and break the loop
from processing further frames.

CRs-Fixed: 2380041
Change-Id: Ia5d82813df644af61d898131c2987d8d2798e8c9
2019-01-30 02:32:22 -08:00
Nandha Kishore Easwaran
f9c44ce2ad qcacmn: Move DA_war flag to SOC level
Moved DA_war flag from vdev level to soc level.
Also disable DA_war when extap is enabled.

Change-Id: I8e8b2ac7835fb8b5bcad603bd1e7d8036ef7719c
2019-01-30 00:03:13 -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
Dustin Brown
9ae2232af0 qcacmn: Don't define dp_bus_suspend/resume for WIN
dp_bus_suspend and dp_bus_resume are currently defined for both WIN and
MCL, but only used by MCL. Move their definitions such that they are
under the same #define's as their usages.

Change-Id: Idd17fa0a521f7474d481fbaf5d2c7cfd4138c774
CRs-Fixed: 2387904
2019-01-29 16:54:46 -08:00
Amir Patel
17b91788b0 qcacmn: Update vdev list and peer list access locking in below order
a. Acquire peer list lock
b. Acquire vdev list lock
y. Release vdev list lock
z. Release peer list lock

Change-Id: Ifc1e57fd1a243d909ca65421f269830d24d6b31b
CRs-Fixed: 2372947
2019-01-29 16:54:42 -08:00
Amir Patel
36a79a672c qcacmn: Fix htt ppdu tlv bitmap issue
Define two tlvs for 64-bit and 256-bit transmission window

CRs-Fixed: 2377256
Change-Id: Id11e1d3695101ef001c689d33e4546ac8a5faea6
2019-01-29 12:20:55 -08:00
Pavankumar Nandeshwar
753eed32c1 qcacmn: free the dp peers before cp peers in fw recovey case
Free the pending dp peers before cp peers in fw recovey case,
to make sure dp peers release all cp peer references they hold.

Change-Id: Ie6c7562e7214f40be895cf8a57a1aa6245d717cb
CRs-fixed: 2383984
2019-01-29 09:58:12 -08:00
phadiman
d2e88e3895 qcacmn: Reduce Log Level
Add, delete and update AST DP
functions print logs at TRACE
level

Reduce the log level from TRACE
to DEBUG to avoid ML Framework
from interpreting these logs

CRs-Fixed: 2385978

Change-Id: Ifd5c24a95e7e9f69297afff5d7a3235cfa27aaf5
2019-01-28 12:21:00 -08:00
Gurumoorthi Gnanasambandhan
e1334b3595 qcacmn: Accept EAPOL packets in uncrypted error case
rx unencrypted eapol frames are dropped with dynamic WEP on de-tunnel mode.
Accept EAPOL packets alone in uncrypted path.

Change-Id: Ie576211c3d408fd7e319fba05c9d1badaa4b4676
2019-01-28 12:20:53 -08:00
Pamidipati, Vijay
b113bbc335 qcacmn: Fix a race condition in WDS timer attach
WDS aging timer is dependent on a flag which is set in soc_cmn_setup,
but in current implementation wds_timer_attach is done from soc attach
and soc_cmn_setup is involed from pdev_attach. Fix this race condition
by moving wds_attach to soc_cmn_setup

Change-Id: Ia88201c627b434b85e56daadd0c7ab20e6ce0b3f
CRs-Fixed: 2373127
2019-01-25 15:19:06 -08:00
Chaitanya Kiran Godavarthi
f2278991a1 qcacmn: KW fixes in Rx mon DP
Move the mpdu debug prints where the mpdu is valid

Change-Id: I3ef3e9c5738776cade507a302b5e768f4cc2314f
2019-01-24 12:30:29 -08:00
nobelj
fdbe712790 qcacmn: rx_status is passed as argument to osif_rx_mon
Passing mon_rx_stats to osif_receive_monitor_80211_base as
it expect valid rs pointer on ATH_SUPPORT_NAC defined

Change-Id: I1fb4eae690b64dc2e73e4793bec13524affe5635
2019-01-24 12:30:26 -08:00
nobelj
bc064fb1b9 qcacmn: Fix transmit type double increment and RU increment
transmit type is incremented twice on update status.
RU tone need to get increment for MIMO_OFDMA and OFDMA

Change-Id: I4e83a91b7653b7452cf5605b7f8aad956c355350
2019-01-24 09:59:08 -08:00
nobelj
4e9d51f914 qcacmn: Populate MU-MIMO user pos and mu group id
populate TX OFDMA and TX MU MIMO information from
user rate tlv and display the same in fc_peer_stats.

Change-Id: If1dab15bbdf391fba00a701abd6024c420d1d8f7
2019-01-24 09:59:06 -08:00
Venkata Sharath Chandra Manchala
965035c642 qcacmn: Access soc handle after null check
Dereference soc handle after checking if soc
handle is valid.

Change-Id: Ifc409ab410b0ff41ad7d45c422f147325d7adadf
CRs-Fixed: 2382178
2019-01-22 05:06:20 -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
Chaithanya Garrepalli
65e6fc1a43 qcacmn: add flag which indicate use of monitor ring
Add a flag to indicate monitor destination being used

Change-Id: Ic89f5ad2ed918fe1d894a214416866ea88f1b96a
CRs-fixed: 2371551
2019-01-21 07:55:22 -08:00
Pamidipati, Vijay
221b3e4ab7 qcacmn: Change the assert condition for PPDU Tag processing
Fix the assert in HTT PPDU TLV processing to account for
member additions at the end of htt_ppdu_stats structures by FW
This ensures Host-FW compatibility without placing hard constraints
on timelines for fwcmn header files to be synchronized with host.

Change-Id: I9f730e5896bec916c8e4e3f0eaa06b183c62f393
2019-01-20 17:28:29 -08:00
Pavankumar Nandeshwar
2702aeeb0a qcacmn: keep objmgr_peer alive until txrx peer is freed
Make sure the objmgr_peer is not deleted before
dp peer is deleted, which will avoid the access
of already freed objmgr_peer for connected sta peers.

Change-Id: Ib931dcd0c5650fea5284e9dd53dae9e41f662c56
CRs-Fixed: 2359645
2019-01-18 21:28:50 -08:00
Vinay Adella
a06e8c8bfb qcacmn: Fix use-after-free issue in hal_srng_cleanup
hal_srng_cleanup was called from dp_srng_cleanup after the
hal_soc was freed.
Move the call to dp_srng_deinit where the memory is still
valid.

Change-Id: Ida25ee48e527b5139fc05cd85c5634e70965ccd0
CRs-Fixed: 2367332
2019-01-18 21:28:45 -08:00
Chaithanya Garrepalli
ee70a49899 qcacmn: do not process WDI event after pdev deinit
Avoid processing WDI events for a pdev after pdev deinit

Change-Id: If57082cf2cadf92ab3cf2cb9485c7546b118aa0b
CRs-fixed: 2377503
2019-01-17 10:49:27 -08:00
Tallapragada Kalyan
eff377a1d3 qcacmn: do not process duplicate descriptor frame in RX
once in a while the HW is sending a descriptor which
is already processed by host. This can be a potential HW
issue, as a WAR we are not processing such duplicate descriptors
instead increment a counter and continue with next descriptor.

Change-Id: I6c9bc6a9fb4705b42284171a32855411aa5dd73f
CRs-Fixed: 2338543
2019-01-17 10:49:24 -08:00
Chaithanya Garrepalli
9cc562c53b qcacmn: Modify CDP AST APIs to synchronize add and delete cmds to FW
Change the CDP abstraction APIs for ast entry find, add and delete
to avoid external references for ast entry in upper layers

Process the HTT v2 peer map messages which will be enabled for
nexthop ast entries and use these messages instead of WMI event
for HKv1 WAR where we have to wait for delete confirmation from
target event which is processed in control path

Change-Id: Ifa91a259c0762344deb8ab89e868fc5554d75543
CRs-fixed: 2354951
2019-01-17 02:22:24 -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
Tallapragada Kalyan
30d651d13b qcacmn: Adjust mpdu length properly for RAW MPDUs
mpdu length is calculated wrongly in one corner case
resulting in wrongly identifying the last nbuf of the
mpdu, fixed it by properly adjusting the length.
CRs-Fixed: 2368608

Change-Id: Ia7bd3247eb05f2eb4b5de1c65e7190c798128792
2019-01-16 10:37:48 -08:00
Viyom Mittal
757853fd60 qcacmn: Fix NULL pointer dereference for 'pdev' pointer
Fix NULL pointer dereference issue observed using static code analysis for 'pdev' pointer.
Problem ID: 380528, 380530

Change-Id: I057062afc8d347247a74d8ae66fc188b69f5ee0f
2019-01-15 05:21:13 -08:00
phadiman
6c3432b709 qcacmn: Fix array out of bound access
Array mcs_count is of size 13 and the
macro MCS_MAX is 13

mcs_count array should be access only
till 12, hence change the comparison
from <= MCS_MAX to < MCS_MAX

Change-Id: Ieab9a8d1f2a06ff31fa79a062bfcbf96f298f0a1
2019-01-14 17:32:55 -08:00
Vivek Natarajan
95f004f879 qcacmn: Update Rx stats in case of vow traffic
For non-NSS platform, update no of rx packets being
sent from wifi driver to network stack in case of
vow traffic.

Change-Id: If16a5b9c37a16374d4217369b1f02360c62155a9
CRs-Fixed: 2371429
2019-01-14 08:38:14 -08:00
Aniruddha Paul
a2e7c93db7 qcacmn: Change the 2k handling API to non-static
Make the 2k jump handler from static to non-static
to change the scope of the API.

Change-Id: I55e2b69c8d470cdf958da76f4f0c8d0effc7ed2e
2019-01-12 07:28:54 -08:00
Subhranil Choudhury
5079d52ebf qcacmn: Split the wds src port learn function
Splitting the wds srcport learn function to add:
1. A wrapper function where host extracts the required fields from
   nbuf cb and rx_tlv header.
2. A common function which can be called from both host path
   as well as offload path.

Change-Id: I2f2c0580c049f48395a3e0a265e3fb5d8aed6774
2019-01-07 00:12:49 -08:00
Sravan Kumar Kairam
b75565e98f qcacmn: Add cdp api for dp tx desc availability
Add cdp api to check if tx desc pool available descriptor
threshold has reached.

Change-Id: Ie542d03dd865d32aa6e01da00328aa51728b4276
CRs-Fixed: 2369218
2019-01-07 00:12:44 -08:00
Viyom Mittal
18a73bcb92 qcacmn: Update RSSI of last packet in athstats
The last_ack_rssi value is made to get updated with the
correct value and the code fragment to reset it to 0 has
been removed.

Change-Id: I87f9ca788c92ae6ffc05b10faeb82e03024050ce
2019-01-04 05:40:25 -08:00
Krunal Soni
d9dea6480c qcacmn: Check TX pending flag before doing bus suspend operation
Current driver doesn't check for any TX pending flag before doing
bus suspend.

Add a logic which is similar to existing helium platform.

Change-Id: I49d078c3b86fc0d9659fbbc2f3c1a604a79a9dff
CRs-Fixed: 2360189
2019-01-03 18:32:58 -08:00
Amir Patel
594a3d04ee qcacmn: Move peer_ref lock outside loop
Move peer_ref lock outside loop

Change-Id: I0e15f61185e2858a63e9dba2ac3e3483d4fde9e6
2019-01-03 04:35:16 -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
chenguo
bae040f144 qcacmn: fix excessive logging during update peer statistics
Change the QDF log level during update peer statistics. It is not
necessary because during roaming it is possible the peer is not
there when we update statistics. Also use QDF_TRACE_RL to replace
QDF_TRACE to avoid massive log prints.

CRs-Fixed: 2353709
Change-Id: I2896e6874b2802ee1d8bf05c6daf064e1953a5d5
2018-12-24 00:11:03 -08:00
Amir Patel
ee49ad5b58 qcacmn: Fix vdev list synchronization issue
Take required lock for vdev list iteration and peer list
iteration

Change-Id: Iab3d2a1028325b6e8ade61b0b023f126b61db4e5
CRs-Fixed: 2367955
2018-12-22 02:54:18 -08:00
Pamidipati, Vijay
eb0e456d68 qcacmn: Add missing NULL check in DP rx path
Add a missing NULL check for peer object in rx_da_learn API
Also add missing elements in pdev_stats_cmn_tlv structure.

CRs-Fixed: 2357352
Change-Id: Ie54fd0a6a45f00d60420c391098f22b0097de3ac
2018-12-21 10:05:35 -08:00
chenguo
8df4d46103 qcacmn: Remove the unnecessary info printing in SIRQ context
dp_reo_desc_free function can be executed in SIRQ context, so it
should not be expected that INFO printing which might cause locks
holding too long.

CRs-Fixed: 2367454
Change-Id: Ic77126fa62329547494ec6b672111c6183fadac2
2018-12-21 10:05:28 -08:00
Mohit Khanna
16816ae8d0 qcacmn: Enable GRO for TCP packets
Add support for GRO functionality for TCP packets.
- Pass GRO config to DP layer as a part of dp_update_config_parameters
- Add API to read the number of active RX contexts from DP layer
  cdp_get_num_rx_contexts
- Fill GRO info into skb->cb from rx_tlv during dp_rx_process

CRs-Fixed: 2346995
Change-Id: I1c143d8ce2c7522ba2c76142fb6cc82193df5608
2018-12-18 00:08:08 -08:00
Chaithanya Garrepalli
3e4ac1cace qcacmn: Fix for the memory leak in smart monitor feature
Change with fix memory leak observed in case where
smart monitor is enabled and monitor direct bit is not set

Change-Id: Ib556482b9067dbd7418cbe226a19bbbd5844a075
2018-12-17 05:35:48 -08:00
Sravan Kumar Kairam
099671a852 qcacmn: Fix NULL pointer dereference
In dp_rx_mon_status_buffers_replenish after replenish of all
mon status ring rx buffers there is log in which function
local desc list is accessed. But after successful replenish of
all the available free desc, free desc list will be NULL. So
accessing the free desc list in the debug log leads to NULL
pointer dereference. In this change remove the debug log as
before that enough logging is in place to check how many buffers
are replenished.

Change-Id: I306aa52f6f25d9b43afb8548b8c03467aa9f27de
CRs-Fixed: 2366585
2018-12-17 00:37:37 -08:00
Mohit Khanna
705149946b qcacmn: Fix large RX desc pool memory allocation
During dp_rx_pdev_attach and dp_rx_pdev_mon_buf_attach we are allocating
three times as many rx descriptors as there are entries in the ring for
AP usecase. This is not needed for MCL and may need to kmalloc
failures for allocating that much contiguous memory

Allocate only as many RX descriptors as there are ring entries for MCL
usecase.

Change-Id: I8b559a85c3899bcbdc520e71ba5da409314db160
CRs-Fixed: 2342957
2018-12-15 10:07:15 -08:00
Venkata Sharath Chandra Manchala
96e3633874 qcacmn: Pktlog Enhancements
1. Reduce the log level for every buffer received
   from firmware
2. Set the default pktlog buffer size to 10MB.

Change-Id: Iad8827084579592fcfa69056dcfc9d57095151e7
CRs-Fixed: 2364380
2018-12-15 08:43:26 -08:00
Krunal Soni
ce2009b364 qcacmn: Clean-up all peers in-case of SSR
Current driver doesn't clean-up all the peers because the TARGET
state is not marked as reset and due to which nobody is there to
mimic fake peer unmap events to reduce the reference count.

Also, there is no peer delete API being called as well in case of SSR.
Identify the TARGET state in-case of SSR by calling HDD callback
and mimic the unmap events and call peer delete API as well.

CRs-Fixed: 2350285
Change-Id: I878b7a15701c01ac9ef80010086f7e868a631a74
2018-12-14 16:06:30 -08:00
Chaithanya Garrepalli
7ab76aec94 qcacmn: Enable monitor dest ring in m_copy mode
In existing code, 132 bytes of OTA mgmt. and control payload is
provided to upper layers by subscribing to packet header TLV.

The requirement in M-copy mode though is to get complete payload for
mgmt. and ctrl. packets. Add change to configure monitor destination
ring and add mgmt. and ctrl. packet filter to receive full mgmt. and
ctrl. packets.

Change-Id: I0014837b51cac6f0143dcc5cb624ea2086cf4486
CRs-Fixed: 2256159
2018-12-14 16:06:06 -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
sumedh baikady
da15920d5b qcacmn: Support for smart monitor on HKv2
Add support for smart monitor feature on HKv2.
For HKv2, NAC filtering is done by HW and NAC is
programmed directly in the AST table. The NAC entries
in AST table have monitor direct bit set and this
is obtained by host via monitor status ring.
host subscribes for packet header in MD packets.

To these filtered packets radiotap header is added
and delivered to the stack.

Change-Id: I123f986531943e376ac5c492540e01f0b03348c4
2018-12-13 16:46:07 -08:00