Currently many host hang reason codes are not mapped to corresponding
userspace codes as a result these hang reason code will be invalid
for userspace and also QDF_REASON_UNSPECIFIED is used in some places
in host.
To add mappings for host hang codes to corresponding to userspace
hang codes and also add new hang codes.
Change-Id: Idb21ccb4a34c9c94872798404912bdb743e9270b
CRs-Fixed: 3381229
Current code does not use the SSR host log collection API.
Fix this by adding SSR host log collection API usage.
Change-Id: I9dfb0bd7054986760a711d0752f37f4327c706b2
CRs-Fixed: 3339933
Add event id to support Neighbor report and beacon report for
diag logging.
Add EVENT_WLAN_NBR_RPT event to send Neighbor report diag logs
and EVENT_WLAN_BCN_RPT event to send Beacon report diag logs.
Change-Id: I5c7207667e2bad803389e160912357bc87196131
CRs-Fixed: 3370803
Add more log for wlan_logging_thread to monitor
thread start/exit.
and also add memory barrier wmb to make sure exit
flag/shutdown_comp have been set done.
Change-Id: I6549f344f50bdd9df3a29c4ab724ea67213670de
CRs-Fixed: 3320274
List iterators should conform to upstream discussion. List iterators that
reach end of list do not point to NULL but rather they point to list_head.
Dereferencing the iterator in this case would break the list. The scope of
the list iterator should be confined to the loop. Solution is to use assign
ptr to iterator when condition is met, this ptr can be used outside of the
loop.
Change-Id: I896b85bbd24b63e6b1562d35ffec8abc920f1b6d
CRs-Fixed: 3331681
Add new enum WIFI_POWER_EVENT_WAKELOCK_DYN_MAC_ADDR_UPDATE
for dynamic MAC address update wake lock reason code.
Change-Id: I61b9b54b2aca30eec9aa1d153a40877bfda88af9
CRs-Fixed: 3327592
Several QDF suppressed logging APIs were originally named with a
misspelling of "suppressed." New correctly-spelled functions are
available, so call those instead.
Change-Id: I4fcd506b39cedd6f094f93ee900cf9ce8be759c1
CRs-Fixed: 3313686
In kernel 5.17, net_device->dev_addr is changed to const unsigned char*
and can only be updated via dev_addr_mod(). Add a new function
qdf_net_update_net_device_dev_addr() to call kernel API dev_addr_mod().
Change-Id: Ifecfb453f5dc6b066892c04f4bdbec3759e32c53
CRs-Fixed: 3298120
In kernel 5.17, PDE_DATA() is replaced with pde_data(). Make
matching change in ath_procfs.c and linux_ac.c files.
Change-Id: Ia198545322146d4adde9330c19b43f5c2ed0dfa2
CRs-Fixed: 3298062
In kernel 5.17, complete_and_exit is replaced with
kthread_complete_and_exit. So if kernel version is >= 5.17,
then use kthread_complete_and_exit.
Change-Id: I4e9a98373197eba4931a8dafe77040448ffb40eb
CRs-Fixed: 3297481
Multiple instances of the misspelling "recevied" are present, so
replace them with the correct spelling "received."
Change-Id: Ibd7f4a136541be8aa98f5bee4db7f75af0271f53
CRs-Fixed: 3273526
The roam reason and roam sub-reason code sent and expected
reason codes at supplicant are diffent which results in
wrong interpretation of reason code.
Add roam reason and roam sub-reason code enum in order
to aid the converion from fw roam reason code to supplicant
understandable reason code.
Change-Id: I3432793965e325ddbf90ab90a1532a0726650d8c
CRs-Fixed: 3238496
The existing design is to send connectivity event logs
via vendor command.
New diag events are introduced to maintain single
logging infrastructure.
Change-Id: I162680b40127826cd74e7b437b7cdaeb81b96bc1
CRs-Fixed: 3220081
Add new flag CONNECTIVITY_PKTLOG to make independent of
FEATURE_PKTLOG and REMOVE_PKT_LOG for packet logging.
This is because 32 tx/rx pkt logging is connection related
and this feature is independent of pkt log feature. Here
driver will send first 32 tx/rx pkts consisting of mgmt
and data pkts to userspace which can be used for debugging
Change-Id: I006a040546c9709f46e76dcd8630da8569c691c6
CRs-Fixed: 3222971
Add new QDF enum for packet type and make
changes to pass status and type to packetlog callback APIs as QDF type
Change-Id: I423839e42b316ce43feaae34e297d3d8f0dee7ba
CRs-Fixed: 3224881
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