Commit Graph

145 Commits

Author SHA1 Message Date
Pavankumar Nandeshwar
ad5e0bd66f qcacmn: Change fwlogs API for smartlogs
Add function pointers for calling smartlogs init and deinit.

CRs-Fixed: 2008290
Change-Id: I4734e490394a24f5a39eb50f3ac386ad99834cb3
2018-11-19 11:05:49 -08:00
Manjunathappa Prakash
c6e684b128 qcacmn: pkt_log: Use qdf_spin_lock APIs debug infrastructure
Use QDF spin_lock APIs so that we can make use the debug infra.
This will help to identify catch issue related to unbalanced lock
operations or unexpectedely long locks.

Change-Id: I318bcb90340d98813f19862fda14e6ada30bbed6
CRs-Fixed: 2349308
2018-11-16 13:34:38 -08:00
Alok Kumar
db0d42384f qcacmn: Add vendor event to update TCP parameters
Currently, TCP params are configured through cnss-daemon.

Add vendor event to configure TCP params through Wi-Fi HAL.

Change-Id: Ifb81b810f0fb830515fb4558d016778083323b5a
CRs-Fixed: 2348945
2018-11-14 01:10:55 -08:00
Venkata Sharath Chandra Manchala
0ce469e330 qcacmn: Add pktlog handler to process rate events
Add dp_msg_pktlog_handler to handle
rate events from the firmware.

Change-Id: I24776caa3b78ec38d94421f243ec72d81ee3102d
CRs-Fixed: 2340639
2018-11-11 09:27:32 -08:00
Venkata Sharath Chandra Manchala
8747958dff qcacmn: Enable Monitor Mode for QCA6390
Support Monitor Mode for QCA6390 as RXDMA1 block is
now removed.
1. Monitor buffers are now received on rxdma_err_dst_ring
2. RXDMA1 monitor status ring is moved to RXDMA0 monitor
   status ring
3. Msdu link descriptors are now returned to WBM descriptor
   release ring.
4. Reap the Monitor buffers and return it to SW Refill ring.
5. Use the same rx descriptor pool for regular and monitor data.

Change-Id: If41e5d13f942da2b97e5aab72b88ae344925ba67
CRs-Fixed: 2297300
2018-10-26 10:39:37 -07:00
Dustin Brown
aaa97751a6 qcacmn: Add excessive logging detection
One of the most common stability issues encountered by the stability
team is watchdog bite due to excessive logging. Add a feature to track
logging to dmesg using a tumbling window and counter, and panic if the
configured maximum number of logs for that window is exceeded.

Change-Id: If83c6dfccb9d191b02a3a7166b065c0a0704f969
CRs-Fixed: 2338385
2018-10-25 12:33:04 -07:00
Pratik Gandhi
8af026a2ca qcacmn: Abstract BMI and add export symbols for ko separation
Abstract BMI callback from common module and move it to specific component.
Add Export symbols to support modularization in WIN. (BMI)

CRs-Fixed: 2324081
Change-Id: I1ec463d41d238ce81254ecc1f0bb1dc545e1248e
2018-10-18 06:32:45 -07:00
Dustin Brown
02818ec2e5 qcacmn: Log to console per log level
Currently, every message which is logged to console is logged at the
same level. Instead, log each message using an appropriate pr_* API
based on the log level of the message being logged.

Change-Id: I0638f3ab155576ed87d663a4b060d16969cf816c
CRs-Fixed: 2327148
2018-10-05 00:27:49 -07:00
Rajeev Kumar
b7dcab9948 qcacmn: Use pr_info for wlan driver console logging
Use pr_info for wlan driver console logging such that its
backward compatible with qcacld-3.1 and by default info log
levels are not logged on console unless kernel's printk current
console log level is changed to print info logs as well on console.

Change-Id: I33ca583743a9b77253390abcece6c8067f38c35d
CRs-Fixed: 2326304
2018-10-02 22:28:45 -07:00
Dustin Brown
e60cba22e1 qcacmn: Remove radio index from logs
As part of the effort to reduce the volume of logs produced by wlan,
remove the radio index from the base information which gets logged with
every message. The module name, which is also logged with every message,
is the preferred way to keep track of which wlan module is logging.

