1*4882a593Smuzhiyun /* 2*4882a593Smuzhiyun * Bigdata logging and report. None EWP and Hang event. 3*4882a593Smuzhiyun * 4*4882a593Smuzhiyun * Copyright (C) 2020, Broadcom. 5*4882a593Smuzhiyun * 6*4882a593Smuzhiyun * Unless you and Broadcom execute a separate written software license 7*4882a593Smuzhiyun * agreement governing use of this software, this software is licensed to you 8*4882a593Smuzhiyun * under the terms of the GNU General Public License version 2 (the "GPL"), 9*4882a593Smuzhiyun * available at http://www.broadcom.com/licenses/GPLv2.php, with the 10*4882a593Smuzhiyun * following added to such license: 11*4882a593Smuzhiyun * 12*4882a593Smuzhiyun * As a special exception, the copyright holders of this software give you 13*4882a593Smuzhiyun * permission to link this software with independent modules, and to copy and 14*4882a593Smuzhiyun * distribute the resulting executable under terms of your choice, provided that 15*4882a593Smuzhiyun * you also meet, for each linked independent module, the terms and conditions of 16*4882a593Smuzhiyun * the license of that module. An independent module is a module which is not 17*4882a593Smuzhiyun * derived from this software. The special exception does not apply to any 18*4882a593Smuzhiyun * modifications of the software. 19*4882a593Smuzhiyun * 20*4882a593Smuzhiyun * 21*4882a593Smuzhiyun * <<Broadcom-WL-IPTag/Dual:>> 22*4882a593Smuzhiyun */ 23*4882a593Smuzhiyun #ifndef __WL_BIGDATA_H_ 24*4882a593Smuzhiyun #define __WL_BIGDATA_H_ 25*4882a593Smuzhiyun 26*4882a593Smuzhiyun #include <802.11.h> 27*4882a593Smuzhiyun #include <bcmevent.h> 28*4882a593Smuzhiyun #include <bcmwifi_channels.h> 29*4882a593Smuzhiyun 30*4882a593Smuzhiyun #define MAX_STA_INFO_AP_CNT 20 31*4882a593Smuzhiyun 32*4882a593Smuzhiyun #define DOT11_11B_MAX_RATE 11 33*4882a593Smuzhiyun #define DOT11_2GHZ_MAX_CH_NUM 14 34*4882a593Smuzhiyun #define DOT11_HT_MCS_RATE_MASK 0xFF 35*4882a593Smuzhiyun 36*4882a593Smuzhiyun enum { 37*4882a593Smuzhiyun BIGDATA_DOT11_11B_MODE = 0, 38*4882a593Smuzhiyun BIGDATA_DOT11_11G_MODE = 1, 39*4882a593Smuzhiyun BIGDATA_DOT11_11N_MODE = 2, 40*4882a593Smuzhiyun BIGDATA_DOT11_11A_MODE = 3, 41*4882a593Smuzhiyun BIGDATA_DOT11_11AC_MODE = 4, 42*4882a593Smuzhiyun BIGDATA_DOT11_11AX_MODE = 5, 43*4882a593Smuzhiyun BIGDATA_DOT11_MODE_MAX 44*4882a593Smuzhiyun }; 45*4882a593Smuzhiyun 46*4882a593Smuzhiyun typedef struct wl_ap_sta_data 47*4882a593Smuzhiyun { 48*4882a593Smuzhiyun struct ether_addr mac; 49*4882a593Smuzhiyun uint32 mode_80211; 50*4882a593Smuzhiyun uint32 nss; 51*4882a593Smuzhiyun chanspec_t chanspec; 52*4882a593Smuzhiyun int16 rssi; 53*4882a593Smuzhiyun uint32 rate; 54*4882a593Smuzhiyun uint8 channel; 55*4882a593Smuzhiyun uint32 mimo; 56*4882a593Smuzhiyun uint32 disconnected; 57*4882a593Smuzhiyun uint32 is_empty; 58*4882a593Smuzhiyun uint32 reason_code; 59*4882a593Smuzhiyun } wl_ap_sta_data_t; 60*4882a593Smuzhiyun 61*4882a593Smuzhiyun typedef struct ap_sta_wq_data 62*4882a593Smuzhiyun { 63*4882a593Smuzhiyun wl_event_msg_t e; 64*4882a593Smuzhiyun void *dhdp; 65*4882a593Smuzhiyun void *bcm_cfg; 66*4882a593Smuzhiyun void *ndev; 67*4882a593Smuzhiyun } ap_sta_wq_data_t; 68*4882a593Smuzhiyun 69*4882a593Smuzhiyun typedef struct wl_ap_sta_info 70*4882a593Smuzhiyun { 71*4882a593Smuzhiyun wl_ap_sta_data_t *ap_sta_data; 72*4882a593Smuzhiyun uint32 sta_list_cnt; 73*4882a593Smuzhiyun struct mutex wq_data_sync; 74*4882a593Smuzhiyun } wl_ap_sta_info_t; 75*4882a593Smuzhiyun 76*4882a593Smuzhiyun int wl_attach_ap_stainfo(void *bcm_cfg); 77*4882a593Smuzhiyun int wl_detach_ap_stainfo(void *bcm_cfg); 78*4882a593Smuzhiyun int wl_ap_stainfo_init(void *bcm_cfg); 79*4882a593Smuzhiyun void wl_gather_ap_stadata(void *handle, void *event_info, u8 event); 80*4882a593Smuzhiyun int wl_get_ap_stadata(void *bcm_cfg, struct ether_addr *sta_mac, void **data); 81*4882a593Smuzhiyun #endif /* __WL_BIGDATA_H_ */ 82