Commit Graph

743 Commits

Author SHA1 Message Date
Yu Tian
fb5d4a46c4 qcacld-3.0: Stop replenish timer during recovery
During recovery, when this timer is started, there is no
stop operation. If the timer is triggered and SSR is not
completed, it will visit re-inited data structure and lead
kernel crash.

Change-Id: I81b20c1cc9c66efb3f334a17f38613a116aeaf9e
CRs-fixed: 3101872
2022-01-04 11:40:00 -08:00
Jianmin Zhu
683bc95375 qcacld-3.0: Change tx retries unit from msdu to mpdu
Customer reported their HLOS LTE-WLAN transition algo sometimes go wrong
for wrong low layer stats, Txretry delta is bigger than Txtotal delta.
Txretry unit is msdu while Txtotal unit is mpdu.

Add vdev/peer stats for mpdu number of successfully transmitted after
more than one retransmission attempt, to align mpdu tx_packets, tx_failed.

CRs-Fixed: 3102117
Change-Id: Id4b9d8fd81af4bf0c141dad481bfd2b3f6c1db2a
2022-01-04 11:39:55 -08:00
sandhu
afc4244d94 qcacld-3.0: Remove IP from code
Remove qualcomm IP from code

Change-Id: Icc3f239fbb6874a07272618b1be84d613b8fdc84
CRs-Fixed: 3073862
2021-12-29 04:28:21 -08:00
Jinwei Chen
21e1618550 qcacld-3.0: CLD change for cdp_pdev_attach
CLD change for cdp_pdev_attach

Change-Id: Ib4c536bc5d4a94ed0456e976cfc32b0ccdc9aa65
CRs-Fixed: 3077258
2021-11-23 03:54:59 -08:00
Yu Tian
94a1e84eb7 qcacld-3.0: Add an ini control to disable Dynamic GRO feature
Dynamic GRO feature is enabled by default and aimed for specific
customers. Add an ini control to allow other customers to config
this feature enable/disable.

Change-Id: I83edd69d0e30d5944f0724ed8350328abff619bb
CRs-Fixed: 3070912
2021-11-21 23:59:46 -08:00
Mohit Khanna
8105ca9b57 qcacld-3.0: Throughput based runtime PM support
Invoke runtime_pm APIs based on throughput level in bus bandwidth timer.

CRs-Fixed: 3059244
Change-Id: Ie1d5d8eddeec6076aa162e3ba3604ffd54fcc98d
2021-11-09 15:34:20 -08:00
Amit Mehta
eba64c70d7 qcacld-3.0: Update tx Failed Count
Currently, we are updating tx failed based upon
MPDU tx fail count received from FW.

In addition to the fail count received from FW
add MPDU tx retries done in case of successful
transmission to tx failed.

Change-Id: Ib993c71a99dd4d59df116a454336716352122a8e
CRs-Fixed: 3058364
2021-10-29 10:22:56 -07:00
Arun Kumar Khandavalli
7b9d985091 qcacld-3.0: Optimize the driver transition checks for cds
Currently there are multiple driver calls in per packet path
w.r.t recovery, bad state, load/unload which is leading tput impact.

Move all the cds driver checks into one function to avoid multiple
calls.

Change-Id: I70f4fcc6bfbd1df32ae17ce6a0485fa3f55ca561
CRs-Fixed: 3057573
2021-10-21 07:30:57 -07:00
Yu Tian
fde4ddb2e0 qcacld-3.0: Add API to get TX pending in WoW state
This change is used to provide an API for PMO module to
check whether there are pending TX frames before HOST sends
wake up indication to FW. PMO module uses this to indicate
FW whehter to discard HWDTIM.

Change-Id: Iea4081e69c397ab87bc90f46b672631f4589f389
CRs-Fixed: 3046953
2021-10-11 08:06:22 -07:00
Alan Chen
b7ce8eba14 qcacld-3.0: Add an error log before forcing fw crash
Add an error log in cds_trigger_recovery_handler() before forcing a fw
crash to help with debugging stability issues revolving around it.

Change-Id: Ifc5faa14e1812d145abc7aecd12f66db51eef3b4
CRs-Fixed: 3043316
2021-09-24 00:01:26 -07:00
Yu Wang
a4791d8279 qcacld-3.0: add build flag for network package timestamping
Network package timestamping is optional for TSF feature,
to make it configurable, add a new build flag
WLAN_FEATURE_TSF_PLUS_SOCK_TS.
This flag will be set only when CONFIG_WLAN_SYNC_TSF_PLUS
is enabled and CONFIG_WLAN_SYNC_TSF_PLUS_DISABLE_SOCK_TS
is not.