Change-Id: Ib13f12c55fb9a90ac61661d2a13e44913997804e
CRs-Fixed: 2318008
2018-09-21 22:40:33 -07:00
Adil Saeed Musthafa
12205b544b qcacmn: Add timer to flush out log buffers periodically
Add timer to flush out log buffers periodically. Add command to set the
time period value.

Change-Id: I8e796a9bc7caac2661d00852420dd5fa66f5bca5
CRs-Fixed: 2296362
2018-09-21 20:50:55 -07:00
Paul Zhang
f7fb463692 qcacmn: Stability feature enhancement
Stability feature enhancement to log below highlighted QTIMER
tick into Hexadecimal(currently its logged in decimal) such
that it can easily compare WLAN log QTIMER with WMI and HTC
credit log in crash-scope.

Change-Id: I0e0db3cbe90519248be98678e692cc89a87fcd2f
CRs-Fixed: 2315210
2018-09-21 03:53:38 -07:00
gaurank kathpalia
85e55d12d6 qcacmn: Add src, and dst id support in PKTLOG(WMA)
In the scheduler_post_message, src_id is now added to
know the source module of the msg. the present scheduler
doesn't know about the same which is scheduler_post_msg

Replace the scheduler_post_msg with scheduler_post_message

Change-Id: I166f4c943b9a21749c53ed19101b0ed0defd8491
CRs-Fixed: 2306013
2018-09-17 06:09:52 -07:00
Qiwei Cai
5d4acd79ad qcacmn: Featurize BUILD_DIAG_VERSION
Featurize BUILD_DIAG_VERSION to compile out to save memory.

Change-Id: I4d221387003770e5344069dc4cf1f72b7ce9e0ad
CRs-Fixed: 2301492
2018-09-11 08:44:18 -07:00
Manjunathappa Prakash
d0fc0ea364 qcacmn: Add more debug_ids and reduce the dump log level
Add more debug IDs to narrow down further funciton who is holding peer
reference. Reduce the peer debug dump log level to avoid side effects of
console logging.

Change-Id: I9820c72bcde8a0c2b0e779cf322e1133ef8a43e6
CRs-Fixed: 2303069
2018-09-01 01:42:42 -07:00
Aditya Sathish
f78a3d8ca5 qcacmn: Clean up spectral, tif and umac component prints
Clean up spectral, tif and umac component prints by correcting trace
levels for regularly occurring prints and removing newlines from
converged print APIs since qdf_trace_msg appends them by default.

Change-Id: Ib10f1b1c54ecbcb9f4076be7c2c4708359d488e0
CRs-Fixed: 2243843
2018-08-10 18:11:18 -07:00
Ashish Kumar Dhanotiya
d9b88605c5 qcacmn: Update current pktlog state if pktlog enable fails
If user tries to enable pktlog multiple times, pktlog enable
fails as the pktlog is already enabled.
while returning failure, current pktlog state is not updated
to PKTLOG_OPR_NOT_IN_PROGRESS in pktlog_enable api.
Now if user tries to get pktlog using cat command driver
returns resource busy from pktlog_enable as the current
pktlog state is not set to PKTLOG_OPR_NOT_IN_PROGRESS.

To address this issue, set the current pktlog state to
PKTLOG_OPR_NOT_IN_PROGRESS in case of failure.

Change-Id: I08e67c13e7a781340a97ad4c37308f3e61972c99
CRs-Fixed: 2278363
2018-08-06 22:43:12 -07:00
Jiachao Wu
72eeed89e5 qcacmn: Add NULL check for 'pl_dev'
Currently 'pl_dev' is dereferenced without check for NULL in
get_pktlog_handle function in pktlog_internal.c.
To address this issue add NULL check before dereferencing.

Change-Id: I7017560d5eb36df3ca0a547cf62451f339f5940b
CRs-Fixed: 2280047
2018-07-24 01:06:19 -07:00
Qiwei Cai
59ec405e49 qcacmn: Allocate roam debug buffer dynamically
Allocate memory for global_wlan_roam_debug_table dynamically.

Change-Id: I73a7654cbe75c288aae58e50c6d2072dc6a1e2fe
CRs-Fixed: 2275994
2018-07-13 02:58:39 -07:00
Rachit Kankane
dfd97f38f6 qcacmn: Call blocking functions in right context
Call blocking functions free_g_qdf_dp_trace_tbl_buffer and
allocate_log_msg_buffer under non-atomic context.

