tinlin | 9abd17f | 2019-08-14 13:29:44 +0800 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright (c) 2019 The Linux Foundation. All rights reserved. |
| 3 | * |
| 4 | * Permission to use, copy, modify, and/or distribute this software for |
| 5 | * any purpose with or without fee is hereby granted, provided that the |
| 6 | * above copyright notice and this permission notice appear in all |
| 7 | * copies. |
| 8 | * |
| 9 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL |
| 10 | * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED |
| 11 | * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE |
| 12 | * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL |
| 13 | * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR |
| 14 | * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER |
| 15 | * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
| 16 | * PERFORMANCE OF THIS SOFTWARE. |
| 17 | */ |
| 18 | |
| 19 | /** |
| 20 | * DOC: wlan_hdd_debugfs_mibstat.h |
| 21 | * |
| 22 | * WLAN Host Device Driver implementation to update |
| 23 | * debugfs with MIB statistics |
| 24 | */ |
| 25 | |
| 26 | #ifndef _WLAN_HDD_DEBUGFS_MIBSTAT_H |
| 27 | #define _WLAN_HDD_DEBUGFS_MIBSTAT_H |
| 28 | |
| 29 | #define DEBUGFS_MIBSTATS_BUF_SIZE 4096 |
| 30 | |
| 31 | #include <wlan_hdd_main.h> |
| 32 | |
| 33 | #if defined(WLAN_FEATURE_MIB_STATS) && defined(WLAN_DEBUGFS) |
| 34 | /** |
| 35 | * hdd_debugfs_process_mib_stats() - Process mib stats from fw |
| 36 | * |
| 37 | * This function is used to store mib stats to global variable mib_stats. |
| 38 | * |
| 39 | * Return: None |
| 40 | */ |
| 41 | void hdd_debugfs_process_mib_stats(struct hdd_adapter *adapter, |
| 42 | struct stats_event *stats); |
| 43 | |
| 44 | /** |
| 45 | * wlan_hdd_create_mib_stats_file() - API to create MIB stats file |
| 46 | * @adapter: interface adapter pointer |
| 47 | * |
| 48 | * Return: 0 on success and errno on failure |
| 49 | */ |
| 50 | int wlan_hdd_create_mib_stats_file(struct hdd_adapter *adapter); |
| 51 | |
| 52 | /** |
| 53 | * wlan_hdd_destroy_mib_stats_lock() - API to destroy MIB stats lock |
| 54 | * |
| 55 | * Return: No return |
| 56 | */ |
| 57 | void wlan_hdd_destroy_mib_stats_lock(void); |
| 58 | #else |
| 59 | static inline int wlan_hdd_create_mib_stats_file(struct hdd_adapter *adapter) |
| 60 | { |
| 61 | return 0; |
| 62 | } |
| 63 | |
| 64 | static inline void wlan_hdd_destroy_mib_stats_lock(void) |
| 65 | { |
| 66 | } |
| 67 | #endif |
| 68 | #endif /* #ifndef _WLAN_HDD_DEBUGFS_MIBSTAT_H */ |