Change-Id: I413e85fadf93264cd41c2739b6d870aa08d60efb
CRs-Fixed: 3027378
2021-09-10 15:36:13 -07:00
Vevek Venkatesan
d26b38d254 qcacld-3.0: call CDP API for pkt_log_exit from CDS layer
Once pkt_log_con_service success in cds_pre_enable,
in case of any further failure, pkt_log_exit cleanup is
not done, so calling CDP interface API for pkt_log_exit.

Change-Id: Ibddc99fb47109a73de095f068694b2548849f14d
CRs-Fixed: 2978390
2021-08-14 23:06:43 -07:00
Zhaoyang Liu
7b302f0c1c qcacld-3.0: pdev suspend is not supported for qcn7605
Add check for device type QCN7605 before suspend target.
QCN7605 FTM mode firmware doesn't support pdev suspend.

Change-Id: I73ab53d8f20086b535edfd00617620e1b667772b
CRs-Fixed: 2993110
2021-07-27 04:58:33 -07:00
Yue Ma
229bd545ea qcacld-3.0: Add proper check to include qcom-iommu-util.h
qcom-iommu-util.h is a QCOM only file for MSM platforms, so only
include it when MSM_PLATFORM is defined to avoid build issues
from other non-QCOM platforms like X86.

Change-Id: I5f32fbe05abe4d7aff451031f0859f774ce1c507
CRs-fixed: 3721214
2021-07-22 15:11:22 -07:00
bings
79beb418ec qcacld-3.0: Save assoc request frame in qdf_nbuf_t
Legacy mlme need notify assoc request frame to mlo mgr. It should
be sent to mlo mgr in qdf_nbuf_t.

Change-Id: I192503a00346498408971462d3b15cc98efa9919
CRs-Fixed: 2976150
2021-07-16 06:19:41 -07:00
Vevek Venkatesan
14d84bf050 qcacld-3.0: add DP reason code support for send_delba
Add DP reason code support for sending DELBA request,
so protocol layer can make decisions for special cases.

Change-Id: I4eeba3513820a98a15682190e40a06ce178d9441
CRs-Fixed: 2983544
2021-07-06 02:15:43 -07:00
Amit Mehta
90acd43772 qcacld-3.0: Initialize HTC Pipe Ready message timeout
Init htcinfo structure variables to 0 to avoid issues
due to any newly added uninitialized variables in the future.

Change-Id: Ie4cf5c99c09f56ee1fc898397bcd3ccf4b678638
CRs-Fixed: 2962285
2021-06-15 15:09:58 -07:00
Rakesh Pillai
b3e1a44d0b qcacld-3.0: Init-Deinit changes for WCN7850
Changes to initialize/deinitalize WCN7850 from HDD layer.

CRs-Fixed: 2888534
Change-Id: Ia9e44f9fe0b4b6977c55c380756af0656203e4f5
2021-06-04 10:43:31 -07:00
Arun Kumar Khandavalli
add1f46a2b qcacld-3.0: Remove obselete wma_needShutdown code
wma_needShutdown related code is now obselete, during the cds_preenable
failure, this is obselete code is being invoked which is setting
wma->needShutdown. If the same is set the wma_close will not be
inokved resulting in the reference leak of of pdev object.

Remove obselete wma_needShutdown code.

Change-Id: Ia1463c9197593165eb5844e154f78fe3fe278fbd
CRs-Fixed: 2947133
2021-05-19 14:37:49 -07:00
Ananya Gupta
22a74f3eb7 qcacld-3.0: Enable SMMU Translation for IPA
Enable SMMU translation in waipio target if
IPA is enabled

Change-Id: Ib41c164bb0eaf7e3d58386013a46db8dd601f9f0
CRs-Fixed: 2943929
2021-05-13 10:18:57 -07:00
Aditya Kodukula
b619f021fc qcacld-3.0: Remove INI parameter gReorderOffloadSupported
As part of WiFi ini clean-up FR, the ini gReorderOffloadSupported,
is identified as an obsolete parameter. Hence it is deprecated and
all instances of the config  CFG_DP_REORDER_OFFLOAD_SUPPORT is
replaced by default value of ini.

