Commit 737d4d9e authored by Kai-Heng Feng's avatar Kai-Heng Feng Committed by Greg Kroah-Hartman

staging: rtl8723bs: Remove debugging information exposed via procfs

The procfs provides many useful information for debugging, but it may be
too much for normal usage, routines like proc_get_sec_info() reports
various security related information.

So let's remove it.
Signed-off-by: default avatarKai-Heng Feng <kai.heng.feng@canonical.com>
Link: https://lore.kernel.org/r/20190813042426.13733-1-kai.heng.feng@canonical.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9ddc7004
......@@ -60,7 +60,6 @@ r8723bs-y = \
os_dep/osdep_service.o \
os_dep/os_intfs.o \
os_dep/recv_linux.o \
os_dep/rtw_proc.o \
os_dep/sdio_intf.o \
os_dep/sdio_ops_linux.o \
os_dep/wifi_regd.o \
......
......@@ -1817,11 +1817,6 @@ static void rtw_btinfo_hdl(struct adapter *adapter, u8 *buf, u16 buf_len)
len = info->len;
}
/* define DBG_PROC_SET_BTINFO_EVT */
#ifdef DBG_PROC_SET_BTINFO_EVT
btinfo_evt_dump(RTW_DBGDUMP, info);
#endif
/* transform BT-FW btinfo to WiFI-FW C2H format and notify */
if (cmd_idx == BTINFO_WIFI_FETCH)
buf[1] = 0;
......
This diff is collapsed.
......@@ -57,9 +57,5 @@
#define DBG 0 /* for ODM & BTCOEX debug */
#endif /* !DEBUG */
#ifdef CONFIG_PROC_FS
#define PROC_DEBUG
#endif
/* define DBG_XMIT_BUF */
/* define DBG_XMIT_BUF_EXT */
......@@ -576,8 +576,6 @@ struct adapter {
int bup;
struct net_device_stats stats;
struct iw_statistics iwstats;
struct proc_dir_entry *dir_dev;/* for proc directory */
struct proc_dir_entry *dir_odm;
struct wireless_dev *rtw_wdev;
struct rtw_wdev_priv wdev_data;
......
......@@ -64,8 +64,6 @@ u16 rtw_recv_select_queue(struct sk_buff *skb);
int rtw_ndev_notifier_register(void);
void rtw_ndev_notifier_unregister(void);
#include "../os_dep/rtw_proc.h"
void rtw_ips_dev_unload(struct adapter *padapter);
int rtw_ips_pwr_up(struct adapter *padapter);
......
......@@ -267,81 +267,4 @@ void mac_reg_dump(void *sel, struct adapter *adapter);
void bb_reg_dump(void *sel, struct adapter *adapter);
void rf_reg_dump(void *sel, struct adapter *adapter);
#ifdef PROC_DEBUG
ssize_t proc_set_write_reg(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
int proc_get_read_reg(struct seq_file *m, void *v);
ssize_t proc_set_read_reg(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
int proc_get_fwstate(struct seq_file *m, void *v);
int proc_get_sec_info(struct seq_file *m, void *v);
int proc_get_mlmext_state(struct seq_file *m, void *v);
int proc_get_roam_flags(struct seq_file *m, void *v);
ssize_t proc_set_roam_flags(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
int proc_get_roam_param(struct seq_file *m, void *v);
ssize_t proc_set_roam_param(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
ssize_t proc_set_roam_tgt_addr(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
int proc_get_qos_option(struct seq_file *m, void *v);
int proc_get_ht_option(struct seq_file *m, void *v);
int proc_get_rf_info(struct seq_file *m, void *v);
int proc_get_survey_info(struct seq_file *m, void *v);
int proc_get_ap_info(struct seq_file *m, void *v);
int proc_get_adapter_state(struct seq_file *m, void *v);
int proc_get_trx_info(struct seq_file *m, void *v);
int proc_get_rate_ctl(struct seq_file *m, void *v);
ssize_t proc_set_rate_ctl(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
int proc_get_suspend_resume_info(struct seq_file *m, void *v);
ssize_t proc_set_fwdl_test_case(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
ssize_t proc_set_wait_hiq_empty(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
int proc_get_all_sta_info(struct seq_file *m, void *v);
int proc_get_rx_signal(struct seq_file *m, void *v);
ssize_t proc_set_rx_signal(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
int proc_get_hw_status(struct seq_file *m, void *v);
int proc_get_ht_enable(struct seq_file *m, void *v);
ssize_t proc_set_ht_enable(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
int proc_get_bw_mode(struct seq_file *m, void *v);
ssize_t proc_set_bw_mode(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
int proc_get_ampdu_enable(struct seq_file *m, void *v);
ssize_t proc_set_ampdu_enable(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
int proc_get_rx_ampdu(struct seq_file *m, void *v);
ssize_t proc_set_rx_ampdu(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
int proc_get_rx_stbc(struct seq_file *m, void *v);
ssize_t proc_set_rx_stbc(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
int proc_get_en_fwps(struct seq_file *m, void *v);
ssize_t proc_set_en_fwps(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
/* int proc_get_two_path_rssi(struct seq_file *m, void *v); */
int proc_get_rssi_disp(struct seq_file *m, void *v);
ssize_t proc_set_rssi_disp(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
int proc_get_btcoex_dbg(struct seq_file *m, void *v);
ssize_t proc_set_btcoex_dbg(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
int proc_get_btcoex_info(struct seq_file *m, void *v);
int proc_get_odm_dbg_comp(struct seq_file *m, void *v);
ssize_t proc_set_odm_dbg_comp(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
int proc_get_odm_dbg_level(struct seq_file *m, void *v);
ssize_t proc_set_odm_dbg_level(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
int proc_get_odm_adaptivity(struct seq_file *m, void *v);
ssize_t proc_set_odm_adaptivity(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
#ifdef CONFIG_DBG_COUNTER
int proc_get_rx_logs(struct seq_file *m, void *v);
int proc_get_tx_logs(struct seq_file *m, void *v);
int proc_get_int_logs(struct seq_file *m, void *v);
#endif
#endif /* PROC_DEBUG */
#endif /* __RTW_DEBUG_H__ */
......@@ -445,12 +445,6 @@ static int rtw_ndev_notifier_call(struct notifier_block *nb, unsigned long state
DBG_871X_LEVEL(_drv_info_, FUNC_NDEV_FMT " state:%lu\n", FUNC_NDEV_ARG(dev), state);
switch (state) {
case NETDEV_CHANGENAME:
rtw_adapter_proc_replace(dev);
break;
}
return NOTIFY_DONE;
}
......@@ -475,7 +469,6 @@ static int rtw_ndev_init(struct net_device *dev)
DBG_871X_LEVEL(_drv_always_, FUNC_ADPT_FMT "\n", FUNC_ADPT_ARG(adapter));
strncpy(adapter->old_ifname, dev->name, IFNAMSIZ);
rtw_adapter_proc_init(dev);
return 0;
}
......@@ -485,7 +478,6 @@ static void rtw_ndev_uninit(struct net_device *dev)
struct adapter *adapter = rtw_netdev_priv(dev);
DBG_871X_LEVEL(_drv_always_, FUNC_ADPT_FMT "\n", FUNC_ADPT_ARG(adapter));
rtw_adapter_proc_deinit(dev);
}
static const struct net_device_ops rtw_netdev_ops = {
......
This diff is collapsed.
/* SPDX-License-Identifier: GPL-2.0 */
/******************************************************************************
*
* Copyright(c) 2007 - 2013 Realtek Corporation. All rights reserved.
*
******************************************************************************/
#ifndef __RTW_PROC_H__
#define __RTW_PROC_H__
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
struct rtw_proc_hdl {
char *name;
int (*show)(struct seq_file *, void *);
ssize_t (*write)(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
};
#ifdef PROC_DEBUG
int rtw_drv_proc_init(void);
void rtw_drv_proc_deinit(void);
struct proc_dir_entry *rtw_adapter_proc_init(struct net_device *dev);
void rtw_adapter_proc_deinit(struct net_device *dev);
void rtw_adapter_proc_replace(struct net_device *dev);
#else //!PROC_DEBUG
static inline int rtw_drv_proc_init(void) {return 0;}
static inline void rtw_drv_proc_deinit(void) {}
static inline struct proc_dir_entry *rtw_adapter_proc_init(struct net_device *dev){return NULL;}
static inline void rtw_adapter_proc_deinit(struct net_device *dev){}
static inline void rtw_adapter_proc_replace(struct net_device *dev){}
#endif //!PROC_DEBUG
#endif //__RTW_PROC_H__
......@@ -620,12 +620,10 @@ static int __init rtw_drv_entry(void)
#endif /* BTCOEXVERSION */
sdio_drvpriv.drv_registered = true;
rtw_drv_proc_init();
ret = sdio_register_driver(&sdio_drvpriv.r871xs_drv);
if (ret != 0) {
sdio_drvpriv.drv_registered = false;
rtw_drv_proc_deinit();
rtw_ndev_notifier_unregister();
DBG_871X("%s: register driver failed!!(%d)\n", __func__, ret);
goto exit;
......@@ -646,7 +644,6 @@ static void __exit rtw_drv_halt(void)
sdio_unregister_driver(&sdio_drvpriv.r871xs_drv);
rtw_drv_proc_deinit();
rtw_ndev_notifier_unregister();
DBG_871X_LEVEL(_drv_always_, "module exit success\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment