Commit Graph

67 Commits

Author SHA1 Message Date
Poddar, Siddarth
658455b413 qcacmn: Restrict max/min pktlog buffer size using pktlogconf tool
Restrict the pktlog buffer size to a minimum of 1MB and maximum
of 16MB using pktlogconf tool or through sysctl command.

Change-Id: I1c67ed724c512f57c5d6e555be14b0b0e23d203f
CRs-Fixed: 2133723
2017-10-30 03:25:50 -07:00
Orhan K AKYILDIZ
6bd48f118a qcacmn: Add sanity check for pktlog msgs
Add sanity check for pktlog messages, as we have seen a single case
of inconsisten nbuf. Assert if fails.

Change-Id: I6a076c4dfaa2ff8e1972dd795cadeca1302b2c0e
CRs-Fixed: 2131952
2017-10-26 17:47:30 -07:00
Manjunathappa Prakash
2620760503 qcacmn: Add protection for pkt_log ops with module stop
Packet log ops are protected against load-unload and SSR, but not
against module stop. Take care to add check for module stop.
Also takecare to NULLing of wdi_event_list and NULL check before accessing.

Change-Id: I20d49ff587719fc14f60a53e86092383de6ef5b8
CRs-Fixed: 2131044
2017-10-25 13:41:05 -07:00
Manjunathappa Prakash
fe0b0d43c2 qcacmn: SSR protect the pktlog_fops functions
Protect pktlog_fops callback function from sub system restart.

Change-Id: Iaaa50f609a96058e5f1a669f88c97e4a97193562
CRs-Fixed: 2131028
2017-10-23 20:23:50 -07:00
Dustin Brown
4ff1c130d3 qcacmn: Remove vma from vm_operations_struct->fault handler
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
2017-09-19 13:27:50 -07:00
Dustin Brown
8f6788d071 qcacmn: Use vm_fault->address instead of virtual_address
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
2017-09-08 01:57:46 -07:00
Zhu Jianmin
25ff719058 qcacmn: qcacld-3.0: Discard pktlog message for invalid msdu id
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
2017-08-07 05:08:32 -07:00
Rakesh Pillai
13146458f9 qcacmn: Fix CLANG warnings in Data path
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
2017-06-30 22:50:37 -07:00
Ashish Kumar Dhanotiya
a55792d148 qcacmn: Race condition while using pkt log buffer
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
2017-06-05 05:29:56 -07:00
Manikandan Mohan
50ec704606 qcacmn: Update for check patch fixes
Fix for compilation errors after check patch fixes

Change-Id: Ib530d8d860440754f526ac93f5b12dbeab45b8aa
CRs-fixed: 2033001
2017-05-02 13:29:33 -07:00
Govind Singh
e3331b5b3c qcacmn: Remove ol_defines dependency from WMI layer
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
2017-04-28 07:42:08 -07:00
Ashish Kumar Dhanotiya
485d594ea1 qcacmn: Race condition while using pkt log buffer
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
2017-04-21 00:25:09 -07:00
Poddar, Siddarth
6bb2c1755f qcacmn: Return the error value if pktlog is not enabled
When pktlog enable gives an error as part of pktlog_release,
then return the error value.

Change-Id: I88289226d3dc933a46d6dba0cd6ee0b6d2abb2d5
CRs-Fixed: 2031287
2017-04-17 04:47:57 -07:00
Poddar, Siddarth
3a52bd7e6a qcacmn: Add support to collect pktlogs as part of bugreport
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
2017-04-17 04:47:56 -07:00
Poddar, Siddarth
5503c76aca qcacmn: Add iwpriv pktlog command to clear pktlog buffer
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
2017-04-12 01:14:08 -07:00
Poddar, Siddarth
e0a0247ead qcacmn: Reduce the log spam in kmsg
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
2017-04-03 13:47:20 -07:00
Srinivas Girigowda
60644c29e6 qcacmn: Add core\utils directory and files to qcacmn
As a part of UMAC convergence, move the core\utils logging to qcacmn.

CRs-Fixed: 1109855
Change-Id: I499a392f74f3e52e99df4d03e4a27bce6cf5be7c
2017-02-17 22:13:07 -08:00