Change-Id: I738406fb740f414fb6ad70603dfc95b9bf137ac4
CRs-Fixed: 2916527
2021-04-12 13:04:16 -07:00
Vevek Venkatesan
f78f8a32dd qcacld-3.0: add CDS API to check if driver state module stop
Add a CDS API to check if the driver state is module stop and
also register for QDF wrapper for the same.

Change-Id: I99fbdda593ca229ef8db956c609735ae6509d511
CRs-Fixed: 2912747
2021-04-01 20:33:57 -07:00
Karthik Kantamneni
ff20d99b98 qcacld-3.0: Use msleep instead of mdelay in cds_drop_rxpkt_by_staid
Currently mdelay is used which leads to busy wait blocking CPU from
running other process, so use msleep which yields cpu for other tasks.

Change-Id: Ia7c76cfb1c950e78008f6fe19825733cbc261e50
CRs-Fixed: 2888309
2021-03-24 09:47:51 -07:00
Gururaj Pandurangi
9996bc7175 qcacld-3.0: Remove feature flag WLAN_FEATURE_11W for pmf
Remove all of the conditional compilation for pmf since this
feature is mandatory for future scope from protocol point
of view.

Change-Id: Id3a2127e9ecb343ad2a0354dcbc331c22167d7fb
CRs-Fixed: 2852630
2021-03-18 00:39:42 -07:00
Karthik Kantamneni
7983966ef5 qcacld-3.0: Add RX refill thread infra to replenish RX buffers
Add Rx refill thread infrastructure to replenish RX buffer pool

Change-Id: I2553e0e35d251cf72e741321a2389f741f1bb485
CRs-Fixed: 2869355
2021-02-10 12:31:37 -08:00
Arun Kumar Khandavalli
fd73c1e98e qcacld-3.0: Debug the reason for recovery during driver unload
During the driver unload whenever the recovery is triggered in
the current implementation the request is silently dropped, this
is resulting issues in other areas during the driver which is making
it harder to debug the issue.

Trigger system panic to debug the reason for recovery during the
driver unload.

Change-Id: I67c6c7e8b19dcc3371cd6691c0e3f19be4c33c46
CRs-Fixed: 2850591
2021-01-13 19:53:26 -08:00
Arun Kumar Khandavalli
c9364b98d6 qcacld-3.0: register callbacks for bus failure register dump
Whenever there is a recovery triggered, if there is a
failure in reading the bus id collect the bus specific
registers to understand the reason for the failures.
Register the callbacks for updating the reason code and register
dump.

Change-Id: I4eb5327a806691737f605d3d3c83d2c28d1fe935
CRs-Fixed: 2835341
2020-12-10 17:43:15 -08:00
Ananya Gupta
d5395e3340 qcacld-3.0: Pre-allocate pdev context
Pre-allocate pdev context as size (53KB) exceeds threshold
of dynamic allocation (4KB).

Change-Id: Ib2adfc556ca1096ab7a800cd14a7da44ccd4f01a
CRs-Fixed: 2828243
2020-12-08 01:12:18 -08:00
Tiger Yu
f702106630 qcacld-3.0: Enable TSO/SG feature by the FEATURE_TSO/dp_sg_support
The hdd_set_netdev_flags enable the TSO feature regardless of the
FEATURE_TSO, which will cause the performance regression issue on
the non-tso supported chip.

Enable TSO feature based on the FEATURE_TSO, and enable the SG feature
separately by ini dp_sg_support for legacy chip to fix it.

Change-Id: I0fcb189069f0aa2069ae8427ad96a8db25a91a2f
CRs-Fixed: 2812953
2020-11-22 21:13:12 -08:00
Srinivas Girigowda
009835571d qcacld-3.0: cds: Remove logs for cds_get_context() checks
cds_get_context() function already takes care of logging the
caller function name in case of any error.
Hence there is no need to add the error log again.
Getting rid of these unnecessary logs reduces driver memory footprint.

CRs-Fixed: 2814471
Change-Id: I70351edc06db00171270369a91589b0d9409f70a
2020-11-06 20:59:46 -08:00
Zhaoyang Liu
5dab5f86a7 qcacld-3.0: fix timeout issue when unloading driver with ftm mode
When driver working with FTM mode for qca6174, unloading driver
need send WMI_PDEV_SUSPEND_CMDID to firmware, as firmware has no
code to handle this command for FTM mode, driver will do self recovery
after waiting response timedout. Fix the issue to skip pdev suspend
command with FTM mode for specific target.

