1 /* 2 * Copyright (c) 2020, The Linux Foundation. All rights reserved. 3 * 4 * Permission to use, copy, modify, and/or distribute this software for any 5 * purpose with or without fee is hereby granted, provided that the above 6 * copyright notice and this permission notice appear in all copies. 7 * 8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15 */ 16 17 /** 18 * DOC: contains dcs structure definations 19 */ 20 21 #ifndef _WLAN_DCS_PUBLIC_STRUCTS_H_ 22 #define _WLAN_DCS_PUBLIC_STRUCTS_H_ 23 24 /** 25 * struct wlan_host_dcs_interference_param - dcs interference parameters 26 * @interference_type: type of DCS interference 27 * @uint32_t pdev_id: pdev id 28 */ 29 struct wlan_host_dcs_interference_param { 30 uint32_t interference_type; 31 uint32_t pdev_id; 32 }; 33 34 /** 35 * struct wlan_host_dcs_mib_stats - WLAN IM stats from target to host 36 * @listen_time: 37 * @reg_tx_frame_cnt: 38 * @reg_rx_frame_cnt: 39 * @reg_rxclr_cnt: 40 * @reg_cycle_cnt: delta cycle count 41 * @reg_rxclr_ext_cnt: 42 * @reg_ofdm_phyerr_cnt: 43 * @reg_cck_phyerr_cnt: CCK err count since last reset, read from register 44 */ 45 struct wlan_host_dcs_mib_stats { 46 int32_t listen_time; 47 uint32_t reg_tx_frame_cnt; 48 uint32_t reg_rx_frame_cnt; 49 uint32_t reg_rxclr_cnt; 50 uint32_t reg_cycle_cnt; 51 uint32_t reg_rxclr_ext_cnt; 52 uint32_t reg_ofdm_phyerr_cnt; 53 uint32_t reg_cck_phyerr_cnt; 54 }; 55 56 /** 57 * struct wlan_host_dcs_im_tgt_stats - DCS IM target stats 58 * @reg_tsf32: current running TSF from the TSF-1 59 * @last_ack_rssi: known last frame rssi, in case of multiple stations, if 60 * and at different ranges, this would not gaurantee that 61 * this is the least rssi. 62 * @tx_waste_time: sum of all the failed durations in the last 63 * one second interval. 64 * @rx_time: count how many times the hal_rxerr_phy is marked, in this 65 * time period 66 * @phyerr_cnt: 67 * @mib_stats: collected mib stats as explained in mib structure 68 * @chan_nf: Channel noise floor (units are in dBm) 69 * @my_bss_rx_cycle_count: BSS rx cycle count 70 * @reg_rxclr_ext40_cnt: extension channel 40Mhz rxclear count 71 * @reg_rxclr_ext80_cnt: extension channel 80Mhz rxclear count 72 */ 73 struct wlan_host_dcs_im_tgt_stats { 74 uint32_t reg_tsf32; 75 uint32_t last_ack_rssi; 76 uint32_t tx_waste_time; 77 uint32_t rx_time; 78 uint32_t phyerr_cnt; 79 struct wlan_host_dcs_mib_stats mib_stats; 80 uint32_t chan_nf; 81 uint32_t my_bss_rx_cycle_count; 82 uint32_t reg_rxclr_ext40_cnt; 83 uint32_t reg_rxclr_ext80_cnt; 84 }; 85 86 #endif 87