Commit Graph

790 Commits

Author SHA1 Message Date
Chaithanya Garrepalli
af34aae9cd qcacmn: add counters for sa_idx invalid issue
Add counters in case where we identify
HW issue where sa_valid and da_valid bit
are set and sa_idx and da_idx are invalid

Change-Id: I690b626dd3c2b7f20b35982514b0f27576221250
CRs-fixed: 2340521
2019-02-27 03:14:02 -08:00
Surya Prakash Raajen
3a01bdd783 qcacmn: Add CDP api to fetch data rates
Add new CDP api to fetch data rates accordingly
from datapath

Change-Id: I1cf08d396e0f611c61a02c868c9c31759ef52a79
CRs-Fixed: 2394226
2019-02-26 16:28:57 -08:00
Chaithanya Garrepalli
4c952f1039 qcacmn: For HKv2 use ast find by pdev in case of roaming
When client roams from repeater to AP we need to delete the
existing WDS while creating a peer. In this case use AST search
by pdev_id to find the AST entry when ast_override support is
enabled for soc

Change-Id: I1c7bfb8173416b6e155d3c58e94c395028c9b16d
CRs-fixed: 2399868
2019-02-25 20:13:29 -08:00
Karunakar Dasineni
f8ec0cbe57 qcacmn: Fix defrag waitlist flush issues
Check if peer is valid before access during flush.

Check waitlist during peer cleanup even if REO queue was
not allocated, since these are independent.

Add a timeout to avoid calling flush function too frequently.

Change-Id: Ib8da2014f81a48ccc3ca6a330209a942ac0998a2
2019-02-24 01:30:00 -08:00
Venkata Sharath Chandra Manchala
cad74add80 qcacmn: Add support for full pktlog
1. Enable CE5 and allow it to service
   pktlog messages from the firmware.
2. Register full pktlog callback handlers
   for handling sw_events and full tx pktlog.

Change-Id: Ifb70ac0993f2402201f88758845f730cf677b1a0
CRs-Fixed: 2388906
2019-02-21 23:25:30 -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
Vinay Adella
5dc5551bde qcacmn: Use the correct dp_peer find API for unmap & delete peer
Use __dp_peer_find_by_id, as this will return the peer, even if
delete is in progress. This is needed, if the FW has crashed and
there is no response expected

Change-Id: I0f77184860622b06f793fcfd321547ea41e958cd
CRs-Fixed: 2392817
2019-02-18 23:19:45 -08:00
Aditya Sathish
f8074d87b2 qcacmn: Add return path for fc_peer_stats for peer mac address
Add return path for fc_peer_stats for peer mac address if the peer
is connected to another pdev.

The DP peers are maintained at the SOC as such there is no check
to make sure that the peer is for a particular pdev.

This issue is especially seen when an end user invokes
fc_peer_stats in wifi0 for a peer that is connected to wifi1. In
such a case, we should be returning an error since the peer is not
connected to the pdev that the user application is directed to.

Change-Id: Ie1142c508605bfcf2fd49adc863879eee98fffe6
CRs-Fixed: 2397052
2019-02-18 00:43:56 -08:00
Aditya Sathish
8a7357548a qcacmn: Remove dedicated CDP API for mcastenhance 6 AST lookup
Remove dedicated CDP API for mcastenhance 6 AST lookup and replace
the calls with generic APIs

Change-Id: Ic2c5613be57d7eaffc233ee601f136694f81f848
CRs-Fixed: 2369606
2019-02-17 22:12:54 -08:00
Tallapragada Kalyan
a702362d34 qcacmn: Check for MAX_AST entries when adding AST entry
check for max_ast entries supported by FW and add the
entry on host accordingly.

Change-Id: Ief70ba631bb41d50c79d3673e3eea0c45b0c1e19
CRs-Fixed: 2355947
2019-02-12 04:47:37 -08:00
Amir Patel
1ea85d4671 qcacmn: Add support for STA inactive time in Hawkeye
Currently there is not STA inactive time support for lithium.
Read inactive_time from htt_peer_stats_cmn_tlv by sending
HTT_DBG_EXT_STATS_PEER_INFO to firmware.
After sending command, wait on completion variable till
firmware to response, trigger completion upon firmware response.

CRs-Fixed: 2319219
Change-Id: I93e6343641ae5c72610a57dd6ba551cca0b010c1
2019-02-09 11:52:40 -08:00
Chaithanya Garrepalli
8fb487704b qcacmn: add sync between peer teardown and add ast
Protect peer delete in progress under lock to avoid
addition of AST entry after peer tear down