Change-Id: I534c95b19cb08472db4a4a0f8285769841b00326
CRs-Fixed: 2273581
2018-07-09 05:32:55 -07:00
Alok Kumar
e7ac594b6a qcacmn: Fix information leak issue during memcpy
The buffer allocated with length "ATH6KL_FWLOG_PAYLOAD_SIZE"
is not initialized, this may lead to information leak during
memcpy when len < ATH6KL_FWLOG_PAYLOAD_SIZE.

To resolve this issue, memset the buffer for length
(ATH6KL_FWLOG_PAYLOAD_SIZE - len) to 0

Change-Id: If4a49347d674ad2af0438b408a4a4b9308c61026
CRs-Fixed: 2255083
2018-06-29 17:27:48 -07:00
Rachit Kankane
97c4e1efcc qcacmn: Allocate gplog_msg dynamically
Allocate memory for gplog_msg buffer dynamically.

Change-Id: I70b79215b5f318217de180a53c4bad5f237be37d
CRs-Fixed: 2266814
2018-06-27 07:24:40 -07:00
Ryan Hsu
c84218fed7 qcacmn: Add SSR callbacks
As CDS is not usable by WIN, add callbacks that are
registered in QDF and correct the module dependencies.

Also moves the platform related function to qdf_platform.[c|h]

Change-Id: I3080e9df86770235ff46237b8a2ffb9c2a3c9c2c
CRs-fixed: 2130260
2018-06-20 04:05:54 -07:00
Qiwei Cai
1c8f4f7be2 qcacmn: Featurize wlan roam debug
Featurize wlan roam debug log to compile out in mission mode.

Change-Id: Ic3dcdc6ab541093f16fcc8b9118120aa1f9b972f
CRs-Fixed: 2241297
2018-06-20 00:43:28 -07:00
Vignesh Viswanathan
4c9e971f8e qcacmn: Deregister NL MSG handlers during hdd_wlan_exit
Currently the NL MSG handlers for WLAN_NL_MSG_CNSS_DIAG, ANI_NL_MSG_PUMAC
and ANI_NL_MSG_PTT are not deregistered during hdd_wlan_exit which can
causes a page fault if NL issues cld80211_doit for these NL messages
when the WLAN is not up.

Add Deregsiter APIs for all the NL MSGs to call as part of
hdd_exit_netlink_services during hdd_wlan_exit.

Change-Id: I231e2f32e708e9a14305f0a8f9f2f603aa42b031
CRs-Fixed: 2243993
2018-06-18 16:33:47 -07:00
Nirav Shah
79ec3e999b qcacmn: Add support to configure buffer size from kbuild
Add support to configure logging buffer size from
per-OEM kbuild based on memory requirement.

Change-Id: Ia91d79e5e738b1c9787015de101c3f67ccde46aa
CRs-Fixed: 2253438
2018-06-15 21:31:16 -07:00
Rajeev Kumar
c396c9015a qcacmn: Log reason code while flushing logging events
Log reason code while flushing logging events to precisely know
the reason of failure.

Change-Id: Ibe26563780f165e85490c54c2b4f83d959a3587f
CRs-Fixed: 2235276
2018-06-14 20:55:47 -07:00
bings
315d67f3f4 qcacmn: Fix pl_info->log_stat update
If log state 1, 2, 0, 1 are set serially, log state 2 can't be set
successfully, while log state 1 is set to wdi twice, which results
in two same pointers in doubly linked list txrx_pdev->wdi_event_list
and causes dead loop.

Update pl_info->log_stat only when it is subscribed to wdi and sent
to firmware successfully.

Change-Id: I8d67b9f02a2fb2c958d2553a743cbabcedfb2f42
CRs-Fixed: 2250715
2018-06-14 02:56:49 -07:00
Abhinav Kumar
5fb51321a8 qcacmn: Add diag events for debugging
Currently there are no diag events to inform user space about
used AKM Suite, requested pairwise cipher, group cipher, and
group key management in assoc request and algo num used in auth
req.

Add such diag events which can be useful in automation.

Change-Id: I25336d541f507bfa16e3b6e10b0653fcce898021
CRs-Fixed: 2225883
2018-06-14 02:56:44 -07:00
Krunal Soni
f909a8a0af qcacmn: Fix enum values of MGMT subtype field to correct value
MGMT frame's subtype enums are not correctly displayed on debugging tool
due to incorrect enum values.

