1 /******************************************************************************
3 * Copyright(c) 2007 - 2013 Realtek Corporation. All rights reserved.
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of version 2 of the GNU General Public License as
7 * published by the Free Software Foundation.
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 * You should have received a copy of the GNU General Public License along with
15 * this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
19 ******************************************************************************/
20 #ifndef __RTW_PROC_H__
21 #define __RTW_PROC_H__
23 #include <linux/proc_fs.h>
24 #include <linux/seq_file.h>
26 #define RTW_PROC_HDL_TYPE_SEQ 0
27 #define RTW_PROC_HDL_TYPE_SSEQ 1
33 int (*show)(struct seq_file *, void *);
34 struct seq_operations *seq_op;
36 ssize_t (*write)(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
39 #define RTW_PROC_HDL_SEQ(_name, _seq_op, _write) \
40 { .name = _name, .type = RTW_PROC_HDL_TYPE_SEQ, .u.seq_op = _seq_op, .write = _write}
42 #define RTW_PROC_HDL_SSEQ(_name, _show, _write) \
43 { .name = _name, .type = RTW_PROC_HDL_TYPE_SSEQ, .u.show = _show, .write = _write}
45 #ifdef CONFIG_PROC_DEBUG
47 struct proc_dir_entry *get_rtw_drv_proc(void);
48 int rtw_drv_proc_init(void);
49 void rtw_drv_proc_deinit(void);
50 struct proc_dir_entry *rtw_adapter_proc_init(struct net_device *dev);
51 void rtw_adapter_proc_deinit(struct net_device *dev);
52 void rtw_adapter_proc_replace(struct net_device *dev);
54 #else /* !CONFIG_PROC_DEBUG */
56 #define get_rtw_drv_proc() NULL
57 #define rtw_drv_proc_init() 0
58 #define rtw_drv_proc_deinit() do {} while (0)
59 #define rtw_adapter_proc_init(dev) NULL
60 #define rtw_adapter_proc_deinit(dev) do {} while (0)
61 #define rtw_adapter_proc_replace(dev) do {} while (0)
63 #endif /* !CONFIG_PROC_DEBUG */
65 #endif /* __RTW_PROC_H__ */