Commit f55a6d45 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Greg Kroah-Hartman

staging: rtl8723bs: rework debug configuration handling

I ran into this warning during randconfig testing:

drivers/staging/rtl8723bs/os_dep/rtw_proc.c: In function 'rtw_adapter_proc_deinit':
drivers/staging/rtl8723bs/os_dep/rtw_proc.c:738:25: error: unused variable 'drv_proc' [-Werror=unused-variable]
drivers/staging/rtl8723bs/os_dep/rtw_proc.c: In function 'rtw_adapter_proc_replace':
drivers/staging/rtl8723bs/os_dep/rtw_proc.c:762:25: error: unused variable 'drv_proc' [-Werror=unused-variable]

The problem is that the code procfs code gets built even when CONFIG_PROC_FS
is disabled, but some functions are turned into empty stubs then. This
is easily addressed by adding an #ifdef around the definition of the
CONFIG_PROC_DEBUG macro.

However, I could not bear looking at the macro name that clashes with the
Kconfig name space, so I also renamed it to simply PROC_DEBUG, along with
the other rtl8723bs specific CONFIG_DEBUG_* macros that I renamed the same
way. This is consistent with how we handle the same checks in the non-staging
rtlwifi driver.

As the code path for !CONFIG_PROC_DEBUG had not been tested properly, it
turned out to be incorrect and requires adding 'static inline' annotations
for the stub handlers, and moving some variables around.