Change-Id: I9e6ea6de3e8cb15580ba06e1a1a0c0ac7c3a9253
CRs-Fixed: 2785653
2020-11-04 03:00:25 -08:00
Paul Zhang
bb3ac230bd qcacld-3.0: Possible buffer overflow
Fix array index out of bounds issue in function
cds_hang_event_notifier_call.

Change-Id: I19f17e6b53e9be83c63a7aa3c8ac7ed6d0b6e852
CRs-Fixed: 2777774
2020-11-03 18:59:20 -08:00
Kai Liu
52aec7a272 qcacld-3.0: Enhance hang info feature
Use separate hang reason for case that lack of credit after suspend.
Meanwhile add hang buf offset check to avoid overflow.

Change-Id: Ic794d02672cd663598da66b9e75924c41b5ef0e8
CRs-Fixed: 2801343
2020-10-30 13:03:23 -07:00
Yu Tian
af6eb602d0 qcacld-3.0: Change BAR frame ctrl and sequence format
BAR frame is parsed incorrectly, change to correct format

Change-Id: I399d6be49834229bba5f8eccf71f4002d2d48e16
CRs-Fixed: 2804140
2020-10-27 20:54:42 -07:00
Karthik Kantamneni
1b3e987a50 qcacld-3.0: During peer unmap wait for dp thread processing
Currently dp thread and peer cleanup execution is done in
different context due to this there is possiblity of dp thread
processing packets which doesn't have active peer and vdev.

To fix this during peer unmap wait for current peer packets
which are processed in dp thread to complete.

Change-Id: I5a2b1568b961be257c4ce058a63e5c0e61d27f2b
CRs-Fixed: 2797316
2020-10-21 05:18:51 -07:00
Yue Ma
34575137cd qcacld-3.0: Refine kernel-doc comments for force assert FW PLD APIs
Add proper kernel-doc comments for the PLD APIs to force assert FW.
Rename pld_collect_rddm() to pld_force_collect_target_dump() for better
understanding.

Change-Id: I8e0639a120c893dde8ee1cfd5d2aea662eaebf3f
CRs-fixed: 2800567
2020-10-20 21:31:10 -07:00
Alan Chen
d0f9829c04 qcacld-3.0: Add if check before calling cds_force_assert_target()
If CNSS function pld_force_collect_target_dump() returns 0, this means
that FW is already asserted and should not call cds_force_assert_target().
Add an if check for pld_force_collect_target_dump() to only call
cds_force_assert_target() when it is not 0.

Change-Id: Ib784c1a406b93327942164a975994065149aed90
CRs-Fixed: 2799461
2020-10-16 23:43:48 -07:00
Srinivas Girigowda
c590a15c17 qcacld-3.0: Add caller function name to cds_get_context()
Add caller function name to cds_get_context() to log incase
of error. Hence calling functions can avoid logging in case if
cds_get_context() returns NULL. This reduces logging and
thereby memory foot print.

Change-Id: I2fce65c020ccd0e8545c38ca2528392ccfd3bd92
CRs-Fixed: 2795670
2020-10-14 03:25:00 -07:00
Alan Chen
8fb2e3ab02 qcacld-3.0: Use sync API for target assert and dump collection
In internal builds, to catch all fw timeout issues, host-initiated
self-recovery is not enabled. To avoid a race between cld driver
triggering assert and RDDM dump collection, use the CNSS-provided
sync API, which guarantees target assert and dump collection before
returning.

Change-Id: Ib702bfa17616a100913f501f850d5c0b74ad39bb
CRs-Fixed: 2790271
2020-10-10 13:44:44 -07:00
Jinwei Chen
96997b6d7c qcacld-3.0: prealloc for multiple pages allocation
prealloc for multiple pages allocation.

Change-Id: I4b6209eaf51f02165372290fc4912e26fb1ce139
CRs-Fixed: 2751340
2020-09-25 12:59:34 -07:00
Arun Kumar Khandavalli
5cc1416178 qcacld-3.0: check for IPCI target before triggering recovery
Check for the Moselle bus type whether the selfrecovery ini is enabled,
if the ini is disabled let the system enter to bad state and debug
the issue.

