dhd: import wifi and bluetooth firmware
[GitHub/LineageOS/G12/android_hardware_amlogic_kernel-modules_dhd-driver.git] / bcmdhd.101.10.240.x / dhd_event_log_filter.h
CommitLineData
1b4a7c03
LJ
1/*
2 * Wifi dongle status Filter and Report
3 *
4 * Copyright (C) 2020, Broadcom.
5 *
6 * Unless you and Broadcom execute a separate written software license
7 * agreement governing use of this software, this software is licensed to you
8 * under the terms of the GNU General Public License version 2 (the "GPL"),
9 * available at http://www.broadcom.com/licenses/GPLv2.php, with the
10 * following added to such license:
11 *
12 * As a special exception, the copyright holders of this software give you
13 * permission to link this software with independent modules, and to copy and
14 * distribute the resulting executable under terms of your choice, provided that
15 * you also meet, for each linked independent module, the terms and conditions of
16 * the license of that module. An independent module is a module which is not
17 * derived from this software. The special exception does not apply to any
18 * modifications of the software.
19 *
20 *
21 * <<Broadcom-WL-IPTag/Open:>>
22 *
23 * $Id$
24 */
25
26#ifndef dhd_event_log_filter_h
27#define dhd_event_log_filter_h
28#include <dhd.h>
29#include <event_log_tag.h>
30#include <dhd_debug.h>
31
32typedef struct {
33 uint16 version;
34 uint8 htr_type; /* from wl_slice_hist_XX_stats_xtlv_id */
35 uint8 htr_num; /* number of elements in htr_running or htr_rc */
36 uint32 htr_rn_last; /* last reasons along with seq, etc */
37 uint32 htr_rn_ts_last; /* last time stamps corr to htr_rn_last */
38 uint32 htr_rn_prev; /* last reasons along with seq, etc */
39 uint32 htr_rn_ts_prev; /* last time stamps corr to htr_rn_prev */
40 uint32 htr_rc_max; /* largest toss reasons and counts */
41 uint32 htr_rc_ts_max; /* latest time stamp corr to htr_rc_max */
42 uint32 htr_rc_secnd; /* second largest toss reasons and counts */
43 uint32 htr_rc_ts_secnd; /* latest time stamps corr to htr_rc_second */
44} evt_hist_compact_toss_stats_v1_t;
45
46int dhd_event_log_filter_init(dhd_pub_t *dhdp, uint8 *buf, uint32 buf_size);
47void dhd_event_log_filter_deinit(dhd_pub_t *dhdp);
48void dhd_event_log_filter_event_handler(
49 dhd_pub_t *dhdp, prcd_event_log_hdr_t *plog_hdr, uint32 *data);
50
51void dhd_event_log_filter_notify_connect_request(dhd_pub_t *dhdp, uint8 *bssid, int channel);
52void dhd_event_log_filter_notify_connect_done(dhd_pub_t *dhdp, uint8 *bssid, int roam);
53#ifdef WLADPS_ENERGY_GAIN
54int dhd_event_log_filter_adps_energy_gain(dhd_pub_t *dhdp);
55#endif /* WLADPS_ENERGY_GAIN */
56#endif /* !dhd_event_log_filter_h */