CRs-Fixed: 2252180
Change-Id: Ib7e7111e43e95166e3ba87a758295948eb72ba0f
2018-06-13 21:00:52 -07:00
Nirav Shah
c9b0931950 qcacmn: Featurize packet log
Featurize packet log.

Change-Id: Ica7d658ef65486ae77e24a11cef50291a5e82563
CRs-Fixed: 2245424
2018-06-09 02:28:11 -07:00
Jeff Johnson
a66ede604e qcacmn: Replace reference to typedef cds_context_type
To align with the Linux Kernel coding style typedef cds_context_type
is in the process of being removed, so replace the reference in epping
with a reference to the underlying struct.

Change-Id: Ifdc5bca8d7aa97bf7dc06238c4f9fddc304a0d05
CRs-Fixed: 2250663
2018-06-04 13:59:01 -07:00
wadesong
0b79d037ff qcacmn: Add support for ACS diag event
Add APIs for ACS diag event:

- EVENT_WLAN_ACS_REQ
  ACS request event indication

- EVENT_WLAN_ACS_SCAN_START
  Indicates the diag event for ACS scan start request

- EVENT_WLAN_ACS_SCAN_DONE
  Indicates the diag event for ACS scan done

- EVENT_WLAN_ACS_BEST_CHANNEL
  Indicates the best channel has been selected after ACS

- EVENT_WLAN_ACS_CHANNEL_SPECTRAL_WEIGHTCHAN
  Indicates a diag event for ACS channel weight evaluation result

Change-Id: I508449c597caddba14a49aa9cf5da671b80e5bc4
CRs-Fixed: 2238687
2018-05-31 19:23:14 -07:00
Wen Gong
583a3b1b18 qcacmn: Featurize dbglog_host
Featurize parsing support for WLAN firmware logs in WLAN host driver

Change-Id: I94a75a0ab09f086209298bdd4870df78e9733a3f
CRs-Fixed: 2228370
2018-05-30 01:42:30 -07:00
Manikandan Mohan
660b3d4ce4 qcacmn: Fix nl service link module for multi driver compilation
Qcacld supports multiple driver modules instance generation with
different file names and Kbuild options. Fix driver load time and
compilation errors on this feature.

Change-Id: I1ad66d3855379a59be071f8d0c4504a9bb5ebd5b
CRs-fixed: 2208751
2018-05-23 20:45:36 -07:00
Jeff Johnson
c7bfa72ec1 qcacmn: utils: Fix misspellings
Address the following issues in the utils folder:
CHECK: 'interupt' may be misspelled - perhaps 'interrupt'?
CHECK: 'ommitted' may be misspelled - perhaps 'omitted'?
CHECK: 'TRESHOLD' may be misspelled - perhaps 'THRESHOLD'?

Change-Id: Ic9c2fdf2566f3bdd8c37906e52ed65d4dc1d1563
CRs-Fixed: 2241587
2018-05-19 22:14:43 -07:00
Jeff Johnson
5f255001d9 qcacmn: utils: Remove legacy markings
Per current guidance remove legacy markings.

Change-Id: I0bb870b4c83129d2466aeb4741d27783de888008
CRs-Fixed: 2230684
2018-05-18 02:17:50 -07:00
Linux Build Service Account
4d71268f01 Merge "qcacmn: Converge dbglog and diag_event_log" 2018-05-07 00:58:56 -07:00
Kai Liu
d7bfcdf520 qcacmn: Refine API wlan_log_to_user
Remove redundant message length check.
Truncate message immediately if its length is over MAX_LOGMSG_LENGTH,
so that can remove min check between true length and max available length.

Change-Id: I7e6c61021316a727e04dbb9671947b6413c27af3
CRs-fixed: 2229210
2018-05-04 00:48:04 -07:00
Pratik Gandhi
b002f889e7 qcacmn: Converge dbglog and diag_event_log
Converge dbglog and diag_event_log component through fwlog api
interface. It abstracts dbglog and diag_event_log from other
components.