Change-Id: I21ec1dde67339406ad1b5ac99d37b6ce8d021fde
CRs-fixed: 2384110
2019-02-05 06:29:59 -08:00
Krunal Soni
53add6504b qcacmn: WAR to drop MPDU with incorrect sw_peer_id
In certain scenarios where AP sends OFDMA TCP packet to
multiple STAs in HE80 mode in poor RSSI conditions, it has been
observed that host in STA gets in to null_q_descr handling case and
rxtlv doesn't carry correct sw_peer_id. Due to this,
driver can't find correct peer from table and ends up sending deauth
frame to handle invalid peer case. The TA is valid and host is able to
find the peer using the TA.

Apply workaround by detecting this special case and drop the frame.

CRs-Fixed: 2367420
Change-Id: I0cbdbb8e9976e739c959062261fc1c946e446d63
2019-02-04 13:08:03 -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
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
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
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
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
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
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
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
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
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
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
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
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
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
Pamidipati, Vijay
8a4c03a869 qcacmn: protect peer-list access in AST aging timer
Add missing lock to protect peer list access in AST
aging timer

Change-Id: I3e0f7c0bd0e81398dd927bb4f51627a46c5eae19
2018-12-13 14:57:29 -08:00
Vinay Adella
9420115f04 qcacmn: Change peer unref delete API parameters
Pass vdev mac-addr and vdev-mode, instead of vdev-id.
The vdev-id that was passed earlier, was used to get
the mac-addr and vdev-mode from the vdev structure.
But there are cases when this vdev structure may be
freed, when this API is called.
So pass the mac-addr and vdev-mode from the dp structures.

Change-Id: I2148e7ecef433f4363385eeaec2e18f3ec131ab8
CRs-Fixed: 2356315
2018-12-12 03:52:00 -08:00
Karunakar Dasineni
6fb46e2759 qcacmn: Release link descriptors on defrag errors
Link descriptors should be returned to WBM release ring if
fragments are not reinjected due to defrag errors.

Change-Id: Ia37db9f195f6848092918cf7cc221dc50e827ac5
2018-12-12 01:45:50 -08:00
chenguo
d22ed62ec8 qcacmn: Make sure int_timer is initialized in monitor mode
During vdev attachment in monitor mode, the ini_timer is not
initialzied which will cause FW assertion. Make sure int_timer
is initialized properly.

CRs-Fixed: 2359908
Change-Id: I48c97161345b17a0eb3e8a939499eabeae683bd2
2018-12-10 05:36:53 -08:00
Aditya Sathish
b514afc58a qcacmn: Add sanity check for txrx_stats 28
Add sanity check for txrx_stats 28 for a MAC address pointer.

Change-Id: I7bc3cfb5a18313086e457b6b4888a8002a4f7fd9
CRs-Fixed: 2360609
2018-12-06 10:28:08 -08:00
Keyur Parekh
c28f839a84 qcacmn: FR-50469 Pktlog for particular peer mac address support
This FR is to enhance existing pktlog debug tool
This feature will allow to capture pktlog for particular
peer mac address.

Change-Id: I3676095536185f25b0d498e03f70246260a324fd
2018-12-06 00:03:13 -08:00
Keyur Parekh
11865218ea qcacmn: Enable monitor mode buffer ring LWM interrupt
Eanable monitor mode low water mark interrupt.The monitor
mode processing is stuck in the monitor mode buffer ring full
if monitor mode low water mark interrupt is not enabled.This
is because there is no packet come in when monitor buffer
ring is full and hence there is no ppdu end interrupt.The
monitor is not processing the monitor ring and buffer ring
full condition is not remoevd.

Change-Id: I28b3a4b408db62873c17512d20e63c9844e8d4ea
2018-12-05 22:46:06 -08:00
nobelj
418b2e9af9 qcacmn: Modify index for printing BW stats
bw index are stored as
0 for 20MHz,1 for 40MHz, 2 for 80MHz and 3 for 160MHz

Change-Id: If5c71ca5716c7870782dcd7ddd9b8e73c6f2bbd3
2018-12-05 00:36:03 -08:00
Krunal Soni
07215e8082 qcacmn: Define int_ctx variable to resolve compilation error
int_ctx variable is not defined but it is being used which creates
compilation error. Define this variable as part of the fix.

CRs-Fixed: 2359507
Change-Id: I17e57663eb8daa449616ee99d5eb9455e3b7cee2
2018-12-03 16:41:55 -08:00
Mohit Khanna
40f76b57f8 qcacmn: Fix regression from DP init-deinit path changes
MCL DP initialization path is running into issues due to change
I5732453f617bdc16995fda916b645c41845c3ecb. Fix the same.

Move flow control lock variables to re-use region. This is needed since
flow control deinit happens in dp_soc_detach, while in dp_soc_deinit, the
soc memory is being partially reset.

De-init HTT memory in dp_soc_deinit and free HTT handle
in dp_soc_detach. The existing code was not freeing HTT
packets for MCL case and freeing the HTT handle twice.

CRs-Fixed: 2359409
Change-Id: I52dcccc0444d4ce139a29ffcb884598bbacda88f
2018-12-02 13:31:08 -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