Change-Id: Ib6e720bbc8d1421706a5631ecc7d11989538e2d5
CRs-Fixed: 2780882
2020-09-21 19:30:18 -07:00
Jinwei Chen
9406c02ec4 qcacld-3.0: Add support to pre-allocate DP SRNG mem
Add logic to pre-allocate DP consistent memory and reuse later.
Only SRNG memory is preallocated. This is useful to prevent memory
allocation failures due to fragmentation over cycles of WLAN ON/OFF.

Change-Id: I1f814f9f18d482eb5f55e0b157606d1792e665f8
CRs-Fixed: 2740424
2020-09-10 21:00:33 -07:00
Srinivas Girigowda
87b638fadb qcacld-3.0: Remove redundant __func__ from the logs
The logging macros implicitly takes care of embedding function name
in the log, hence there is no need to include __func__ again.
Getting rid of redundant __func__ reduces driver memory footprint.

Change-Id: Idf4685539991f65205f19b27551cef699230c82e
CRs-Fixed: 2768575
2020-09-03 19:27:18 -07:00
Pragaspathi Thilagaraj
170c20e443 qcacld-3.0: Add support for roam scan mode command in connection mgr
Add changes to send roam scan mode over RSO start/stop/update_cfg
from connection manager. Update the roaming params and roam scan
params to new structure.

Refine send_roam_scan_offload_mode_cmd_tlv().

Change-Id: I6adce2e8a24ece93a079032d0e66760393fcdccd
CRs-Fixed: 2766023
2020-09-01 18:14:21 -07:00
Yu Tian
6001ff7264 qcacld-3.0: Add RX frame pending check for WoW
Sometimes frames are queued to dp_rx_thread wait queue
during WoW suspend in progress. At this time dp_rx_thread
is in SUSPEND state and these frames can't deliver to Linux
Stack, for ICMP case, if no other frames come to wake up
system, ICMP timeout will happen. Add a RX suspend check
in WoW to avoid suspend when frame comes before WMI_WOW_ENABLE
sends to FW

Change-Id: I3d37e6d6ce8f7f6edaf5f78bf5cef77bee6ed5c6
CRs-Fixed: 2755583
2020-08-21 23:00:45 -07:00
Manjunathappa Prakash
ef666adfcf qcacld-3.0: Add capability to disable checksum for legacy links
Due to latency concerns on GEN1 PCIe attach checksum offload and TSO
features cannot be enabled for 802.11A/B/G legacy mode connections.
So add INI option to dynamically disable/enable checksum offload and TSO
based on the connection type.
Use netdev_update_features kernel API to adjust the netdev features
dynamically for existing registered netdev.

change-id: I0e44cb1789516e1bcee619be3581d826f45f265b
CRs-Fixed: 2732090
2020-08-20 23:07:50 -07:00
Min Liu
10f8bfae30 qcacld-3.0: Possible OOB read/write in cds_hang_event_notifier_call
Fix the possible OOB read/write in cds_hang_event_notifier_call.

Change-Id: I43e7012d14825c89f6e022e8ffe19e57d606fe79
CRs-Fixed: 2751718
2020-08-14 02:03:14 -07:00
Arun Kumar Khandavalli
16d9ba73d0 qcacld-3.0: Correct the tlv length of the hangdata
The Tlv of the hang data is reduced to 2bytes from the 4bytes
change the structure definitions accordingly.

Change-Id: Ic535a7b985d028076d14afebe603dfa3fd8e94d3
CRs-Fixed: 2753804
2020-08-14 02:03:10 -07:00
Arun Kumar Khandavalli
57f9f1d78c qcacld-3.0: Trim the hang data size as per requirement
Trim the hang data as per the customer data size requirement.

Change-Id: I5a5d848f820ddeaa721dba176e67dba97fed7a71
CRs-Fixed: 2751261
2020-08-14 02:03:03 -07:00
Bapiraju Alla
6db75ce3c9 qcacld-3.0: Purge shutdown notifier before modules close
Currently, shutdown notifiers are purged after closing WMA and
PE modules. If there is an SSR in between these modules close
and purging the shutdown notifiers, SSR sequence will try to
access the timers that are already freed in modules close.

To avoid this, purge shutdown notifiers before closing WMA and
PE modules.

Change-Id: I6a192b11d0f99c93c70bd244072bec353327d843
CRs-Fixed: 2745954
2020-08-13 10:32:51 -07:00