Change-Id: I8f86a4381fbb9af8386320906337638113c8f189
CRs-Fixed: 2217556
2018-05-01 23:01:44 -07:00
Srinivas Girigowda
22d99df340 qcacmn: Fix function return type for epping_hard_start_xmit
Fix function return type for epping_hard_start_xmit.
Currently .ndo_start_xmit callback functions returns int, but
the correct return type should be netdev_tx_t.

Change-Id: I36d3cc886bfa0fd74a264f2791f09a251baab2ef
CRs-Fixed: 2219223
2018-04-06 14:47:20 -07:00
Rajeev Kumar
708e7f57c5 qcacmn: Remove multicast logging check from wlan_log_to_user API
Multicast logging is MCL specific feature which controls sending
of host and fw netlink DIAG events to user space. This feature
should not control console logging from wlan_log_to_user because
it can lead to all debug logs getting logged on console until
CFG INI for multicast logging is parsed during initialization and
this can lead to watchdog bark beacuse of excessive logging during
WiFi driver initialization. Hence remove multicast logging check
from wlan_log_to_user API to avoid logging all debug logs on console
during WiFi driver initialization sequence.

Change-Id: I2a29928757f683a72345436a57de1ee8d02f53b3
CRs-Fixed: 2217749
2018-04-05 16:41:16 -07:00
Manjunathappa Prakash
9eaa6f099b qcacmn: Remove redefinition of *tx_flow_control_fp
ol_txrx_tx_flow_control_fp and ol_txrx_tx_flow_control_is_pause_fp are
redefined dp/inc/cdp_txrx_mob_def.h, original definition is in
dp/inc/cdp_txrx_cmn_struct.h. Remove duplicate redefinition.

Change-Id: I2c2af59d8b24360cd09efeb12ea19c0340771bb8
CRs-Fixed: 2215678
2018-04-04 04:02:08 -07:00
Yuanyuan Liu
80bfeb949d qcacmn: Fix LLVM compiling issues
Remove typedef redefinition, use correct enum type, remove extra
parentheses and correct header guard.

CRs-Fixed: 2214003
Change-Id: I0a75c70cd530590a16f6bfa884955ebc26906de0
2018-04-02 16:41:52 -07:00
jitiphil
3caf63aa26 qcacmn: Add NULL check for 'pl_dev'
Currently 'pl_dev' is dereferenced without check for NULL in
get_pktlog_handle function in pktlog_internal.c

To address this issue add NULL check before dereferencing

Change-Id: Ic258db7bf1b404ff4f2d6c18abe775335074268b
CRs-Fixed: 2196058
2018-03-30 02:46:51 -07:00
Vivek
2b109825ac qcacmn: Replace A_UINT with appropriate types
There are instances of use of older A_UINT/A_INT.
Replace all such instances with the qdf u_int*_t/int*_t.

Change-Id: I7ce29b03f29a0d1a0cf87cfd3c846f4694da4c2a
CR's-Fixed: 2210869
2018-03-26 04:58:12 -07:00
Krunal Soni
d45830e34f qcacmn: Add new diag event to capture connection stats
Add diag event and its structure to log various connection statistics
after the connection has been made.

Change-Id: I3572cd9230d89e2d4154fd43579c258a2e2bdb58
CRs-Fixed: 2208509
2018-03-20 22:35:20 -07:00
Krunal Soni
6ace02054e qcacmn: Add new diag events to log TX and RX mgmt frames
Add diag events and their structures to log TX and RX mgmt
frames.

Change-Id: I2f30c46d0087dc6a31fcb874713a574fe5936ea7
CRs-Fixed: 2208506
2018-03-20 22:35:17 -07:00
jitiphil
0081d767f1 qcacmn: Fix buffer overflow in process_tx_info and process_rx_info
Currently data in "pl_tgt_hdr" is used directly from firmware without
any length check which may cause buffer over-read.

To address this issue add length check before accessing data offset

Change-Id: Ic2930fdf7168b79a8522be282b0e1cd19214742a
CRs-Fixed: 2191170
2018-03-20 14:34:00 -07:00
Manikandan Mohan
5bdb2fe470 qcacmn: Fix export symbol for multi drivers compilation
Update driver files to use qdf_export_symbol to facilitate
multiple driver module compilation support.

Change-Id: Ic7d7f65b79e92957b02c0386ba98af2adf17506b
CRs-fixed: 2197751
2018-03-19 19:58:03 -07:00