Fixes: 554c0a3a ("staging: Add rtl8723bs sdio wifi driver")
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c45112e4
...@@ -1744,6 +1744,8 @@ u8 rtw_ps_cmd(struct adapter *padapter) ...@@ -1744,6 +1744,8 @@ u8 rtw_ps_cmd(struct adapter *padapter)
return res; return res;
} }
u32 g_wait_hiq_empty = 0;
static void rtw_chk_hi_queue_hdl(struct adapter *padapter) static void rtw_chk_hi_queue_hdl(struct adapter *padapter)
{ {
struct sta_info *psta_bmc; struct sta_info *psta_bmc;
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
u32 GlobalDebugLevel = _drv_err_; u32 GlobalDebugLevel = _drv_err_;
#ifdef CONFIG_DEBUG_RTL871X #ifdef DEBUG_RTL871X
u64 GlobalDebugComponents = \ u64 GlobalDebugComponents = \
_module_rtl871x_xmit_c_ | _module_rtl871x_xmit_c_ |
...@@ -52,7 +52,7 @@ u32 GlobalDebugLevel = _drv_err_; ...@@ -52,7 +52,7 @@ u32 GlobalDebugLevel = _drv_err_;
_module_mp_ | _module_mp_ |
_module_efuse_; _module_efuse_;
#endif /* CONFIG_DEBUG_RTL871X */ #endif /* DEBUG_RTL871X */
#include <rtw_version.h> #include <rtw_version.h>
...@@ -140,7 +140,7 @@ void rf_reg_dump(void *sel, struct adapter *adapter) ...@@ -140,7 +140,7 @@ void rf_reg_dump(void *sel, struct adapter *adapter)
} }
} }
#ifdef CONFIG_PROC_DEBUG #ifdef PROC_DEBUG
ssize_t proc_set_write_reg(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data) ssize_t proc_set_write_reg(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data)
{ {
struct net_device *dev = data; struct net_device *dev = data;
...@@ -605,9 +605,6 @@ ssize_t proc_set_rate_ctl(struct file *file, const char __user *buffer, size_t c ...@@ -605,9 +605,6 @@ ssize_t proc_set_rate_ctl(struct file *file, const char __user *buffer, size_t c
return count; return count;
} }
u8 g_fwdl_chksum_fail = 0;
u8 g_fwdl_wintint_rdy_fail = 0;
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_fwdl_test_case(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data)
{ {
char tmp[32]; char tmp[32];
...@@ -622,8 +619,6 @@ ssize_t proc_set_fwdl_test_case(struct file *file, const char __user *buffer, si ...@@ -622,8 +619,6 @@ ssize_t proc_set_fwdl_test_case(struct file *file, const char __user *buffer, si
return count; return count;
} }
u32 g_wait_hiq_empty = 0;
ssize_t proc_set_wait_hiq_empty(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)
{ {
char tmp[32]; char tmp[32];
......
...@@ -4844,7 +4844,7 @@ static void process_80211d(struct adapter *padapter, struct wlan_bssid_ex *bssid ...@@ -4844,7 +4844,7 @@ static void process_80211d(struct adapter *padapter, struct wlan_bssid_ex *bssid
} }
chplan_ap.Len = i; chplan_ap.Len = i;
#ifdef CONFIG_DEBUG_RTL871X #ifdef DEBUG_RTL871X
i = 0; i = 0;
DBG_871X("%s: AP[%s] channel plan {", __func__, bssid->Ssid.Ssid); DBG_871X("%s: AP[%s] channel plan {", __func__, bssid->Ssid.Ssid);
while ((i < chplan_ap.Len) && (chplan_ap.Channel[i] != 0)) { while ((i < chplan_ap.Len) && (chplan_ap.Channel[i] != 0)) {
...@@ -4855,7 +4855,7 @@ static void process_80211d(struct adapter *padapter, struct wlan_bssid_ex *bssid ...@@ -4855,7 +4855,7 @@ static void process_80211d(struct adapter *padapter, struct wlan_bssid_ex *bssid
#endif #endif
memcpy(chplan_sta, pmlmeext->channel_set, sizeof(chplan_sta)); memcpy(chplan_sta, pmlmeext->channel_set, sizeof(chplan_sta));
#ifdef CONFIG_DEBUG_RTL871X #ifdef DEBUG_RTL871X
i = 0; i = 0;
DBG_871X("%s: STA channel plan {", __func__); DBG_871X("%s: STA channel plan {", __func__);
while ((i < MAX_CHANNEL_NUM) && (chplan_sta[i].ChannelNum != 0)) { while ((i < MAX_CHANNEL_NUM) && (chplan_sta[i].ChannelNum != 0)) {
...@@ -4992,7 +4992,7 @@ static void process_80211d(struct adapter *padapter, struct wlan_bssid_ex *bssid ...@@ -4992,7 +4992,7 @@ static void process_80211d(struct adapter *padapter, struct wlan_bssid_ex *bssid
pmlmeext->update_channel_plan_by_ap_done = 1; pmlmeext->update_channel_plan_by_ap_done = 1;
#ifdef CONFIG_DEBUG_RTL871X #ifdef DEBUG_RTL871X
k = 0; k = 0;
DBG_871X("%s: new STA channel plan {", __func__); DBG_871X("%s: new STA channel plan {", __func__);
while ((k < MAX_CHANNEL_NUM) && (chplan_new[k].ChannelNum != 0)) { while ((k < MAX_CHANNEL_NUM) && (chplan_new[k].ChannelNum != 0)) {
......
...@@ -2267,12 +2267,12 @@ void rtl8723b_download_BTCoex_AP_mode_rsvd_page(struct adapter *padapter) ...@@ -2267,12 +2267,12 @@ void rtl8723b_download_BTCoex_AP_mode_rsvd_page(struct adapter *padapter)
DBG_8192C("+" FUNC_ADPT_FMT ": iface_type =%d fw_state = 0x%08X\n", DBG_8192C("+" FUNC_ADPT_FMT ": iface_type =%d fw_state = 0x%08X\n",
FUNC_ADPT_ARG(padapter), get_iface_type(padapter), get_fwstate(&padapter->mlmepriv)); FUNC_ADPT_ARG(padapter), get_iface_type(padapter), get_fwstate(&padapter->mlmepriv));
#ifdef CONFIG_DEBUG #ifdef DEBUG
if (check_fwstate(&padapter->mlmepriv, WIFI_AP_STATE) == false) { if (check_fwstate(&padapter->mlmepriv, WIFI_AP_STATE) == false) {
DBG_8192C(FUNC_ADPT_FMT ": [WARNING] not in AP mode!!\n", DBG_8192C(FUNC_ADPT_FMT ": [WARNING] not in AP mode!!\n",
FUNC_ADPT_ARG(padapter)); FUNC_ADPT_ARG(padapter));
} }
#endif /* CONFIG_DEBUG */ #endif /* DEBUG */
pHalData = GET_HAL_DATA(padapter); pHalData = GET_HAL_DATA(padapter);
pmlmeext = &padapter->mlmeextpriv; pmlmeext = &padapter->mlmeextpriv;
......
...@@ -225,6 +225,8 @@ void _8051Reset8723(struct adapter *padapter) ...@@ -225,6 +225,8 @@ void _8051Reset8723(struct adapter *padapter)
DBG_8192C("%s: Finish\n", __func__); DBG_8192C("%s: Finish\n", __func__);
} }
u8 g_fwdl_chksum_fail = 0;
static s32 polling_fwdl_chksum( static s32 polling_fwdl_chksum(
struct adapter *adapter, u32 min_cnt, u32 timeout_ms struct adapter *adapter, u32 min_cnt, u32 timeout_ms
) )
...@@ -268,6 +270,8 @@ static s32 polling_fwdl_chksum( ...@@ -268,6 +270,8 @@ static s32 polling_fwdl_chksum(
return ret; return ret;
} }
u8 g_fwdl_wintint_rdy_fail = 0;
static s32 _FWFreeToGo(struct adapter *adapter, u32 min_cnt, u32 timeout_ms) static s32 _FWFreeToGo(struct adapter *adapter, u32 min_cnt, u32 timeout_ms)
{ {
s32 ret = _FAIL; s32 ret = _FAIL;
...@@ -896,7 +900,7 @@ static void hal_ReadEFuse_WiFi( ...@@ -896,7 +900,7 @@ static void hal_ReadEFuse_WiFi(
memset(efuseTbl, 0xFF, EFUSE_MAX_MAP_LEN); memset(efuseTbl, 0xFF, EFUSE_MAX_MAP_LEN);
#ifdef CONFIG_DEBUG #ifdef DEBUG
if (0) { if (0) {
for (i = 0; i < 256; i++) for (i = 0; i < 256; i++)
efuse_OneByteRead(padapter, i, &efuseTbl[i], false); efuse_OneByteRead(padapter, i, &efuseTbl[i], false);
...@@ -969,7 +973,7 @@ if (0) { ...@@ -969,7 +973,7 @@ if (0) {
for (i = 0; i < _size_byte; i++) for (i = 0; i < _size_byte; i++)
pbuf[i] = efuseTbl[_offset+i]; pbuf[i] = efuseTbl[_offset+i];
#ifdef CONFIG_DEBUG #ifdef DEBUG
if (1) { if (1) {
DBG_871X("Efuse Realmap:\n"); DBG_871X("Efuse Realmap:\n");
for (i = 0; i < _size_byte; i++) { for (i = 0; i < _size_byte; i++) {
...@@ -2602,7 +2606,7 @@ void Hal_EfuseParseTxPowerInfo_8723B( ...@@ -2602,7 +2606,7 @@ void Hal_EfuseParseTxPowerInfo_8723B(
pHalData->Index24G_CCK_Base[rfPath][ch] = pwrInfo24G.IndexCCK_Base[rfPath][group]; pHalData->Index24G_CCK_Base[rfPath][ch] = pwrInfo24G.IndexCCK_Base[rfPath][group];
pHalData->Index24G_BW40_Base[rfPath][ch] = pwrInfo24G.IndexBW40_Base[rfPath][group]; pHalData->Index24G_BW40_Base[rfPath][ch] = pwrInfo24G.IndexBW40_Base[rfPath][group];
} }
#ifdef CONFIG_DEBUG #ifdef DEBUG
RT_TRACE(_module_hci_hal_init_c_, _drv_info_, ("======= Path %d, ChannelIndex %d, Group %d =======\n", rfPath, ch, group)); RT_TRACE(_module_hci_hal_init_c_, _drv_info_, ("======= Path %d, ChannelIndex %d, Group %d =======\n", rfPath, ch, group));
RT_TRACE(_module_hci_hal_init_c_, _drv_info_, ("Index24G_CCK_Base[%d][%d] = 0x%x\n", rfPath, ch, pHalData->Index24G_CCK_Base[rfPath][ch])); RT_TRACE(_module_hci_hal_init_c_, _drv_info_, ("Index24G_CCK_Base[%d][%d] = 0x%x\n", rfPath, ch, pHalData->Index24G_CCK_Base[rfPath][ch]));
RT_TRACE(_module_hci_hal_init_c_, _drv_info_, ("Index24G_BW40_Base[%d][%d] = 0x%x\n", rfPath, ch, pHalData->Index24G_BW40_Base[rfPath][ch])); RT_TRACE(_module_hci_hal_init_c_, _drv_info_, ("Index24G_BW40_Base[%d][%d] = 0x%x\n", rfPath, ch, pHalData->Index24G_BW40_Base[rfPath][ch]));
...@@ -2615,7 +2619,7 @@ void Hal_EfuseParseTxPowerInfo_8723B( ...@@ -2615,7 +2619,7 @@ void Hal_EfuseParseTxPowerInfo_8723B(
pHalData->BW20_24G_Diff[rfPath][TxCount] = pwrInfo24G.BW20_Diff[rfPath][TxCount]; pHalData->BW20_24G_Diff[rfPath][TxCount] = pwrInfo24G.BW20_Diff[rfPath][TxCount];
pHalData->BW40_24G_Diff[rfPath][TxCount] = pwrInfo24G.BW40_Diff[rfPath][TxCount]; pHalData->BW40_24G_Diff[rfPath][TxCount] = pwrInfo24G.BW40_Diff[rfPath][TxCount];
#ifdef CONFIG_DEBUG #ifdef DEBUG
RT_TRACE(_module_hci_hal_init_c_, _drv_info_, ("--------------------------------------- 2.4G ---------------------------------------\n")); RT_TRACE(_module_hci_hal_init_c_, _drv_info_, ("--------------------------------------- 2.4G ---------------------------------------\n"));
RT_TRACE(_module_hci_hal_init_c_, _drv_info_, ("CCK_24G_Diff[%d][%d]= %d\n", rfPath, TxCount, pHalData->CCK_24G_Diff[rfPath][TxCount])); RT_TRACE(_module_hci_hal_init_c_, _drv_info_, ("CCK_24G_Diff[%d][%d]= %d\n", rfPath, TxCount, pHalData->CCK_24G_Diff[rfPath][TxCount]));
RT_TRACE(_module_hci_hal_init_c_, _drv_info_, ("OFDM_24G_Diff[%d][%d]= %d\n", rfPath, TxCount, pHalData->OFDM_24G_Diff[rfPath][TxCount])); RT_TRACE(_module_hci_hal_init_c_, _drv_info_, ("OFDM_24G_Diff[%d][%d]= %d\n", rfPath, TxCount, pHalData->OFDM_24G_Diff[rfPath][TxCount]));
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
/* /*
* Functions Config * Functions Config
*/ */
/* define CONFIG_DEBUG_CFG80211 */ /* define DEBUG_CFG80211 */
#ifndef CONFIG_WIRELESS_EXT #ifndef CONFIG_WIRELESS_EXT
#error CONFIG_WIRELESS_EXT needs to be enabled for this driver to work #error CONFIG_WIRELESS_EXT needs to be enabled for this driver to work
...@@ -56,16 +56,18 @@ ...@@ -56,16 +56,18 @@
/* /*
* Debug Related Config * Debug Related Config
*/ */
#undef CONFIG_DEBUG #undef DEBUG
#ifdef CONFIG_DEBUG #ifdef DEBUG
#define DBG 1 /* for ODM & BTCOEX debug */ #define DBG 1 /* for ODM & BTCOEX debug */
/*#define CONFIG_DEBUG_RTL871X */ /*#define DEBUG_RTL871X */
#else /* !CONFIG_DEBUG */ #else /* !DEBUG */
#define DBG 0 /* for ODM & BTCOEX debug */ #define DBG 0 /* for ODM & BTCOEX debug */
#endif /* !CONFIG_DEBUG */ #endif /* !DEBUG */
#define CONFIG_PROC_DEBUG #ifdef CONFIG_PROC_FS
#define PROC_DEBUG
#endif
/* define DBG_XMIT_BUF */ /* define DBG_XMIT_BUF */
/* define DBG_XMIT_BUF_EXT */ /* define DBG_XMIT_BUF_EXT */
...@@ -206,7 +206,7 @@ ...@@ -206,7 +206,7 @@
#endif /* defined(_dbgdump) */ #endif /* defined(_dbgdump) */
#ifdef CONFIG_DEBUG #ifdef DEBUG
#if defined(_dbgdump) #if defined(_dbgdump)
#undef DBG_871X #undef DBG_871X
#define DBG_871X(...) do {\ #define DBG_871X(...) do {\
...@@ -223,9 +223,9 @@ ...@@ -223,9 +223,9 @@
_dbgdump(DRIVER_PREFIX __VA_ARGS__);\ _dbgdump(DRIVER_PREFIX __VA_ARGS__);\
}while (0) }while (0)
#endif /* defined(_dbgdump) */ #endif /* defined(_dbgdump) */
#endif /* CONFIG_DEBUG */ #endif /* DEBUG */
#ifdef CONFIG_DEBUG_RTL871X #ifdef DEBUG_RTL871X
#if defined(_dbgdump) && defined(_MODULE_DEFINE_) #if defined(_dbgdump) && defined(_MODULE_DEFINE_)
...@@ -258,7 +258,7 @@ ...@@ -258,7 +258,7 @@
_dbgdump("\n"); \ _dbgdump("\n"); \
} }
#endif /* defined(_dbgdump) */ #endif /* defined(_dbgdump) */
#endif /* CONFIG_DEBUG_RTL871X */ #endif /* DEBUG_RTL871X */
#ifdef CONFIG_DBG_COUNTER #ifdef CONFIG_DBG_COUNTER
#define DBG_COUNTER(counter) counter++ #define DBG_COUNTER(counter) counter++
...@@ -275,7 +275,7 @@ void mac_reg_dump(void *sel, struct adapter *adapter); ...@@ -275,7 +275,7 @@ void mac_reg_dump(void *sel, struct adapter *adapter);
void bb_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); void rf_reg_dump(void *sel, struct adapter *adapter);
#ifdef CONFIG_PROC_DEBUG #ifdef PROC_DEBUG
ssize_t proc_set_write_reg(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data); 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); 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); ssize_t proc_set_read_reg(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
...@@ -350,6 +350,6 @@ int proc_get_tx_logs(struct seq_file *m, void *v); ...@@ -350,6 +350,6 @@ int proc_get_tx_logs(struct seq_file *m, void *v);
int proc_get_int_logs(struct seq_file *m, void *v); int proc_get_int_logs(struct seq_file *m, void *v);
#endif #endif
#endif /* CONFIG_PROC_DEBUG */ #endif /* PROC_DEBUG */
#endif /* __RTW_DEBUG_H__ */ #endif /* __RTW_DEBUG_H__ */
...@@ -1261,7 +1261,7 @@ static int cfg80211_rtw_get_station(struct wiphy *wiphy, ...@@ -1261,7 +1261,7 @@ static int cfg80211_rtw_get_station(struct wiphy *wiphy,
goto exit; goto exit;
} }
#ifdef CONFIG_DEBUG_CFG80211 #ifdef DEBUG_CFG80211
DBG_871X(FUNC_NDEV_FMT" mac ="MAC_FMT"\n", FUNC_NDEV_ARG(ndev), MAC_ARG(mac)); DBG_871X(FUNC_NDEV_FMT" mac ="MAC_FMT"\n", FUNC_NDEV_ARG(ndev), MAC_ARG(mac));
#endif #endif
...@@ -1396,7 +1396,7 @@ void rtw_cfg80211_indicate_scan_done(struct adapter *adapter, bool aborted) ...@@ -1396,7 +1396,7 @@ void rtw_cfg80211_indicate_scan_done(struct adapter *adapter, bool aborted)
spin_lock_bh(&pwdev_priv->scan_req_lock); spin_lock_bh(&pwdev_priv->scan_req_lock);
if (pwdev_priv->scan_request != NULL) { if (pwdev_priv->scan_request != NULL) {
#ifdef CONFIG_DEBUG_CFG80211 #ifdef DEBUG_CFG80211
DBG_871X("%s with scan req\n", __func__); DBG_871X("%s with scan req\n", __func__);
#endif #endif
...@@ -1412,7 +1412,7 @@ void rtw_cfg80211_indicate_scan_done(struct adapter *adapter, bool aborted) ...@@ -1412,7 +1412,7 @@ void rtw_cfg80211_indicate_scan_done(struct adapter *adapter, bool aborted)
pwdev_priv->scan_request = NULL; pwdev_priv->scan_request = NULL;
} else { } else {
#ifdef CONFIG_DEBUG_CFG80211 #ifdef DEBUG_CFG80211
DBG_871X("%s without scan req\n", __func__); DBG_871X("%s without scan req\n", __func__);
#endif #endif
} }
...@@ -1446,7 +1446,7 @@ void rtw_cfg80211_surveydone_event_callback(struct adapter *padapter) ...@@ -1446,7 +1446,7 @@ void rtw_cfg80211_surveydone_event_callback(struct adapter *padapter)
struct __queue *queue = &(pmlmepriv->scanned_queue); struct __queue *queue = &(pmlmepriv->scanned_queue);
struct wlan_network *pnetwork = NULL; struct wlan_network *pnetwork = NULL;
#ifdef CONFIG_DEBUG_CFG80211 #ifdef DEBUG_CFG80211
DBG_8192C("%s\n", __func__); DBG_8192C("%s\n", __func__);
#endif #endif
...@@ -1486,7 +1486,7 @@ static int rtw_cfg80211_set_probe_req_wpsp2pie(struct adapter *padapter, char *b ...@@ -1486,7 +1486,7 @@ static int rtw_cfg80211_set_probe_req_wpsp2pie(struct adapter *padapter, char *b
u8 *wps_ie; u8 *wps_ie;
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
#ifdef CONFIG_DEBUG_CFG80211 #ifdef DEBUG_CFG80211
DBG_8192C("%s, ielen =%d\n", __func__, len); DBG_8192C("%s, ielen =%d\n", __func__, len);
#endif #endif
...@@ -1494,7 +1494,7 @@ static int rtw_cfg80211_set_probe_req_wpsp2pie(struct adapter *padapter, char *b ...@@ -1494,7 +1494,7 @@ static int rtw_cfg80211_set_probe_req_wpsp2pie(struct adapter *padapter, char *b
{ {
if ((wps_ie = rtw_get_wps_ie(buf, len, NULL, &wps_ielen))) if ((wps_ie = rtw_get_wps_ie(buf, len, NULL, &wps_ielen)))
{ {
#ifdef CONFIG_DEBUG_CFG80211 #ifdef DEBUG_CFG80211
DBG_8192C("probe_req_wps_ielen =%d\n", wps_ielen); DBG_8192C("probe_req_wps_ielen =%d\n", wps_ielen);
#endif #endif
...@@ -1548,7 +1548,7 @@ static int cfg80211_rtw_scan(struct wiphy *wiphy ...@@ -1548,7 +1548,7 @@ static int cfg80211_rtw_scan(struct wiphy *wiphy
pwdev_priv = adapter_wdev_data(padapter); pwdev_priv = adapter_wdev_data(padapter);
pmlmepriv = &padapter->mlmepriv; pmlmepriv = &padapter->mlmepriv;
/* ifdef CONFIG_DEBUG_CFG80211 */ /* ifdef DEBUG_CFG80211 */
DBG_871X(FUNC_ADPT_FMT"\n", FUNC_ADPT_ARG(padapter)); DBG_871X(FUNC_ADPT_FMT"\n", FUNC_ADPT_ARG(padapter));
/* endif */ /* endif */
...@@ -1558,7 +1558,7 @@ static int cfg80211_rtw_scan(struct wiphy *wiphy ...@@ -1558,7 +1558,7 @@ static int cfg80211_rtw_scan(struct wiphy *wiphy
if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true) if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true)
{ {
#ifdef CONFIG_DEBUG_CFG80211 #ifdef DEBUG_CFG80211
DBG_871X("%s under WIFI_AP_STATE\n", __func__); DBG_871X("%s under WIFI_AP_STATE\n", __func__);
#endif #endif
...@@ -1621,7 +1621,7 @@ static int cfg80211_rtw_scan(struct wiphy *wiphy ...@@ -1621,7 +1621,7 @@ static int cfg80211_rtw_scan(struct wiphy *wiphy
memset(ssid, 0, sizeof(struct ndis_802_11_ssid)*RTW_SSID_SCAN_AMOUNT); memset(ssid, 0, sizeof(struct ndis_802_11_ssid)*RTW_SSID_SCAN_AMOUNT);
/* parsing request ssids, n_ssids */ /* parsing request ssids, n_ssids */
for (i = 0; i < request->n_ssids && i < RTW_SSID_SCAN_AMOUNT; i++) { for (i = 0; i < request->n_ssids && i < RTW_SSID_SCAN_AMOUNT; i++) {
#ifdef CONFIG_DEBUG_CFG80211 #ifdef DEBUG_CFG80211
DBG_8192C("ssid =%s, len =%d\n", ssids[i].ssid, ssids[i].ssid_len); DBG_8192C("ssid =%s, len =%d\n", ssids[i].ssid, ssids[i].ssid_len);
#endif #endif
memcpy(ssid[i].Ssid, ssids[i].ssid, ssids[i].ssid_len); memcpy(ssid[i].Ssid, ssids[i].ssid, ssids[i].ssid_len);
...@@ -1631,7 +1631,7 @@ static int cfg80211_rtw_scan(struct wiphy *wiphy ...@@ -1631,7 +1631,7 @@ static int cfg80211_rtw_scan(struct wiphy *wiphy
/* parsing channels, n_channels */ /* parsing channels, n_channels */
memset(ch, 0, sizeof(struct rtw_ieee80211_channel)*RTW_CHANNEL_SCAN_AMOUNT); memset(ch, 0, sizeof(struct rtw_ieee80211_channel)*RTW_CHANNEL_SCAN_AMOUNT);
for (i = 0;i<request->n_channels && i<RTW_CHANNEL_SCAN_AMOUNT;i++) { for (i = 0;i<request->n_channels && i<RTW_CHANNEL_SCAN_AMOUNT;i++) {
#ifdef CONFIG_DEBUG_CFG80211 #ifdef DEBUG_CFG80211
DBG_871X(FUNC_ADPT_FMT CHAN_FMT"\n", FUNC_ADPT_ARG(padapter), CHAN_ARG(request->channels[i])); DBG_871X(FUNC_ADPT_FMT CHAN_FMT"\n", FUNC_ADPT_ARG(padapter), CHAN_ARG(request->channels[i]));
#endif #endif
ch[i].hw_value = request->channels[i]->hw_value; ch[i].hw_value = request->channels[i]->hw_value;
...@@ -3105,7 +3105,7 @@ static int _cfg80211_rtw_mgmt_tx(struct adapter *padapter, u8 tx_ch, const u8 *b ...@@ -3105,7 +3105,7 @@ static int _cfg80211_rtw_mgmt_tx(struct adapter *padapter, u8 tx_ch, const u8 *b
ack = false; ack = false;
ret = _FAIL; ret = _FAIL;
#ifdef CONFIG_DEBUG_CFG80211 #ifdef DEBUG_CFG80211
DBG_8192C("%s, ack == _FAIL\n", __func__); DBG_8192C("%s, ack == _FAIL\n", __func__);
#endif #endif
} }
...@@ -3114,7 +3114,7 @@ static int _cfg80211_rtw_mgmt_tx(struct adapter *padapter, u8 tx_ch, const u8 *b ...@@ -3114,7 +3114,7 @@ static int _cfg80211_rtw_mgmt_tx(struct adapter *padapter, u8 tx_ch, const u8 *b
msleep(50); msleep(50);
#ifdef CONFIG_DEBUG_CFG80211 #ifdef DEBUG_CFG80211
DBG_8192C("%s, ack =%d, ok!\n", __func__, ack); DBG_8192C("%s, ack =%d, ok!\n", __func__, ack);
#endif #endif
ret = _SUCCESS; ret = _SUCCESS;
...@@ -3122,7 +3122,7 @@ static int _cfg80211_rtw_mgmt_tx(struct adapter *padapter, u8 tx_ch, const u8 *b ...@@ -3122,7 +3122,7 @@ static int _cfg80211_rtw_mgmt_tx(struct adapter *padapter, u8 tx_ch, const u8 *b
exit: exit:
#ifdef CONFIG_DEBUG_CFG80211 #ifdef DEBUG_CFG80211
DBG_8192C("%s, ret =%d\n", __func__, ret); DBG_8192C("%s, ret =%d\n", __func__, ret);
#endif #endif
...@@ -3161,12 +3161,12 @@ static int cfg80211_rtw_mgmt_tx(struct wiphy *wiphy, ...@@ -3161,12 +3161,12 @@ static int cfg80211_rtw_mgmt_tx(struct wiphy *wiphy,
/* cookie generation */ /* cookie generation */
*cookie = (unsigned long) buf; *cookie = (unsigned long) buf;
#ifdef CONFIG_DEBUG_CFG80211 #ifdef DEBUG_CFG80211
DBG_871X(FUNC_ADPT_FMT" len =%zu, ch =%d" DBG_871X(FUNC_ADPT_FMT" len =%zu, ch =%d"
"\n", FUNC_ADPT_ARG(padapter), "\n", FUNC_ADPT_ARG(padapter),
len, tx_ch len, tx_ch
); );
#endif /* CONFIG_DEBUG_CFG80211 */ #endif /* DEBUG_CFG80211 */
/* indicate ack before issue frame to avoid racing with rsp frame */ /* indicate ack before issue frame to avoid racing with rsp frame */
rtw_cfg80211_mgmt_tx_status(padapter, *cookie, buf, len, ack, GFP_KERNEL); rtw_cfg80211_mgmt_tx_status(padapter, *cookie, buf, len, ack, GFP_KERNEL);
...@@ -3234,7 +3234,7 @@ static void cfg80211_rtw_mgmt_frame_register(struct wiphy *wiphy, ...@@ -3234,7 +3234,7 @@ static void cfg80211_rtw_mgmt_frame_register(struct wiphy *wiphy,
adapter = (struct adapter *)rtw_netdev_priv(ndev); adapter = (struct adapter *)rtw_netdev_priv(ndev);
#ifdef CONFIG_DEBUG_CFG80211 #ifdef DEBUG_CFG80211
DBG_871X(FUNC_ADPT_FMT" frame_type:%x, reg:%d\n", FUNC_ADPT_ARG(adapter), DBG_871X(FUNC_ADPT_FMT" frame_type:%x, reg:%d\n", FUNC_ADPT_ARG(adapter),
frame_type, reg); frame_type, reg);
#endif #endif
......
...@@ -4831,7 +4831,7 @@ static int rtw_wx_set_priv(struct net_device *dev, ...@@ -4831,7 +4831,7 @@ static int rtw_wx_set_priv(struct net_device *dev,
char *extra) char *extra)
{ {
#ifdef CONFIG_DEBUG_RTW_WX_SET_PRIV #ifdef DEBUG_RTW_WX_SET_PRIV
char *ext_dbg; char *ext_dbg;
#endif #endif
...@@ -4860,7 +4860,7 @@ static int rtw_wx_set_priv(struct net_device *dev, ...@@ -4860,7 +4860,7 @@ static int rtw_wx_set_priv(struct net_device *dev,
/* ("rtw_wx_set_priv: %s req =%s\n", */ /* ("rtw_wx_set_priv: %s req =%s\n", */
/* dev->name, ext)); */ /* dev->name, ext)); */
#ifdef CONFIG_DEBUG_RTW_WX_SET_PRIV #ifdef DEBUG_RTW_WX_SET_PRIV
if (!(ext_dbg = vmalloc(len))) if (!(ext_dbg = vmalloc(len)))
{ {
vfree(ext, len); vfree(ext, len);
...@@ -4918,7 +4918,7 @@ static int rtw_wx_set_priv(struct net_device *dev, ...@@ -4918,7 +4918,7 @@ static int rtw_wx_set_priv(struct net_device *dev,
FREE_EXT: FREE_EXT:
vfree(ext); vfree(ext);
#ifdef CONFIG_DEBUG_RTW_WX_SET_PRIV #ifdef DEBUG_RTW_WX_SET_PRIV
vfree(ext_dbg); vfree(ext_dbg);
#endif #endif
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
#include <rtw_debug.h> #include <rtw_debug.h>
#include "rtw_proc.h" #include "rtw_proc.h"
#ifdef CONFIG_PROC_DEBUG #ifdef PROC_DEBUG
static struct proc_dir_entry *rtw_proc = NULL; static struct proc_dir_entry *rtw_proc = NULL;
...@@ -784,4 +784,4 @@ void rtw_adapter_proc_replace(struct net_device *dev) ...@@ -784,4 +784,4 @@ void rtw_adapter_proc_replace(struct net_device *dev)
} }
#endif /* CONFIG_PROC_DEBUG */ #endif /* PROC_DEBUG */
...@@ -24,7 +24,7 @@ struct rtw_proc_hdl { ...@@ -24,7 +24,7 @@ struct rtw_proc_hdl {
ssize_t (*write)(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data); ssize_t (*write)(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
}; };
#ifdef CONFIG_PROC_DEBUG #ifdef PROC_DEBUG
int rtw_drv_proc_init(void); int rtw_drv_proc_init(void);
void rtw_drv_proc_deinit(void); void rtw_drv_proc_deinit(void);
...@@ -32,14 +32,14 @@ struct proc_dir_entry *rtw_adapter_proc_init(struct net_device *dev); ...@@ -32,14 +32,14 @@ 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_deinit(struct net_device *dev);
void rtw_adapter_proc_replace(struct net_device *dev); void rtw_adapter_proc_replace(struct net_device *dev);
#else //!CONFIG_PROC_DEBUG #else //!PROC_DEBUG
int rtw_drv_proc_init(void) {return 0;} static inline int rtw_drv_proc_init(void) {return 0;}
void rtw_drv_proc_deinit(void) {} static inline void rtw_drv_proc_deinit(void) {}
struct proc_dir_entry *rtw_adapter_proc_init(struct net_device *dev){return NULL;} static inline struct proc_dir_entry *rtw_adapter_proc_init(struct net_device *dev){return NULL;}
void rtw_adapter_proc_deinit(struct net_device *dev){} static inline void rtw_adapter_proc_deinit(struct net_device *dev){}
void rtw_adapter_proc_replace(struct net_device *dev){} static inline void rtw_adapter_proc_replace(struct net_device *dev){}
#endif //!CONFIG_PROC_DEBUG #endif //!PROC_DEBUG
#endif //__RTW_PROC_H__ #endif //__RTW_PROC_H__
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