Kernel change d4455fa 'proc: mandate ->proc_lseek in "struct proc_ops"'
by default use proc_lseek for file operations without any check, so add
default_llseek for all proc ops.
Change-Id: Ia72839cf09ec721fb98f50793b19ec082478d8d7
CRs-Fixed: 3201003
WLAN registers with multicast group 1 which is used by some legacy
infrastructure, may receive some wlan irrelative events, don't need
print on console.
Change-Id: I48fca745a603fd9875e2161d48144b4283fd6493
CRs-Fixed: 3137354
Introduce a new flag "BE_PKTLOG_SUPPORT" for beryllium specific
pktlog support.
Change-Id: If91156541b322905ad5d97cf2d9d7ae687290ecb
CRs-Fixed: 3115832
- A new pktlog mode called "hybrid", is added for QCN9224 only.
- Create WDI event for hybrid mode
- Add dummy APIs for monitor filter setting
- Send WMI_PKTLOG_EVENT_HYBRID_TX to FW for umac TLV subscription
Change-Id: I47f4e14bfc766f29a0ab4a8c07ab19e0d919e66b
CRs-Fixed: 3074184
Add support to invoke HIF runtime PM APIs in TX packet path based on
throughput level. Essentially at high throughputs, where runtime PM is
not expected to provide power gains, invoking the APIs is deterimental to
performance.
Hence invoke runtime_pm APIs based on throughput level.
CRs-Fixed: 3059712
Change-Id: I49d111bffa8a37c68abbdd54911f9ecc22430562
From 5.14 kernel, panic_notifier_list is moved from kernel.h to
panic_notifier.h, hence explicitly include the header file in
order to access panic_notifier_list.
Change-Id: Icf546ebea5a19b79602031b4fd92b498db0048c0
CRs-fixed: 3060060
Add disconnect wake lock reason code to add a wake lock
for WiFi disconnection.
Change-Id: I2ac33239c9df76d7c92429b9ada0380ad79fc72c
CRs-Fixed: 3045132
Define QDF API for virtual memory allocation and free.
Also add new api to get time of the day in microseconds.
Change-Id: I2921055bbb6b5d2a1105d19448b2a10fa2d6ccc5
CRs-Fixed: 3038180
Add support to send connectivity logs from g_wlan_logging thread.
Add new HOST_LOG_DRIVER_CONNECTIVITY_MSG event flag which wakes up
the gwlan_logging thread when set.
Also register connection manager callbacks to send the logging event.
Check if logging queue is empty whenever the gwlan_logging thread
is woken up and send the logs to userspace if the count doesn't
exceed the allowed threshold.
Change-Id: I3fdb8358f9048a277e2f03894c0e6a17376b0da0
CRs-Fixed: 3029279
Use CONFIG_CNSS_OUT_OF_TREE to control if CNSS family drivers are
built from in-kernel-tree source or out-of-kernel-tree source since
the exposed header files will be in different paths. This is also
for backward compatibility.
Change-Id: I698492f175ea140e6854c372f366a63f36de24c9
CRs-fixed: 3022556
API "fw_diag_data_event_handler" is the handler of an event
WMI_DIAG_DATA_CONTAINER_EVENTID comes from FW. Arguments of
this handler function come from FW.
If num_data may be less than size of(struct wlan_diag_data),
possible OOB while extracting event data.
Fix is to add a sanity check for num_data to avoid the OOB
read.
Change-Id: Ia2eb62dbaa154936bdb4ea34065657d441f12810
CRs-Fixed: 3001178
Add CDP interface API support for pkt_log_exit,
to cleanup pkt_log_init on failure.
Change-Id: Ib50efaed5997d341d3e76c2e1dbe42856df40191
CRs-Fixed: 3012201
Add BW_320MHz in mgmt_ch_width in host diag module.
Also remove WLAN_FEATURE_11BE feature flag within enum
mgmt_dot11_mode for 11BE related modes.
Change-Id: I2914735edd5aa21ad1d94b0e5fcf718b189fc432
CRs-Fixed: 3009301
Currently there is no synchronization for flush log completion
between fw and userspace. When host driver receives command to
flush logs, it sends the command to fw and releases the control
of the userspace thread, it does not wait for the flush log
completion event from the fw and because of which user space
does not know when the host and fw completes the log flush.
To address above issue add a logic to wait for fw event of
flush log completion before host returns control to userspace.
Change-Id: I04fa0aead146d2b7b8627e4101c6dcd99d3947e9
CRs-Fixed: 2983387
There is potential risk when starting CFR and resume happens at same
time, so this change adds wake lock for enhanced CFR.
Change-Id: Ifbde12cb73092b7fc4ef517e57051af4ffe7a79f
CRs-Fixed: 2974733
As part of minidump enhancement feature, incorporate wlan driver
log_msg data structure into the minidump.
Change-Id: Ic68e199c645bf8c8be50e105391b5c6efa90decc
CRs-Fixed: 2946292
Fill peer assoc mlo params in peer assoc request command.
Also add definitions to the WMI_SERVICE_11BE.
Change-Id: Ied7959e022ee27f3bd698b84dc801491175f85b3
CRs-Fixed: 2934417
For chips that do not use BMI, the epping enable process
will break if the epping_enable() flow is returned when
ol_ctx is NULL. This should not happen because ol_ctx
is only used when BMI is enabled. Whenever ol_ctx is referred
to, it will be checked for NULL before use, so we should
not return error here.
Change-Id: Ia873536a294b79f774193493646519163baf28c4
CRs-Fixed: 2901231
When switching from mission mode to FTM or Epping mode,
g_pktlog_pde is not cleared after de-init. When switching
back to mission mode, a warning is produced as the proc
directory is not found.
To fix this, g_pktlog_pde is cleared when pktlog is
de-initialized.
Change-Id: I1b9c9259c220a1981151dcb1e44a5621d7fd8204
CRs-Fixed: 2872045
Use non-inline OS-abstraction APIs to avoid direct
usage of kernel API's.
Use non-inline OS-abstraction APIs instead of OS APIs.
Change-Id: Ie4acfedc63a0e0e8ecbe358db711148db92bd8b6
The prints from the driver are rate limited based on the
configurations provided.
Also the prints which are redirected to user space daemon
and of certain log levels are also printed on the console.
Add a rate limiting version of the API for the prints coming
to console via the logging daemon.
CRs-Fixed: 2853590
Change-Id: I9683172ac0665b46581bad13a1050c6d70d72b5c
Delete the flush timer then set the pcur_node to NULL
while cleanup to avoid NULL pointer dereference in timer handler.
CRs-Fixed: 2820441
Change-Id: If6edca1343890e0fe962d7b3e3b5b07f379143ef
Add connect/disconnect log ring buffer to existing ROAM
debug functionality to record OS IF layer event.
Change-Id: Ifcbcd9a38ead27d60757983a0f56a37ae5d8af81
CRs-Fixed: 2852405
cld80211_oem_rsp_alloc_skb api is used to alloc skb for reply msg.
A static buffer pointer is returned from this reentrant func
which can be called by kworker and scheduler thread at same
time resulting single buffer access by both threads. After
kworker thread freeing this skb, scheduler is further updating
data in this skb resulting in page fault error. Use local
skb pointer to avoid such race conditions
CRs-Fixed: 2822390
Change-Id: I5f807d06c4890b027c86de9187f17fb83b19db5e
Introduce proper logging APIs for diag module and also rate limit error
logs when skb allocation fails in low memory conditions to avoid excessive
logging side effects
Change-Id: Ia41ff7cfd526180825df61a43f1f59163947f257
CRs-Fixed: 2836681
The nla_data coming from user space is a variable length data,
but the driver is checking nla_len() against a fixed length struct only.
It is possible that the nla_len() check against fixed length struct
may pass and if the nla_data does not have the payload and it may
result in possible out-of-bound read (slot->payload).
Hence the fix is to, check if nla_len() is atleast more than
the fixed length struct and also account for payload length.
Change-Id: I2e68d55c0411cff55908c1704031e3c070f3316e
CRs-Fixed: 2825763
The existing QDF implementation does the following
1. The QDF trace either prints to the console
2. The QDF trace message is directed to the utils,
which based on log level
a. redirects to a user space daemon or
b. redirects to console
There is excessive logging detection in the utils code
before redirecting the prints to the console.
If the number of prints to console is more than
the configured threshold, we assert in development builds.
Moving the API for excessive logging detection from utils to
QDF trace.
The configuration for detection of excessive logging currently
is only for the number of prints per second.
Adding time configuration also to detection of excess logging
to the console.
CRs-Fixed: 2809752
Change-Id: Iecc408fc9b576fa900a6d7ee793639f1dde3110d
Currently, FW diag logs, management frames and stats responses are
processed in worker context. Because of this, there is a possible
out of memory scenario when there are huge number of diag events
waiting in work queue.
To address this, process diag events in a separate worker thread and
set the limit for the number of diag events that can be queued in
work queue.
Change-Id: Ie6e5b905a3b591cf724cd6b024bec0612f9e2e0c
CRs-Fixed: 2818013
netlink_broadcast() will return -ESRCH when diagLog socket in
userspace is not present, then massive and repetitive error log
shown as below will be print. To address this, don't print
error log if netlink socket is absent.
"Ptt Socket error sending message to the app!!"
"ptt_sock_send_msg_to_app:Failed sending Msg Type [0x5050] to pid"
CRs-Fixed: 2801137
Change-Id: I14858625732c06442561e9a2e76fe2cfb6dabc12
Add the WMI command WMI_DBGLOG_MOD_WOW_LOG_LEVEL to enable
debug logs while in wow mode.
Change-Id: Ia1902d989964a5e35f590a075a2de64a9f66d5b7
CRs-Fixed: 2810326
1. 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.
2. Instead of adding __func__ to the qdf_nofl_* macros, its better to use
qdf_* which already takes care of adding __func__.
Change-Id: If5717c811016845b5cffcf3fdc97805f3a1b731b
CRs-Fixed: 2774457
packetdump_timer is stopped when deregistering the
function, to make align, start it when registering.
CRs-Fixed: 2748669
Change-Id: I9d106f81b04011111c4b01e6b6c50403202e7c6e
Currently, the INI param wlanLoggingToConsole is used to enable
or disable WLAN logging to console. It will enable/disable console
logs for all log levels i.e. FATAL/ERROR/WARN/INFO. There is no
provision to enable/disable console logs for specific log level.
To address this, change wlanLoggingToConsole INI as bitmap with each
bit representing a log level. Enable/disable console logs based on
this bitmap.
Change-Id: If3172195a2ee86d21c4c03f441a4cc3e2780dd82
CRs-Fixed: 2734707
There are multiple places in the driver where the diag events
are reported and if the unload has started these diag events
are logged and dropped if there is storm of diag events because
of some thread message flushing this logging of the message will
cause excessive logging.
Remove the log as driver is unloading and it won't be sending it
userspace logging either.
Change-Id: Ie4c5caf44ad509da213f1bc76ff6ef6dfeecde2d
CRs-Fixed: 2716899
Add a new wakelock for idle shutdown in order to prevent suspend
from occurring during idle shutdown.
Change-Id: Ia0c7422d3a12e7ff27d5acf9f57a81be13e5ef7d
CRs-Fixed: 2706461
If wlan logging is enabled then register a notifier block
to kernel's panic notifier chain. Notifier block contains a
callback function to print buffered wlan logs in the event
of kernel panic.
Change-Id: Id8cae651afe45e411e1ddf122c2bc9b5f6688327
CRs-Fixed: 2692163
New parameter txqueue is added for callback ndo_tx_timeout.
Add support for it under the kernel version compilation flag.
Change-Id: I0234dade56f65d15a4370404e17ff51a8a73ee4e
CRs-Fixed: 2666444
One parameter of proc_create_data is changed from struct
file_operations to struct proc_ops.
Add support for it under the kernel version compilation flag.
Change-Id: Ic87222f9c267debef56dcc66fc629854058ffabd
CRs-Fixed: 2666492
Variable "type_specific_data" is defined under macro
PKTLOG_HAS_SPECIFIC_DATA in struct ath_pktlog_hdr, but
used without control of the macro.
Change-Id: I9d46ddc141a0641aa6eaecf712c52e640c48053c
CRs-Fixed: 2665564
In kernel logs, qtimer currently logs the time-stamps in decimal. Change
time-stamp from decimal to hex in order to order to help correlate
better with other logs in hex qtimer time-stamp.
Change-Id: I46964609645305b1847406841e1b1b641aae9074
CRs-Fixed: 2666868
The gwlan_logging struct is used by offline tools, so it needs to be
made non-static. Remove the static keyword from gwlan_logging.
Change-Id: I05f47328914c40a2c957ca404b6681ba8507d367
CRs-Fixed: 2663164