Event indicating to the user space that the driver has detected an
internal failure. The driver is expected to recover from such a failure
automatically, e.g., by resetting the device.
This event carries the information indicating the reason that triggered
this detection.
Change-Id: Ia13e6f102e5e18ec4864ed258728369d51a77ff4
CRs-fixed: 2120886
Add IFACE_CHANGE_TIMER wake lock event to track
apps power collapse is prevent due to change
interafce timer is running.
Change-Id: I6df238ec2092d3190d0ae52748427955f7c35a9e
CRs-fixed: 2105189
The Linux Coding Style frowns upon mixed-case names and
so-called Hungarian notation, so rename pAdapter to align
with the Coding Style.
Change-Id: Iddd543a9e0fb61a92e0769abb234b93e44f603c2
CRs-Fixed: 2119798
A recent change added a wrapper to nla_parse. When CNSS_GENL is enabled,
this new wrapper API is not defined in cnss_diag_cmd_handler, causing a
compilation failure. Include the appropriate header file when CNSS_GENL
is enabled.
Change-Id: I2e929b48e306fb1426eb6e59011cd821922bb8dd
CRs-Fixed: 2112767
Linux kernel 4.10 removes the vm_area_struct parameter from the
vm_operations_struct->fault handler. Add conditional compilation to
provided the appropriate fault handler signature based on the version of
the Linux kernel being compiled against.
Change-Id: I467f4d8426ecfa55e4f2aac26a5326901239a752
CRs-Fixed: 2094824
Currently nl_srv_bcast() and nl_srv_ucast() allocate a temporary
buffer to hold the netlink message which is subsequently sent to
userspace. The value returned by qdf_mem_malloc() is not checked for
NULL, and hence if NULL is returned it will be dereferenced.
However in reality a temporary buffer is not required. Update the
functions to directly send the message from the skb.
Change-Id: Ia12e1695498323c4e29b8280b9265c20393a2fe7
CRs-Fixed: 2111674
The Linux kernel version 4.12 introduced an API change to nla_parse().
Add conditional compilation to call nla_parse with the correct
parameters based on the version of the linux kernel being compiled
against.
Change-Id: Ie904d217a42a2396f8245251a9c90a15dac2c0c9
CRs-Fixed: 2093354
Linux kernel 4.10 removed vm_fault->virtual_address in favor of simply
using vm_fault->address. Add conditional compilation to use the
appropriate vm_fault address field based on the version of the Linux
kernel being compiled against.
Change-Id: I3f29721888bf349a7ac4f5f62d576b668ee0abc2
CRs-Fixed: 2094806
wlan_logging_sock_svc has a reference to the vos_ctx. Since this is
obsolete, remove the reference.
Change-Id: I1256aa8a1220859911eceec8048a57856e64299a
CRs-Fixed: 2102456
The Linux Coding Style enumerates a few special cases where typedefs
are useful, but stresses "NEVER EVER use a typedef unless you can
clearly match one of those rules." The hdd_adapter_t typedef does not
meet any of those criteria, so replace references to it with a
reference to the underlying struct.
Change-Id: Ia5177a671f3657a23e88ec1a47c6ed0ac569934a
CRs-Fixed: 2100985
The Linux Coding Style enumerates a few special cases where typedefs
are useful, but stresses "NEVER EVER use a typedef unless you can
clearly match one of those rules." The hdd_context_t typedef does not
meet any of those criteria, so replace references to it with a
reference to the underlying struct.
Change-Id: I3dfe59ac92a374639faa6774a6538c5d970d3f1d
CRs-Fixed: 2100797
qcacld-2.0 to qcacld-3.0 propagation
Currently the crash can be injected by iwpriv command and FW
gets crashed.
Changes are done to add the gEnableCrashInject ini parameter
1) This ini param is disabled by default.
2) If this param is disabled the crash inject is ignored.
Change-Id: I082ca4101806033958b10869f151d6085ca7a2d6
CRs-Fixed: 2084606
To aid in debugging memory leaks, and improve the robustness of log
recovery from crash dumps, statically allocate pglog_msg in the global
scope. This allows logs to be inspected even in cases where a crash
came late in the unload process. It also improves log recovery
robustness by removing the possibility of using a NULL pointer offset
under certain memory corruptions scenarios.
Change-Id: I077198e358570661c2f3adf2704f2c48f4b2f6f8
CRs-Fixed: 2078548
cds_trigger_recovery no longer takes any arguments. Update calls to
cds_trigger_recovery accordingly.
Change-Id: I2d2f36c73baa2133496559bd8213aec8091e51b5
CRs-Fixed: 2073933
For fatal events , driver sends EVENT_WLAN_LOG_COMPLETE
to userspace. But there can be multiple events for each
ring id like connectivity, driver , frimware, wakelock etc.
Cnss diag has to trigger copy of pkt log to /sdcard only for
one bug report, so send ring id in log complete event so
that it can trigger copy for driver ring id.
Change-Id: I3b06bed52509e58ac4d79698c95ba5eb1baa3bb3
CRs-Fixed: 2053770
During HOST AP offload case fw is sending pktlog tx info
with invalid MSDU id. This will result in invalid de-reference
tx descriptor.
Discard pktlog msg for invalid msdu id to handle
the above scenario.
Change-Id: I772ab47d46b373ab0c4a8f7f7266697d4bccd703
CRs-Fixed: 2077611
Gcc 6 introduces some stricter checking for bool value
comparison, causing build errors when a certain code
block in CLD3.x driver is compiled.
Change-Id: I270e20dab8410f45e734c15d5365e30e314b55c8
CRs-Fixed: 2051383
WMI FW log debug FS is created irrespective of WLAN_DEBUGFS is defined
or not. Make sure to only create WMI log debugfs only if WLAN_DEBUGFS
is defined.
Change-Id: I8d7d5ef160ce2674b3f01dc7afa3ac4761538cab
CRs-Fixed: 2066664
Currently QDF trace error/fatal log messages are logged using
pr_info and bydefault these logs do not show up on console.
Hence log QDF trace error/fatal log messages using pr_err
such that bydefault these logs show up in console.
Change-Id: I220e5eb93ea21d01b948c40432179f294530ba0d
CRs-Fixed: 2070065
implicit conversion from enumeration type 'A_STATUS' to different enumeration type 'QDF_STATUS'
implicit conversion from enumeration type 'QDF_STATUS' to different enumeration type 'A_STATUS'
CRs-Fixed: 2063344
Change-Id: Id3613d0b7fca58c3d94c5af59838b0bff3ef26de
Currently logging thread priority is equal to cds
thread which can cause scheduling issues to other
priority tasks when there are too many wlan debug
messages.
Set logging thread priority to default value.
Change-Id: I578ac062a69a34f7f4b7a2450e59e3f934704934
CRs-Fixed: 2047462
In cnss_diag_cmd_handler(), add length check for the command attribute.
This prevents possibility of a buffer overread or underrun.
Also add audit comment to express the intent why policy table
is not used in this API.
Change-Id: I023bbf3789498f315fd1bff8db8ef8257abb2b04
CRs-Fixed: 2058580
Presently if the module name is changed to something other than wlan,
then MULTI_IF_NAME is defined and cnss diag log can't be captured
because the driver doesn't register itself to cnss_logger module.
Add fix to resolve this issue.
Also add free skb buffer operation for one case to sync with qcacld-2.0.
Change-Id: I815c5260fbc248e37e1ec0417ed5a8cc476ca8b7
CRs-Fixed: 2029803
In ptt_cmd_handler(), validate that the command attribute is of
minimum allowed size. This prevents parsing of rogue command
format. Also add audit comment to express the intent why policy
table is not used while using nla_parse API.
Change-Id: Ia2da6c88245190aad9a00110059fd6dcfda8a9fa
CRs-Fixed: 2058353
There can be a race condition if the pktlog_buf inside pktlog APIs,
is accessed simultanously from two threads.
To prevent this use mutex in the caller functions of pktlog APIs.
Change-Id: Iea6e3cd28a7a347c1753fe71d0646fb43ee184fa
CRs-Fixed: 2047150
wlan_nlink_common.h include linux/if.h, and linux/if.h
refers to 'struct sockaddr' which is defined in
linux/socket.h, and so it include linux/socket.h;
however, in userspace, linux/socket.h doesn't define
'sockaddr', so it will cause errors when compiling
userspace APP if it includs wlan_nlink_common.h.
Add macro __KERNEL__ to determine which header file
should be included:
For userspace, include net/if.h, it will include
sys/socket.h, which is for userspace;
for kernel space, include linux/if.h.
Change-Id: I3a2d8e6edb42871aa3599ef30fbb5d0d275764df
CRs-Fixed: 2054409
Update wlan nlink message header file with channel info.
These info will be sent to cnss daemon and daemon will
pass it to LOWI client.
CRs-Fixed: 2006217
Change-Id: I125a519e188774bb099058ad5c385787800e5411
Function dbglog_set_log_lvl needs to be commented out for WIN compilation
since enum DBG_LOG_LVL is not converged. Functions nl_srv_bcast and
nl_srv_is_initialized needs to be exported out for pushing FW Diag Log
events to user-space (cnss-diag)
CRs-Fixed: 2048651
Change-Id: I57a4bd3d78680b97bd75191ca58349abeb77240a
ol_defines header inclusion is invalid in WMI layer.
Remove the header inclusion by abstracting the dependency
with in WMI layer.
Change-Id: I5eb8624605cde20b516a1d8d0c823996c363e119
CRs-Fixed: 2023821
There can be a race condition if two different threads use the
pkt log buffer at the same time. This issue can lead to Use-After-Free
of the packet log buffer.
To address this issue, protect the pktlog buffer access using spinlock.
Change-Id: I75d9375c9d85ac26dab1c06658d3f0fdbeb62935
CRs-Fixed: 2034486
When pktlog enable gives an error as part of pktlog_release,
then return the error value.
Change-Id: I88289226d3dc933a46d6dba0cd6ee0b6d2abb2d5
CRs-Fixed: 2031287
Add infrastructure in pktlog utils to collect pktlogs as part
of bug report generation. As part of this when pktlog read command
is received on host:
1. disable pktlog,
2. read pktlog,
3. clear pktlog buffer,and
4. Retain pktlog initial state
Change-Id: I67e2231c2897007b58fa42a4f931b3c35ad1f418
CRs-Fixed: 2031287
Now all host and firmware logs are sent to multicast group id's
and are not sent to particular process on userspace.
Change-Id: I6fc9540de1313d6a2ad3564090e5fed281f54a62
CRs-Fixed: 2024754
Implement iwpriv pktlog command to clear pktlog buffer.
This command is effective only if pktlog disable is issued previously.
This command needs one argument.
Command to use this feature : iwpriv wlan0 pktlog 4
Change-Id: I431169a10828b6cfcd21c7d8065f325c5eb8cbba
CRs-Fixed: 2031212
Currently the config ini "wlanLoggingFEToConsole" specifically talks
about enabling the logs to kmsg for FATAL and ERROR logs.
This cfg.ini item should not be specific to any log level, instead
it should just depict whether logging to console should be enabled
or not. Hence change wlanLoggingFEToConsole to wlanLoggingToConsole.
Change-Id: I54e340ed58891175b53ac2d0137d15a2baea1c9f
CRs-Fixed: 2017427
Move the logs to appropriate log levels to avoid excessive
logging in kmsg. Also log the error reason and line number.
Change-Id: I08ed38861ff0b3d50861b957de34b1c62bc45afb
CRs-Fixed: 2024378
Include the correct header file in epping module for policy manager as
part of policy manager restructuring.
Change-Id: I115e1473fade0da0c6fc2c2ce9eda061c83dfe66
CRs-Fixed: 2009818
If netlink_unicast() fails it already frees SKB buffer hence
do not double free the SKB when netlink_unicast() returns failure.
Change-Id: I2aa99c47f99c573abbd281c06ff58fcb38aad76b
CRs-Fixed: 2022800
At this point lot of Win code already uses QDF_TRACE macro. It will be
difficult to translate QDF_TRACE to qdf_trace_msg unless all the modules
(already using QDF_TRACE) make changes to use the qdf_print_ctrl
framework. Until that happens, we can have a shared object temporarily
so that wlan_log_to_user and hence user space logging of messages can be
in place
Change-Id: Ia149b86de8c2c36ed1c8508570b31db25f6bc41e
CRs-Fixed: 2018767
Add single wrapper API to send message over legacy userspace socket
or GENL socket.
Change-Id: I7cf46651d64467e77d85c147080d74a7470e42d6
CRs-Fixed: 2003488