Skip to contentSkip to conversation

staging: rtl8723bs: remove DBG_871X trace macro

PATCH In review Fabio Aiuto 5 participants 31 messages Apr 7, 2021 – Apr 14, 2021 Staging

lore
Share & tools
lore
#0 lore raw

cover staging: rtl8723bs: remove DBG_871X trace macro

This patchset removes all DBG_871X usages and definitions.

The whole private tracing system is not tied to a configuration symbol and the default behaviour is _trace nothing_.

DBG_871X macros require the code to be modified by
hand in order to be turned on. This obviously has not happened since the code was merged, so just remove them as they are unused.

First patch fix a DBG_871X call. It has three args over only two placeholders in the first format string argument.
If I would not make this fix, the semantic patch
used to bulk remove all macro occurences would ignore the abnormal macro (the one with three args) and all subsequent occurrences in the same file (core/rtw_recv.c).

The second patch applies the cocci script.

This is the semantic patch:

@@
expression a, b, c, d, e, f, g, h, i, j, k;
constant B, C, D, E;
@@

(
- DBG_871X(a);
|
- DBG_871X(a, b);
|
- DBG_871X(a, B);
|
- DBG_871X(a, b, c);
|
- DBG_871X(a, B, c);
|
- DBG_871X(a, b, C);
|
- DBG_871X(a, B, C);
|
- DBG_871X(a, b, c, d);
|
- DBG_871X(a, B, c, d);
|
- DBG_871X(a, b, C, d);
|
- DBG_871X(a, b, c, D);
|
- DBG_871X(a, B, C, d);
|
- DBG_871X(a, B, c, D);
|
- DBG_871X(a, b, C, D);
|
- DBG_871X(a, B, C, D);
|
- DBG_871X(a, b, c, d, e);
|
- DBG_871X(a, B, c, d, e);
|
- DBG_871X(a, b, C, d, e);
|
- DBG_871X(a, b, c, D, e);
|
- DBG_871X(a, b, c, d, E);
|
- DBG_871X(a, B, C, d, e);
|
- DBG_871X(a, B, c, D, e);
|
- DBG_871X(a, B, c, d, E);
|
- DBG_871X(a, b, C, D, e);
|
- DBG_871X(a, b, C, d, E);
|
- DBG_871X(a, b, c, D, E);
|
- DBG_871X(a, B, C, D, e);
|
- DBG_871X(a, B, C, d, E);
|
- DBG_871X(a, B, c, D, E);
|
- DBG_871X(a, b, C, D, E);
|
- DBG_871X(a, B, C, D, E);
|
- DBG_871X(a, b, c, d, e, f);
|
- DBG_871X(a, b, c, d, e, f, g);
|
- DBG_871X(a, b, c, d, e, f, g, h);
|
- DBG_871X(a, b, c, d, e, f, g, h, i);
|
- DBG_871X(a, b, c, d, e, f, g, h, i, j);
|
- DBG_871X(a, b, c, d, e, f, g, h, i, j, k);
)

The third one removes an unmatched macro call, maybe due to the trailing \, because the occurrence is inside a macro expansion.

The fourth one deletes all commented out call spread all over the rtl8723bs code.

Fifth one removes definitions.

All remaining patches do some code cleaning on all places where DBG_871X has been removed.

Fabio Aiuto (19):
staging: rtl8723bs: remove DBG_871X log argument
staging: rtl8723bs: remove all DBG_871X logs
staging: rtl8723bs: remove DBG_871CX log unmatched by cocci
staging: rtl8723bs: remove commented out DBG_871X logs
staging: rtl8723bs: remove DBG_871X macro definitions
staging: rtl8723bs: remove all if-else empty blocks left by DBG_871X
removal
drivers: rtl8723bs: rewrite comparison to null
staging: rtl8723bs: put constant on the right side in if condition
staging: rtl8723bs: remove empty for cycles left by DBG_871X removal
staging: rtl8723bs: remove empty tracing function dump_rx_packet
staging: rtl8723bs: remove empty #ifdef blocks after DBG_871X removal
staging: rtl8723bs: remove unnecessary bracks on DBG_871X removal
sites
staging: rtl8723bs: remove unnecessary parentheses in if condition
staging: rtl8723bs: add spaces around operators
staging: rtl8723bs: rewrite comparison to null
staging: rtl8723bs: remove unnecessary parentheses
staging: rtl8723bs: fix comparison in if condition
staging: rtl8723bs: split long lines
staging: rtl8723bs: remove unnecessary parentheses

 drivers/staging/rtl8723bs/core/rtw_ap.c       | 158 +------
 drivers/staging/rtl8723bs/core/rtw_btcoex.c   |  12 +-
 drivers/staging/rtl8723bs/core/rtw_cmd.c      |  51 +--
 drivers/staging/rtl8723bs/core/rtw_efuse.c    |  11 -
 .../staging/rtl8723bs/core/rtw_ieee80211.c    |  48 +-
 drivers/staging/rtl8723bs/core/rtw_io.c       |   7 +-
 .../staging/rtl8723bs/core/rtw_ioctl_set.c    |  11 +-
 drivers/staging/rtl8723bs/core/rtw_mlme.c     | 170 +------
 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 366 ++-------------
 drivers/staging/rtl8723bs/core/rtw_pwrctrl.c  | 144 +-----
 drivers/staging/rtl8723bs/core/rtw_recv.c     | 251 +----------
 drivers/staging/rtl8723bs/core/rtw_security.c |  26 +-
 drivers/staging/rtl8723bs/core/rtw_sta_mgt.c  |  10 -
 .../staging/rtl8723bs/core/rtw_wlan_util.c    | 154 ++-----
 drivers/staging/rtl8723bs/core/rtw_xmit.c     | 141 +-----
 .../staging/rtl8723bs/hal/HalPhyRf_8723B.c    |  11 -
 drivers/staging/rtl8723bs/hal/HalPwrSeqCmd.c  |   9 +-
 drivers/staging/rtl8723bs/hal/hal_btcoex.c    |   2 -
 drivers/staging/rtl8723bs/hal/hal_com.c       |  49 +-
 .../staging/rtl8723bs/hal/hal_com_phycfg.c    | 208 ++-------
 drivers/staging/rtl8723bs/hal/hal_intf.c      |  12 +-
 drivers/staging/rtl8723bs/hal/odm.c           |   3 -
 drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c  |  92 +---
 drivers/staging/rtl8723bs/hal/rtl8723b_dm.c   |   5 -
 .../staging/rtl8723bs/hal/rtl8723b_hal_init.c |  90 +---
 .../staging/rtl8723bs/hal/rtl8723b_phycfg.c   |  15 +-
 .../staging/rtl8723bs/hal/rtl8723bs_recv.c    |   9 -
 .../staging/rtl8723bs/hal/rtl8723bs_xmit.c    |  37 +-
 drivers/staging/rtl8723bs/hal/sdio_halinit.c  |  31 +-
 drivers/staging/rtl8723bs/hal/sdio_ops.c      |  23 +-
 drivers/staging/rtl8723bs/include/rtw_debug.h |   6 -
 .../staging/rtl8723bs/include/rtw_mlme_ext.h  |   3 -
 .../staging/rtl8723bs/include/rtw_pwrctrl.h   |   1 -
 .../staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 208 +--------
 .../staging/rtl8723bs/os_dep/ioctl_linux.c    | 421 +-----------------
 drivers/staging/rtl8723bs/os_dep/mlme_linux.c |   6 +-
 drivers/staging/rtl8723bs/os_dep/os_intfs.c   |  90 +---
 .../staging/rtl8723bs/os_dep/osdep_service.c  |   2 -
 drivers/staging/rtl8723bs/os_dep/recv_linux.c |   5 +-
 drivers/staging/rtl8723bs/os_dep/sdio_intf.c  |  27 +-
 .../staging/rtl8723bs/os_dep/sdio_ops_linux.c |  97 +---
 drivers/staging/rtl8723bs/os_dep/xmit_linux.c |  21 +-
 42 files changed, 299 insertions(+), 2744 deletions(-)
Signature · 1 line
2.20.1
#1 lore raw

PATCH 1/19 staging: rtl8723bs: remove DBG_871X log argument

This patch prepares the application of the semantic patch aimed to remove all DBG_871X logs.

One occurrence of the DBG_871X macro has one repeated argument, that's not even comma separated value with the previous one nor a format string parameter associated.

In normal conditions this worked, for the macro is usually not expanded (the do nothing behaviour), but if I try to apply the sempantic patch to remove all macro occurrences, all macros call after that abnormal declaration are left untouched (not removed).

Remove all of the DBG_871X logs as they currently
do nothing as they require the code to be modified by hand in order to be turned on. This obviously has not happened since the code was merged, so just remove them as they are unused.

---
 drivers/staging/rtl8723bs/core/rtw_recv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8723bs/core/rtw_recv.c +1 -1
index eac663119290..f18a7afcc0d3 100644
@@ -823,7 +823,7 @@ static signed int ap2sta_data_frame(struct adapter *adapter, union recv_frame *p
 			#ifdef DBG_RX_DROP_FRAME
 			DBG_871X("DBG_RX_DROP_FRAME %s BSSID =%pM, mybssid =%pM\n",
 				__func__, MAC_ARG(pattrib->bssid), MAC_ARG(mybssid));
-			DBG_871X("this adapter = %d, buddy adapter = %d\n", adapter->adapter_type, adapter->pbuddystruct adapter->adapter_type);
+			DBG_871X("this adapter = %d, buddy adapter = %d\n", adapter->adapter_type, adapter->pbuddystruct);
 			#endif
 
 			if (!bmcast) {
Signature · 1 line
2.20.1
#2 lore raw

PATCH 2/19 staging: rtl8723bs: remove all DBG_871X logs

In reply to Fabio Aiuto

Remove all of the DBG_871X logs as they
currently do nothing as they require the code to be modified by hand in order to be turned on. This obviously has not happened since the code was merged, so just remove them as they are unused.

applied the following semantic patch script:

@@
expression a, b, c, d, e, f, g, h, i, j, k;
constant B, C, D, E;
@@

(
- DBG_871X(a);
|
- DBG_871X(a, b);
|
- DBG_871X(a, B);
|
- DBG_871X(a, b, c);
|
- DBG_871X(a, B, c);
|
- DBG_871X(a, b, C);
|
- DBG_871X(a, B, C);
|
- DBG_871X(a, b, c, d);
|
- DBG_871X(a, B, c, d);
|
- DBG_871X(a, b, C, d);
|
- DBG_871X(a, b, c, D);
|
- DBG_871X(a, B, C, d);
|
- DBG_871X(a, B, c, D);
|
- DBG_871X(a, b, C, D);
|
- DBG_871X(a, B, C, D);
|
- DBG_871X(a, b, c, d, e);
|
- DBG_871X(a, B, c, d, e);
|
- DBG_871X(a, b, C, d, e);
|
- DBG_871X(a, b, c, D, e);
|
- DBG_871X(a, b, c, d, E);
|
- DBG_871X(a, B, C, d, e);
|
- DBG_871X(a, B, c, D, e);
|
- DBG_871X(a, B, c, d, E);
|
- DBG_871X(a, b, C, D, e);
|
- DBG_871X(a, b, C, d, E);
|
- DBG_871X(a, b, c, D, E);
|
- DBG_871X(a, B, C, D, e);
|
- DBG_871X(a, B, C, d, E);
|
- DBG_871X(a, B, c, D, E);
|
- DBG_871X(a, b, C, D, E);
|
- DBG_871X(a, B, C, D, E);
|
- DBG_871X(a, b, c, d, e, f);
|
- DBG_871X(a, b, c, d, e, f, g);
|
- DBG_871X(a, b, c, d, e, f, g, h);
|
- DBG_871X(a, b, c, d, e, f, g, h, i);
|
- DBG_871X(a, b, c, d, e, f, g, h, i, j);
|
- DBG_871X(a, b, c, d, e, f, g, h, i, j, k);
)

---
 drivers/staging/rtl8723bs/core/rtw_ap.c       | 124 +-------
 drivers/staging/rtl8723bs/core/rtw_btcoex.c   |   6 -
 drivers/staging/rtl8723bs/core/rtw_cmd.c      |  12 -
 drivers/staging/rtl8723bs/core/rtw_efuse.c    |   5 -
 .../staging/rtl8723bs/core/rtw_ieee80211.c    |  33 --
 drivers/staging/rtl8723bs/core/rtw_io.c       |   1 -
 .../staging/rtl8723bs/core/rtw_ioctl_set.c    |   7 +-
 drivers/staging/rtl8723bs/core/rtw_mlme.c     | 112 +------
 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 211 +------------
 drivers/staging/rtl8723bs/core/rtw_pwrctrl.c  |  57 +---
 drivers/staging/rtl8723bs/core/rtw_recv.c     | 106 +------
 drivers/staging/rtl8723bs/core/rtw_security.c |  11 -
 drivers/staging/rtl8723bs/core/rtw_sta_mgt.c  |   6 +-
 .../staging/rtl8723bs/core/rtw_wlan_util.c    |  56 +---
 drivers/staging/rtl8723bs/core/rtw_xmit.c     |  44 +--
 .../staging/rtl8723bs/hal/HalPhyRf_8723B.c    |  11 -
 drivers/staging/rtl8723bs/hal/HalPwrSeqCmd.c  |   5 -
 drivers/staging/rtl8723bs/hal/hal_com.c       |  40 +--
 .../staging/rtl8723bs/hal/hal_com_phycfg.c    |  49 +--
 drivers/staging/rtl8723bs/hal/hal_intf.c      |  10 +-
 drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c  |  46 +--
 drivers/staging/rtl8723bs/hal/rtl8723b_dm.c   |   5 -
 .../staging/rtl8723bs/hal/rtl8723b_hal_init.c |  68 +---
 .../staging/rtl8723bs/hal/rtl8723b_phycfg.c   |   9 -
 .../staging/rtl8723bs/hal/rtl8723bs_recv.c    |   1 -
 .../staging/rtl8723bs/hal/rtl8723bs_xmit.c    |  24 --
 drivers/staging/rtl8723bs/hal/sdio_halinit.c  |  25 +-
 drivers/staging/rtl8723bs/hal/sdio_ops.c      |  14 +-
 .../staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 143 +--------
 .../staging/rtl8723bs/os_dep/ioctl_linux.c    | 294 +-----------------
 drivers/staging/rtl8723bs/os_dep/mlme_linux.c |   2 -
 drivers/staging/rtl8723bs/os_dep/os_intfs.c   |  63 ----
 .../staging/rtl8723bs/os_dep/osdep_service.c  |   2 -
 drivers/staging/rtl8723bs/os_dep/recv_linux.c |   1 -
 drivers/staging/rtl8723bs/os_dep/sdio_intf.c  |  18 --
 .../staging/rtl8723bs/os_dep/sdio_ops_linux.c |  30 +-
 drivers/staging/rtl8723bs/os_dep/xmit_linux.c |   4 -
 37 files changed, 89 insertions(+), 1566 deletions(-)
drivers/staging/rtl8723bs/core/rtw_ap.c +3 -121
index d65832b06444..dcf1dec635d7 100644
@@ -171,17 +171,6 @@ u8 chk_sta_is_alive(struct sta_info *psta);
 u8 chk_sta_is_alive(struct sta_info *psta)
 {
 	#ifdef DBG_EXPIRATION_CHK
-	DBG_871X(
-		"sta:%pM, rssi:%d, rx:"STA_PKTS_FMT", expire_to:%u, %s%ssq_len:%u\n"
-		, MAC_ARG(psta->hwaddr)
-		, psta->rssi_stat.UndecoratedSmoothedPWDB
-		/*  STA_RX_PKTS_ARG(psta) */
-		, STA_RX_PKTS_DIFF_ARG(psta)
-		, psta->expire_to
-		, psta->state & WIFI_SLEEP_STATE ? "PS, " : ""
-		, psta->state & WIFI_STA_ALIVE_CHK_STATE ? "SAC, " : ""
-		, psta->sleepq_len
-	);
 	#endif
 
 	sta_update_last_rx_pkts(psta);
@@ -207,9 +196,6 @@ void expire_timeout_chk(struct adapter *padapter)
 	/* check auth_queue */
 	#ifdef DBG_EXPIRATION_CHK
 	if (phead != plist) {
-		DBG_871X(FUNC_NDEV_FMT " auth_list, cnt:%u\n",
-			 FUNC_NDEV_ARG(padapter->pnetdev),
-			 pstapriv->auth_list_cnt);
 	}
 	#endif
 	while (phead != plist) {
@@ -223,15 +209,6 @@ void expire_timeout_chk(struct adapter *padapter)
 				list_del_init(&psta->auth_list);
 				pstapriv->auth_list_cnt--;
 
-				DBG_871X("auth expire %02X%02X%02X%02X%02X%02X\n",
-					 psta->hwaddr[0],
-					 psta->hwaddr[1],
-					 psta->hwaddr[2],
-					 psta->hwaddr[3],
-					 psta->hwaddr[4],
-					 psta->hwaddr[5]
-				);
-
 				spin_unlock_bh(&pstapriv->auth_list_lock);
 
 				rtw_free_stainfo(padapter, psta);
@@ -252,8 +229,6 @@ void expire_timeout_chk(struct adapter *padapter)
 	/* check asoc_queue */
 	#ifdef DBG_EXPIRATION_CHK
 	if (phead != plist) {
-		DBG_871X(FUNC_NDEV_FMT" asoc_list, cnt:%u\n"
-			, FUNC_NDEV_ARG(padapter->pnetdev), pstapriv->asoc_list_cnt);
 	}
 	#endif
 	while (phead != plist) {
@@ -304,10 +279,6 @@ void expire_timeout_chk(struct adapter *padapter)
 			}
 			list_del_init(&psta->asoc_list);
 			pstapriv->asoc_list_cnt--;
-			DBG_871X("asoc expire %pM, state = 0x%x\n",
-				 MAC_ARG(psta->hwaddr),
-				 psta->state
-			);
 			updated = ap_free_sta(padapter, psta, false, WLAN_REASON_DEAUTH_LEAVING);
 		} else {
 			/* TODO: Aging mechanism to digest frames in sleep_q to */
@@ -317,14 +288,6 @@ void expire_timeout_chk(struct adapter *padapter)
 					NR_XMITFRAME / pstapriv->asoc_list_cnt
 				) / 2)
 			) {
-				DBG_871X(
-					"%s sta:%pM, sleepq_len:%u, free_xmitframe_cnt:%u, asoc_list_cnt:%u, clear sleep_q\n",
-					__func__,
-					MAC_ARG(psta->hwaddr),
-					psta->sleepq_len,
-					padapter->xmitpriv.free_xmitframe_cnt,
-					pstapriv->asoc_list_cnt
-				);
 				wakeup_sta_to_xmit(padapter, psta);
 			}
 		}
@@ -357,22 +320,15 @@ void expire_timeout_chk(struct adapter *padapter)
 
 			psta->keep_alive_trycnt++;
 			if (ret == _SUCCESS) {
-				DBG_871X("asoc check, sta(%pM) is alive\n",
-					 MAC_ARG(psta->hwaddr)
-					);
 				psta->expire_to = pstapriv->expire_to;
 				psta->keep_alive_trycnt = 0;
 				continue;
 			} else if (psta->keep_alive_trycnt <= 3) {
-				DBG_871X("ack check for asoc expire, keep_alive_trycnt =%d\n",
-					 psta->keep_alive_trycnt);
 				psta->expire_to = 1;
 				continue;
 			}
 
 			psta->keep_alive_trycnt = 0;
-			DBG_871X("asoc expire %pM, state = 0x%x\n", MAC_ARG(psta->hwaddr),
-				 psta->state);
 			spin_lock_bh(&pstapriv->asoc_list_lock);
 			if (list_empty(&psta->asoc_list) == false) {
 				list_del_init(&psta->asoc_list);
@@ -437,12 +393,8 @@ void add_RATid(struct adapter *padapter, struct sta_info *psta, u8 rssi_level)
 		arg[2] = shortGIrate;
 		arg[3] = psta->init_rate;
 
-		DBG_871X("%s => mac_id:%d , raid:%d , shortGIrate =%d, bitmap = 0x%x\n",
-			 __func__, psta->mac_id, psta->raid, shortGIrate, tx_ra_bitmap);
-
 		rtw_hal_add_ra_tid(padapter, tx_ra_bitmap, arg, rssi_level);
 	} else {
-		DBG_871X("station aid %d exceed the max number\n", psta->aid);
 	}
 }
 
@@ -509,9 +461,6 @@ void update_bmc_sta(struct adapter *padapter)
 			arg[2] = 0;
 			arg[3] = psta->init_rate;
 
-			DBG_871X("%s => mac_id:%d , raid:%d , bitmap = 0x%x\n",
-				 __func__, psta->mac_id, psta->raid, tx_ra_bitmap);
-
 			rtw_hal_add_ra_tid(padapter, tx_ra_bitmap, arg, 0);
 		}
 
@@ -522,7 +471,6 @@ void update_bmc_sta(struct adapter *padapter)
 		spin_unlock_bh(&psta->lock);
 
 	} else {
-		DBG_871X("add_RATid_bmc_sta error!\n");
 	}
 }
 
@@ -605,14 +553,12 @@ void update_sta_info_apmode(struct adapter *padapter, struct sta_info *psta)
 		if (TEST_FLAG(phtpriv_ap->ldpc_cap, LDPC_HT_ENABLE_TX) &&
 			      GET_HT_CAPABILITY_ELE_LDPC_CAP((u8 *)(&phtpriv_sta->ht_cap))) {
 			SET_FLAG(cur_ldpc_cap, (LDPC_HT_ENABLE_TX | LDPC_HT_CAP_TX));
-			DBG_871X("Enable HT Tx LDPC for STA(%d)\n", psta->aid);
 		}
 
 		/*  B7 B8 B9 Config STBC setting */
 		if (TEST_FLAG(phtpriv_ap->stbc_cap, STBC_HT_ENABLE_TX) &&
 			      GET_HT_CAPABILITY_ELE_RX_STBC((u8 *)(&phtpriv_sta->ht_cap))) {
 			SET_FLAG(cur_stbc_cap, (STBC_HT_ENABLE_TX | STBC_HT_CAP_TX));
-			DBG_871X("Enable HT Tx STBC for STA(%d)\n", psta->aid);
 		}
 	} else {
 		phtpriv_sta->ampdu_enable = false;
@@ -719,7 +665,7 @@ static void update_hw_ht_param(struct adapter *padapter)
 		pmlmeinfo->HT_caps.u.HT_cap_element.HT_caps_info
 	) & 0x0C) >> 2;
 	if (pmlmeinfo->SM_PS == WLAN_HT_CAP_SM_PS_STATIC)
-		DBG_871X("%s(): WLAN_HT_CAP_SM_PS_STATIC\n", __func__);
+		{}
 
 	/*  */
 	/*  Config current HT Protection mode. */
@@ -863,11 +809,6 @@ void start_bss_network(struct adapter *padapter, u8 *pbuf)
 	}
 
 	set_channel_bwmode(padapter, cur_channel, cur_ch_offset, cur_bwmode);
-	DBG_871X("CH =%d, BW =%d, offset =%d\n",
-		 cur_channel,
-		 cur_bwmode,
-		 cur_ch_offset
-	);
 	pmlmeext->cur_channel = cur_channel;
 	pmlmeext->cur_bwmode = cur_bwmode;
 	pmlmeext->cur_ch_offset = cur_ch_offset;
@@ -894,7 +835,7 @@ void start_bss_network(struct adapter *padapter, u8 *pbuf)
 
 		/* issue beacon frame */
 		if (send_beacon(padapter) == _FAIL)
-			DBG_871X("issue_beacon, fail!\n");
+			{}
 	}
 
 	/* update bc/mc sta_info */
@@ -924,19 +865,6 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf,  int len)
 		*pbss_network = (struct wlan_bssid_ex *)&pmlmepriv->cur_network.network;
 	u8 *ie = pbss_network->IEs;
 
-	/* SSID */
-	/* Supported rates */
-	/* DS Params */
-	/* WLAN_EID_COUNTRY */
-	/* ERP Information element */
-	/* Extended supported rates */
-	/* WPA/WPA2 */
-	/* Wi-Fi Wireless Multimedia Extensions */
-	/* ht_capab, ht_oper */
-	/* WPS IE */
-
-	DBG_871X("%s, len =%d\n", __func__, len);
-
 	if (!check_fwstate(pmlmepriv, WIFI_AP_STATE))
 		return _FAIL;
 
@@ -1284,8 +1212,6 @@ void rtw_set_macaddr_acl(struct adapter *padapter, int mode)
 	struct sta_priv *pstapriv = &padapter->stapriv;
 	struct wlan_acl_pool *pacl_list = &pstapriv->acl_list;
 
-	DBG_871X("%s, mode =%d\n", __func__, mode);
-
 	pacl_list->mode = mode;
 }
 
@@ -1299,8 +1225,6 @@ int rtw_acl_add_sta(struct adapter *padapter, u8 *addr)
 	struct wlan_acl_pool *pacl_list = &pstapriv->acl_list;
 	struct __queue	*pacl_node_q = &pacl_list->acl_node_q;
 
-	DBG_871X("%s(acl_num =%d) =%pM\n", __func__, pacl_list->num, MAC_ARG(addr));
-
 	if ((NUM_ACL - 1) < pacl_list->num)
 		return (-1);
 
@@ -1316,7 +1240,6 @@ int rtw_acl_add_sta(struct adapter *padapter, u8 *addr)
 		if (!memcmp(paclnode->addr, addr, ETH_ALEN)) {
 			if (paclnode->valid == true) {
 				added = true;
-				DBG_871X("%s, sta has been added\n", __func__);
 				break;
 			}
 		}
@@ -1347,8 +1270,6 @@ int rtw_acl_add_sta(struct adapter *padapter, u8 *addr)
 		}
 	}
 
-	DBG_871X("%s, acl_num =%d\n", __func__, pacl_list->num);
-
 	spin_unlock_bh(&(pacl_node_q->lock));
 
 	return ret;
@@ -1363,8 +1284,6 @@ void rtw_acl_remove_sta(struct adapter *padapter, u8 *addr)
 	struct __queue	*pacl_node_q = &pacl_list->acl_node_q;
 	u8 baddr[ETH_ALEN] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };	/* Baddr is used for clearing acl_list */
 
-	DBG_871X("%s(acl_num =%d) =%pM\n", __func__, pacl_list->num, MAC_ARG(addr));
-
 	spin_lock_bh(&(pacl_node_q->lock));
 
 	phead = get_list_head(pacl_node_q);
@@ -1390,8 +1309,6 @@ void rtw_acl_remove_sta(struct adapter *padapter, u8 *addr)
 
 	spin_unlock_bh(&(pacl_node_q->lock));
 
-	DBG_871X("%s, acl_num =%d\n", __func__, pacl_list->num);
-
 }
 
 u8 rtw_ap_set_pairwise_key(struct adapter *padapter, struct sta_info *psta)
@@ -1536,8 +1453,6 @@ static void update_bcn_erpinfo_ie(struct adapter *padapter)
 	unsigned char *p, *ie = pnetwork->IEs;
 	u32 len = 0;
 
-	DBG_871X("%s, ERP_enable =%d\n", __func__, pmlmeinfo->ERP_enable);
-
 	if (!pmlmeinfo->ERP_enable)
 		return;
 
@@ -1662,7 +1577,7 @@ static void update_bcn_vendor_spec_ie(struct adapter *padapter, u8 *oui)
 		update_bcn_p2p_ie(padapter);
 
 	else
-		DBG_871X("unknown OUI type!\n");
+		{}
 }
 
 void update_beacon(struct adapter *padapter, u8 ie_id, u8 *oui, u8 tx)
@@ -1762,12 +1677,6 @@ static int rtw_ht_operation_update(struct adapter *padapter)
 	if (pmlmepriv->htpriv.ht_option)
 		return 0;
 
-	/* if (!iface->conf->ieee80211n || iface->conf->ht_op_mode_fixed) */
-	/*  return 0; */
-
-	DBG_871X("%s current operation mode = 0x%X\n",
-		   __func__, pmlmepriv->ht_op_mode);
-
 	if (!(pmlmepriv->ht_op_mode & IEEE80211_HT_OP_MODE_NON_GF_STA_PRSNT)
 	    && pmlmepriv->num_sta_ht_no_gf) {
 		pmlmepriv->ht_op_mode |=
@@ -1817,9 +1726,6 @@ static int rtw_ht_operation_update(struct adapter *padapter)
 		op_mode_changes++;
 	}
 
-	DBG_871X("%s new operation mode = 0x%X changes =%d\n",
-		 __func__, pmlmepriv->ht_op_mode, op_mode_changes);
-
 	return op_mode_changes;
 }
 
@@ -1935,9 +1841,6 @@ void bss_cap_update_on_sta_join(struct adapter *padapter, struct sta_info *psta)
 	if (psta->flags & WLAN_STA_HT) {
 		u16 ht_capab = le16_to_cpu(psta->htpriv.ht_cap.cap_info);
 
-		DBG_871X("HT: STA %pM HT Capabilities Info: 0x%04x\n",
-			 MAC_ARG(psta->hwaddr), ht_capab);
-
 		if (psta->no_ht_set) {
 			psta->no_ht_set = 0;
 			pmlmepriv->num_sta_no_ht--;
@@ -1948,9 +1851,6 @@ void bss_cap_update_on_sta_join(struct adapter *padapter, struct sta_info *psta)
 				psta->no_ht_gf_set = 1;
 				pmlmepriv->num_sta_ht_no_gf++;
 			}
-			DBG_871X("%s STA %pM - no greenfield, num of non-gf stations %d\n",
-				 __func__, MAC_ARG(psta->hwaddr),
-				 pmlmepriv->num_sta_ht_no_gf);
 		}
 
 		if ((ht_capab & IEEE80211_HT_CAP_SUP_WIDTH) == 0) {
@@ -1958,9 +1858,6 @@ void bss_cap_update_on_sta_join(struct adapter *padapter, struct sta_info *psta)
 				psta->ht_20mhz_set = 1;
 				pmlmepriv->num_sta_ht_20mhz++;
 			}
-			DBG_871X("%s STA %pM - 20 MHz HT, num of 20MHz HT STAs %d\n",
-				 __func__, MAC_ARG(psta->hwaddr),
-				 pmlmepriv->num_sta_ht_20mhz);
 		}
 
 	} else {
@@ -1969,9 +1866,6 @@ void bss_cap_update_on_sta_join(struct adapter *padapter, struct sta_info *psta)
 			pmlmepriv->num_sta_no_ht++;
 		}
 		if (pmlmepriv->htpriv.ht_option == true) {
-			DBG_871X("%s STA %pM - no HT, num of non-HT stations %d\n",
-				   __func__, MAC_ARG(psta->hwaddr),
-				   pmlmepriv->num_sta_no_ht);
 		}
 	}
 
@@ -1982,8 +1876,6 @@ void bss_cap_update_on_sta_join(struct adapter *padapter, struct sta_info *psta)
 
 	/* update associated stations cap. */
 	associated_clients_update(padapter,  beacon_updated);
-
-	DBG_871X("%s, updated =%d\n", __func__, beacon_updated);
 }
 
 u8 bss_cap_update_on_sta_leave(struct adapter *padapter, struct sta_info *psta)
@@ -2044,11 +1936,6 @@ u8 bss_cap_update_on_sta_leave(struct adapter *padapter, struct sta_info *psta)
 		update_beacon(padapter, WLAN_EID_HT_OPERATION, NULL, true);
 	}
 
-	/* update associated stations cap. */
-	/* associated_clients_update(padapter,  beacon_updated); //move it to avoid deadlock */
-
-	DBG_871X("%s, updated =%d\n", __func__, beacon_updated);
-
 	return beacon_updated;
 }
 
@@ -2106,8 +1993,6 @@ void rtw_sta_flush(struct adapter *padapter)
 	struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
 	u8 bc_addr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
 
-	DBG_871X(FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(padapter->pnetdev));
-
 	if ((pmlmeinfo->state & 0x03) != WIFI_FW_AP_STATE)
 		return;
 
@@ -2235,7 +2120,6 @@ void rtw_ap_restore_network(struct adapter *padapter)
 		psta = rtw_get_stainfo_by_offset(pstapriv, chk_alive_list[i]);
 
 		if (psta == NULL) {
-			DBG_871X(FUNC_ADPT_FMT" sta_info is null\n", FUNC_ADPT_ARG(padapter));
 		} else if (psta->state & _FW_LINKED) {
 			rtw_sta_media_status_rpt(padapter, psta, 1);
 			Update_RA_Entry(padapter, psta);
@@ -2339,8 +2223,6 @@ void stop_ap_mode(struct adapter *padapter)
 	}
 	spin_unlock_bh(&(pacl_node_q->lock));
 
-	DBG_871X("%s, free acl_node_queue, num =%d\n", __func__, pacl_list->num);
-
 	rtw_sta_flush(padapter);
 
 	/* free_assoc_sta_resources */
drivers/staging/rtl8723bs/core/rtw_btcoex.c +0 -6
index 44219b7b6123..ebdbd328b62c 100644
@@ -22,16 +22,10 @@ void rtw_btcoex_MediaStatusNotify(struct adapter *padapter, u8 mediaStatus)
 void rtw_btcoex_HaltNotify(struct adapter *padapter)
 {
 	if (!padapter->bup) {
-		DBG_871X(FUNC_ADPT_FMT ": bup =%d Skip!\n",
-			FUNC_ADPT_ARG(padapter), padapter->bup);
-
 		return;
 	}
 
 	if (padapter->bSurpriseRemoved) {
-		DBG_871X(FUNC_ADPT_FMT ": bSurpriseRemoved =%d Skip!\n",
-			FUNC_ADPT_ARG(padapter), padapter->bSurpriseRemoved);
-
 		return;
 	}
 
drivers/staging/rtl8723bs/core/rtw_cmd.c +0 -12
index 77c583c60343..6958891eb0e5 100644
@@ -492,9 +492,6 @@ int rtw_cmd_thread(void *context)
 
 		cmd_process_time = jiffies_to_msecs(jiffies - cmd_start_time);
 		if (cmd_process_time > 1000) {
-			DBG_871X("%s cmd= %d process_time= %lu > 1 sec\n",
-				 ADPT_ARG(pcmd->padapter), pcmd->cmdcode,
-				 cmd_process_time);
 		}
 
 		/* call callback function for post-processed */
@@ -582,9 +579,6 @@ u8 rtw_sitesurvey_cmd(struct adapter  *padapter, struct ndis_802_11_ssid *ssid,
 			if (ssid[i].SsidLength) {
 				memcpy(&psurveyPara->ssid[i], &ssid[i], sizeof(struct ndis_802_11_ssid));
 				psurveyPara->ssid_num++;
-
-				DBG_871X(FUNC_ADPT_FMT" ssid:(%s, %d)\n", FUNC_ADPT_ARG(padapter),
-					psurveyPara->ssid[i].Ssid, psurveyPara->ssid[i].SsidLength);
 			}
 		}
 	}
@@ -596,9 +590,6 @@ u8 rtw_sitesurvey_cmd(struct adapter  *padapter, struct ndis_802_11_ssid *ssid,
 			if (ch[i].hw_value && !(ch[i].flags & RTW_IEEE80211_CHAN_DISABLED)) {
 				memcpy(&psurveyPara->ch[i], &ch[i], sizeof(struct rtw_ieee80211_channel));
 				psurveyPara->ch_num++;
-
-				DBG_871X(FUNC_ADPT_FMT" ch:%u\n", FUNC_ADPT_ARG(padapter),
-					psurveyPara->ch[i].hw_value);
 			}
 		}
 	}
@@ -1545,9 +1536,6 @@ static void rtw_lps_change_dtim_hdl(struct adapter *padapter, u8 dtim)
 	mutex_lock(&pwrpriv->lock);
 
 	if (pwrpriv->dtim != dtim) {
-		DBG_871X("change DTIM from %d to %d, bFwCurrentInPSMode =%d, ps_mode =%d\n", pwrpriv->dtim, dtim,
-			pwrpriv->bFwCurrentInPSMode, pwrpriv->pwr_mode);
-
 		pwrpriv->dtim = dtim;
 	}
 
drivers/staging/rtl8723bs/core/rtw_efuse.c +0 -5
index 3701336e7ff6..a8e6d1b258eb 100644
@@ -285,8 +285,6 @@ bool		bPseudoTest)
 	} else {
 		*data = 0xff;
 		bResult = false;
-		DBG_871X("%s: [ERROR] addr = 0x%x bResult =%d time out 1s !!!\n", __func__, addr, bResult);
-		DBG_871X("%s: [ERROR] EFUSE_CTRL = 0x%08x !!!\n", __func__, rtw_read32(padapter, EFUSE_CTRL));
 	}
 
 	return bResult;
@@ -334,9 +332,6 @@ u8 efuse_OneByteWrite(struct adapter *padapter, u16 addr, u8 data, bool bPseudoT
 		bResult = true;
 	} else {
 		bResult = false;
-		DBG_871X("%s: [ERROR] addr = 0x%x , efuseValue = 0x%x , bResult =%d time out 1s !!!\n",
-					__func__, addr, efuseValue, bResult);
-		DBG_871X("%s: [ERROR] EFUSE_CTRL = 0x%08x !!!\n", __func__, rtw_read32(padapter, EFUSE_CTRL));
 	}
 
 	/*  disable Efuse program enable */
drivers/staging/rtl8723bs/core/rtw_ieee80211.c +0 -33
index a0d664e254a8..7d13b2669d45 100644
@@ -821,9 +821,6 @@ static int rtw_ieee802_11_parse_vendor_specific(u8 *pos, uint elen,
 	 * sub-type. */
 	if (elen < 4) {
 		if (show_errors) {
-			DBG_871X("short vendor specific "
-				   "information element ignored (len =%lu)\n",
-				   (unsigned long) elen);
 		}
 		return -1;
 	}
@@ -842,10 +839,6 @@ static int rtw_ieee802_11_parse_vendor_specific(u8 *pos, uint elen,
 			break;
 		case WME_OUI_TYPE: /* this is a Wi-Fi WME info. element */
 			if (elen < 5) {
-				DBG_871X("short WME "
-					   "information element ignored "
-					   "(len =%lu)\n",
-					   (unsigned long) elen);
 				return -1;
 			}
 			switch (pos[4]) {
@@ -859,10 +852,6 @@ static int rtw_ieee802_11_parse_vendor_specific(u8 *pos, uint elen,
 				elems->wme_tspec_len = elen;
 				break;
 			default:
-				DBG_871X("unknown WME "
-					   "information element ignored "
-					   "(subtype =%d len =%lu)\n",
-					   pos[4], (unsigned long) elen);
 				return -1;
 			}
 			break;
@@ -872,10 +861,6 @@ static int rtw_ieee802_11_parse_vendor_specific(u8 *pos, uint elen,
 			elems->wps_ie_len = elen;
 			break;
 		default:
-			DBG_871X("Unknown Microsoft "
-				   "information element ignored "
-				   "(type =%d len =%lu)\n",
-				   pos[3], (unsigned long) elen);
 			return -1;
 		}
 		break;
@@ -887,19 +872,11 @@ static int rtw_ieee802_11_parse_vendor_specific(u8 *pos, uint elen,
 			elems->vendor_ht_cap_len = elen;
 			break;
 		default:
-			DBG_871X("Unknown Broadcom "
-				   "information element ignored "
-				   "(type =%d len =%lu)\n",
-				   pos[3], (unsigned long) elen);
 			return -1;
 		}
 		break;
 
 	default:
-		DBG_871X("unknown vendor specific information "
-			   "element ignored (vendor OUI %02x:%02x:%02x "
-			   "len =%lu)\n",
-			   pos[0], pos[1], pos[2], (unsigned long) elen);
 		return -1;
 	}
 
@@ -933,10 +910,6 @@ enum ParseRes rtw_ieee802_11_parse_elems(u8 *start, uint len,
 
 		if (elen > left) {
 			if (show_errors) {
-				DBG_871X("IEEE 802.11 element "
-					   "parse failed (id =%d elen =%d "
-					   "left =%lu)\n",
-					   id, elen, (unsigned long) left);
 			}
 			return ParseFailed;
 		}
@@ -1036,9 +1009,6 @@ enum ParseRes rtw_ieee802_11_parse_elems(u8 *start, uint len,
 			unknown++;
 			if (!show_errors)
 				break;
-			DBG_871X("IEEE 802.11 element parse "
-				   "ignored unknown element (id =%d elen =%d)\n",
-				   id, elen);
 			break;
 		}
 
@@ -1077,11 +1047,8 @@ void rtw_macaddr_cfg(struct device *dev, u8 *mac_addr)
 			ether_addr_copy(mac_addr, addr);
 		} else {
 			eth_random_addr(mac_addr);
-			DBG_871X("MAC Address from efuse error, assign random one !!!\n");
 		}
 	}
-
-	DBG_871X("rtw_macaddr_cfg MAC Address  = %pM\n", MAC_ARG(mac_addr));
 }
 
 static int rtw_get_cipher_info(struct wlan_network *pnetwork)
drivers/staging/rtl8723bs/core/rtw_io.c +0 -1
index c3f63f903547..03ba5bca8156 100644
@@ -173,7 +173,6 @@ int rtw_inc_and_chk_continual_io_error(struct dvobj_priv *dvobj)
 	int ret = false;
 	int value = atomic_inc_return(&dvobj->continual_io_error);
 	if (value > MAX_CONTINUAL_IO_ERR) {
-		DBG_871X("[dvobj:%p][ERROR] continual_io_error:%d > %d\n", dvobj, value, MAX_CONTINUAL_IO_ERR);
 		ret = true;
 	} else {
 		/* DBG_871X("[dvobj:%p] continual_io_error:%d\n", dvobj, value); */
drivers/staging/rtl8723bs/core/rtw_ioctl_set.c +1 -6
index f8c7dcb7ab7d..8711e4630423 100644
@@ -153,7 +153,6 @@ u8 rtw_set_802_11_bssid(struct adapter *padapter, u8 *bssid)
 	spin_lock_bh(&pmlmepriv->lock);
 
 
-	DBG_871X("Set BSSID under fw_state = 0x%08x\n", get_fwstate(pmlmepriv));
 	if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == true)
 		goto handle_tkip_countermeasure;
 	else if (check_fwstate(pmlmepriv, _FW_UNDER_LINKING) == true)
@@ -218,7 +217,6 @@ u8 rtw_set_802_11_ssid(struct adapter *padapter, struct ndis_802_11_ssid *ssid)
 
 	spin_lock_bh(&pmlmepriv->lock);
 
-	DBG_871X("Set SSID under fw_state = 0x%08x\n", get_fwstate(pmlmepriv));
 	if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == true)
 		goto handle_tkip_countermeasure;
 	else if (check_fwstate(pmlmepriv, _FW_UNDER_LINKING) == true)
@@ -303,8 +301,6 @@ u8 rtw_set_802_11_connect(struct adapter *padapter, u8 *bssid, struct ndis_802_1
 		bssid_valid = false;
 
 	if (!ssid_valid && !bssid_valid) {
-		DBG_871X(FUNC_ADPT_FMT" ssid:%p, ssid_valid:%d, bssid:%p, bssid_valid:%d\n",
-			FUNC_ADPT_ARG(padapter), ssid, ssid_valid, bssid, bssid_valid);
 		status = _FAIL;
 		goto exit;
 	}
@@ -430,7 +426,7 @@ u8 rtw_set_802_11_disassociate(struct adapter *padapter)
 		/* modify for CONFIG_IEEE80211W, none 11w can use it */
 		rtw_free_assoc_resources_cmd(padapter);
 		if (_FAIL == rtw_pwr_wakeup(padapter))
-			DBG_871X("%s(): rtw_pwr_wakeup fail !!!\n", __func__);
+			{}
 	}
 
 	spin_unlock_bh(&pmlmepriv->lock);
@@ -459,7 +455,6 @@ u8 rtw_set_802_11_bssid_list_scan(struct adapter *padapter, struct ndis_802_11_s
 
 	} else {
 		if (rtw_is_scan_deny(padapter)) {
-			DBG_871X(FUNC_ADPT_FMT": scan deny\n", FUNC_ADPT_ARG(padapter));
 			indicate_wx_scan_complete_event(padapter);
 			return _SUCCESS;
 		}
drivers/staging/rtl8723bs/core/rtw_mlme.c +5 -107

367 lines not on this page · raw message

drivers/staging/rtl8723bs/core/rtw_mlme_ext.c +10 -201

774 lines not on this page · raw message

drivers/staging/rtl8723bs/core/rtw_pwrctrl.c +6 -51

252 lines not on this page · raw message

drivers/staging/rtl8723bs/core/rtw_recv.c +3 -103

430 lines not on this page · raw message

drivers/staging/rtl8723bs/core/rtw_security.c +0 -11
index 6c74c0444abc..eca1e0f0680c 100644
@@ -1588,11 +1588,6 @@ static signed int aes_decipher(u8 *key, uint	hdrlen,
 	/* compare the mic */
 	for (i = 0; i < 8; i++) {
 		if (pframe[hdrlen+8+plen-8+i] != message[hdrlen+8+plen-8+i]) {
-			DBG_871X("%s:mic check error mic[%d]: pframe(%x) != message(%x)\n",
-					__func__,
-					i,
-					pframe[hdrlen + 8 + plen - 8 + i],
-					message[hdrlen + 8 + plen - 8 + i]);
 			res = _FAIL;
 		}
 	}
@@ -1658,8 +1653,6 @@ u32 rtw_aes_decrypt(struct adapter *padapter, u8 *precvframe)
 
 				prwskey = psecuritypriv->dot118021XGrpKey[prxattrib->key_index].skey;
 				if (psecuritypriv->dot118021XGrpKeyid != prxattrib->key_index) {
-					DBG_871X("not match packet_index =%d, install_index =%d\n"
-					, prxattrib->key_index, psecuritypriv->dot118021XGrpKeyid);
 					res = _FAIL;
 					goto exit;
 				}
@@ -1696,7 +1689,6 @@ u32 rtw_BIP_verify(struct adapter *padapter, u8 *precvframe)
 	BIP_AAD = rtw_zmalloc(ori_len);
 
 	if (BIP_AAD == NULL) {
-		DBG_871X("BIP AAD allocate fail\n");
 		return _FAIL;
 	}
 	/* PKT start */
@@ -1716,14 +1708,12 @@ u32 rtw_BIP_verify(struct adapter *padapter, u8 *precvframe)
 		temp_ipn = le64_to_cpu(le_tmp64);
 		/* BIP packet number should bigger than previous BIP packet */
 		if (temp_ipn <= pmlmeext->mgnt_80211w_IPN_rx) {
-			DBG_871X("replay BIP packet\n");
 			goto BIP_exit;
 		}
 		/* copy key index */
 		memcpy(&le_tmp, p+2, 2);
 		keyid = le16_to_cpu(le_tmp);
 		if (keyid != padapter->securitypriv.dot11wBIPKeyid) {
-			DBG_871X("BIP key index error!\n");
 			goto BIP_exit;
 		}
 		/* clear the MIC field of MME to zero */
@@ -1746,7 +1736,6 @@ u32 rtw_BIP_verify(struct adapter *padapter, u8 *precvframe)
 			pmlmeext->mgnt_80211w_IPN_rx = temp_ipn;
 			res = _SUCCESS;
 		} else {
-			DBG_871X("BIP MIC error!\n");
 		}
 
 	} else {
drivers/staging/rtl8723bs/core/rtw_sta_mgt.c +2 -4
index 7dcac4dd9de2..2afda4f7d58c 100644
@@ -107,7 +107,7 @@ inline int rtw_stainfo_offset(struct sta_priv *stapriv, struct sta_info *sta)
 	int offset = (((u8 *)sta) - stapriv->pstainfo_buf)/sizeof(struct sta_info);
 
 	if (!stainfo_offset_valid(offset))
-		DBG_871X("%s invalid offset(%d), out of range!!!", __func__, offset);
+		{}
 
 	return offset;
 }
@@ -115,7 +115,7 @@ inline int rtw_stainfo_offset(struct sta_priv *stapriv, struct sta_info *sta)
 inline struct sta_info *rtw_get_stainfo_by_offset(struct sta_priv *stapriv, int offset)
 {
 	if (!stainfo_offset_valid(offset))
-		DBG_871X("%s invalid offset(%d), out of range!!!", __func__, offset);
+		{}
 
 	return (struct sta_info *)(stapriv->pstainfo_buf + offset * sizeof(struct sta_info));
 }
@@ -251,8 +251,6 @@ struct	sta_info *rtw_alloc_stainfo(struct	sta_priv *pstapriv, u8 *hwaddr)
 
 			preorder_ctrl->indicate_seq = 0xffff;
 			#ifdef DBG_RX_SEQ
-			DBG_871X("DBG_RX_SEQ %s:%d IndicateSeq: %d\n", __func__, __LINE__,
-				preorder_ctrl->indicate_seq);
 			#endif
 			preorder_ctrl->wend_b = 0xffff;
 			/* preorder_ctrl->wsize_b = (NR_RECVBUFF-2); */
drivers/staging/rtl8723bs/core/rtw_wlan_util.c +3 -53

238 lines not on this page · raw message

drivers/staging/rtl8723bs/core/rtw_xmit.c +4 -40

255 lines not on this page · raw message

drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.c +0 -11
index c36513812d9d..c70b9cf2da32 100644
@@ -1839,11 +1839,6 @@ void PHY_IQCalibrate_8723B(
 			offset = pRFCalibrateInfo->TxIQC_8723B[path][i][0];
 			data = pRFCalibrateInfo->TxIQC_8723B[path][i][1];
 			if ((offset == 0) || (data == 0)) {
-				DBG_871X(
-					"%s =>path:%s Restore TX IQK result failed\n",
-					__func__,
-					(path == ODM_RF_PATH_A)?"A":"B"
-				);
 				bResult = FAIL;
 				break;
 			}
@@ -1855,11 +1850,6 @@ void PHY_IQCalibrate_8723B(
 			offset = pRFCalibrateInfo->RxIQC_8723B[path][i][0];
 			data = pRFCalibrateInfo->RxIQC_8723B[path][i][1];
 			if ((offset == 0) || (data == 0)) {
-				DBG_871X(
-					"%s =>path:%s  Restore RX IQK result failed\n",
-					__func__,
-					(path == ODM_RF_PATH_A)?"A":"B"
-				);
 				bResult = FAIL;
 				break;
 			}
@@ -1867,7 +1857,6 @@ void PHY_IQCalibrate_8723B(
 		}
 
 		if (pDM_Odm->RFCalibrateInfo.TxLOK[ODM_RF_PATH_A] == 0) {
-			DBG_871X("%s => Restore Path-A TxLOK result failed\n", __func__);
 			bResult = FAIL;
 		} else {
 			PHY_SetRFReg(pDM_Odm->Adapter, ODM_RF_PATH_A, RF_TXM_IDAC, bRFRegOffsetMask, pDM_Odm->RFCalibrateInfo.TxLOK[ODM_RF_PATH_A]);
drivers/staging/rtl8723bs/hal/HalPwrSeqCmd.c +0 -5
index b1f271c65c3e..1d2c828cafe8 100644
@@ -117,11 +117,6 @@ u8 HalPwrSeqCmdParsing(
 						udelay(10);
 
 					if (pollingCount++ > maxPollingCnt) {
-						DBG_871X(
-							"Fail to polling Offset[%#x]=%02x\n",
-							offset,
-							value
-						);
 						return false;
 					}
 				} while (!bPollingBit);
drivers/staging/rtl8723bs/hal/hal_com.c +2 -38
index e74d7e21372d..77f7ffb562a0 100644
@@ -84,8 +84,6 @@ void dump_chip_info(struct hal_version	ChipVersion)
 				"UNKNOWN_RFTYPE(%d)_", ChipVersion.RFType);
 
 	cnt += scnprintf(buf + cnt, sizeof(buf) - cnt, "RomVer(%d)\n", ChipVersion.ROMVer);
-
-	DBG_871X("%s", buf);
 }
 
 
@@ -155,11 +153,9 @@ bool HAL_IsLegalChannel(struct adapter *Adapter, u32 Channel)
 	if ((Channel <= 14) && (Channel >= 1)) {
 		if (IsSupported24G(Adapter->registrypriv.wireless_mode) == false) {
 			bLegalChannel = false;
-			DBG_871X("(Channel <= 14) && (Channel >= 1) but wireless_mode do not support 2.4G\n");
 		}
 	} else {
 		bLegalChannel = false;
-		DBG_871X("Channel is Invalid !!!\n");
 	}
 
 	return bLegalChannel;
@@ -688,7 +684,6 @@ u8 HwRateToMRate(u8 rate)
 		break;
 
 	default:
-		DBG_871X("HwRateToMRate(): Non supported Rate [%x]!!!\n", rate);
 		break;
 	}
 
@@ -927,15 +922,6 @@ s32 c2h_evt_read_88xx(struct adapter *adapter, u8 *buf)
 	print_hex_dump_debug(DRIVER_PREFIX ": c2h_evt_read(): ", DUMP_PREFIX_NONE,
[… more lines in the raw message]

Lines of this file are not shown. View the raw message.

drivers/staging/rtl8723bs/hal/hal_com_phycfg.c +10 -39

49 lines not on this page · raw message

drivers/staging/rtl8723bs/hal/hal_intf.c +4 -6
index 7fbac4c8f2f8..71afbb17448c 100644

Lines of this file are not shown. View the raw message.

drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c +3 -43

46 lines not on this page · raw message

drivers/staging/rtl8723bs/hal/rtl8723b_dm.c +0 -5
index 3792280f93d5..c2e9e4a0be22 100644

Lines of this file are not shown. View the raw message.

drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c +3 -65

68 lines not on this page · raw message

drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c +0 -9
index 62dd5b582e1c..5c1aa45c2984 100644

Lines of this file are not shown. View the raw message.

drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c +0 -1
index ce7a72701455..e30c310d8439 100644

Lines of this file are not shown. View the raw message.

drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c +0 -24
index 54f36ca2f810..2f4601aab9d5 100644

Lines of this file are not shown. View the raw message.

drivers/staging/rtl8723bs/hal/sdio_halinit.c +1 -24
index 5553246fa80b..05524cd72c17 100644

Lines of this file are not shown. View the raw message.

drivers/staging/rtl8723bs/hal/sdio_ops.c +2 -12
index b1f02bb9f0a9..cdfc8cf4aba4 100644

Lines of this file are not shown. View the raw message.

drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c +8 -135

143 lines not on this page · raw message

drivers/staging/rtl8723bs/os_dep/ioctl_linux.c +10 -284

294 lines not on this page · raw message

drivers/staging/rtl8723bs/os_dep/mlme_linux.c +0 -2
index b46c086233bb..8a97458f05e0 100644

Lines of this file are not shown. View the raw message.

drivers/staging/rtl8723bs/os_dep/os_intfs.c +0 -63

63 lines not on this page · raw message

drivers/staging/rtl8723bs/os_dep/osdep_service.c +0 -2
index 5e4200d6b00f..9c6b1666df13 100644

Lines of this file are not shown. View the raw message.

drivers/staging/rtl8723bs/os_dep/recv_linux.c +0 -1
index f286c9499106..af39a021dc71 100644

Lines of this file are not shown. View the raw message.

drivers/staging/rtl8723bs/os_dep/sdio_intf.c +0 -18
index deba03ad6c6e..99185fa73783 100644

Lines of this file are not shown. View the raw message.

drivers/staging/rtl8723bs/os_dep/sdio_ops_linux.c +9 -21
index 079da433d811..ee68b564e8db 100644

Lines of this file are not shown. View the raw message.

drivers/staging/rtl8723bs/os_dep/xmit_linux.c +0 -4
index 1dc0787a80da..f0bd29a66395 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.20.1

Part of the diff is not shown here. View the raw message.

#3 lore raw

PATCH 3/19 staging: rtl8723bs: remove DBG_871CX log unmatched by cocci

In reply to Fabio Aiuto

Remove a DBG_871X log untouched by cocci, maybe due to the presence of a trailing \, for it is inside a macro definition.

---
 drivers/staging/rtl8723bs/include/rtw_mlme_ext.h | 1 -
 1 file changed, 1 deletion(-)
drivers/staging/rtl8723bs/include/rtw_mlme_ext.h +0 -1
index e3dce1b2e553..b26da309f54d 100644
@@ -701,7 +701,6 @@ void sa_query_timer_hdl(struct timer_list *t);
 	} while (0)
 #define set_sa_query_timer(mlmeext, ms) \
 	do { \
-		DBG_871X("%s set_sa_query_timer(%p, %d)\n", __func__, (mlmeext), (ms)); \
 		_set_timer(&(mlmeext)->sa_query_timer, (ms)); \
 	} while (0)
 
Signature · 1 line
2.20.1
#4 lore raw

PATCH 4/19 staging: rtl8723bs: remove commented out DBG_871X logs

In reply to Fabio Aiuto

remove all commented out DBG_871X logs unmatched by semantic patch.

---
 drivers/staging/rtl8723bs/core/rtw_ap.c       |  2 -
 drivers/staging/rtl8723bs/core/rtw_cmd.c      | 24 ------
 drivers/staging/rtl8723bs/core/rtw_efuse.c    |  6 --
 .../staging/rtl8723bs/core/rtw_ieee80211.c    |  1 -
 drivers/staging/rtl8723bs/core/rtw_io.c       |  1 -
 .../staging/rtl8723bs/core/rtw_ioctl_set.c    |  3 -
 drivers/staging/rtl8723bs/core/rtw_mlme.c     |  6 --
 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 36 ---------
 drivers/staging/rtl8723bs/core/rtw_pwrctrl.c  | 23 ------
 drivers/staging/rtl8723bs/core/rtw_recv.c     | 22 ------
 .../staging/rtl8723bs/core/rtw_wlan_util.c    |  5 --
 drivers/staging/rtl8723bs/hal/hal_btcoex.c    |  2 -
 drivers/staging/rtl8723bs/hal/hal_com.c       |  1 -
 .../staging/rtl8723bs/hal/hal_com_phycfg.c    | 78 -------------------
 drivers/staging/rtl8723bs/hal/odm.c           |  3 -
 drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c  | 30 -------
 .../staging/rtl8723bs/hal/rtl8723b_hal_init.c | 13 ----
 .../staging/rtl8723bs/hal/rtl8723bs_recv.c    |  5 --
 .../staging/rtl8723bs/include/rtw_mlme_ext.h  |  2 -
 .../staging/rtl8723bs/include/rtw_pwrctrl.h   |  1 -
 .../staging/rtl8723bs/os_dep/ioctl_cfg80211.c |  9 +--
 .../staging/rtl8723bs/os_dep/ioctl_linux.c    | 34 --------
 drivers/staging/rtl8723bs/os_dep/os_intfs.c   |  2 -
 drivers/staging/rtl8723bs/os_dep/recv_linux.c |  1 -
 .../staging/rtl8723bs/os_dep/sdio_ops_linux.c | 13 ----
 drivers/staging/rtl8723bs/os_dep/xmit_linux.c |  3 -
 26 files changed, 2 insertions(+), 324 deletions(-)
drivers/staging/rtl8723bs/core/rtw_ap.c +0 -2
index dcf1dec635d7..ae477abced65 100644
@@ -258,8 +258,6 @@ void expire_timeout_chk(struct adapter *padapter)
 					psta->expire_to = pstapriv->expire_to;
 					psta->state |= WIFI_STA_ALIVE_CHK_STATE;
 
-					/* DBG_871X("alive chk, sta:%pM is at ps mode!\n", MAC_ARG(psta->hwaddr)); */
-
 					/* to update bcn with tim_bitmap for this station */
 					pstapriv->tim_bitmap |= BIT(psta->aid);
 					update_beacon(padapter, WLAN_EID_TIM, NULL, true);
drivers/staging/rtl8723bs/core/rtw_cmd.c +0 -24
index 6958891eb0e5..2000e7703571 100644
@@ -314,12 +314,6 @@ int rtw_cmd_filter(struct cmd_priv *pcmdpriv, struct cmd_obj *cmd_obj)
 	if ((pcmdpriv->padapter->hw_init_completed == false && bAllow == false)
 		|| atomic_read(&(pcmdpriv->cmdthd_running)) == false	/* com_thread not running */
 	) {
-		/* DBG_871X("%s:%s: drop cmdcode:%u, hw_init_completed:%u, cmdthd_running:%u\n", caller_func, __func__, */
-		/* 	cmd_obj->cmdcode, */
-		/* 	pcmdpriv->padapter->hw_init_completed, */
-		/* 	pcmdpriv->cmdthd_running */
-		/*  */
-
 		return _FAIL;
 	}
 	return _SUCCESS;
@@ -427,7 +421,6 @@ int rtw_cmd_thread(void *context)
 		}
 
 		if (list_empty(&(pcmdpriv->cmd_queue.queue))) {
-			/* DBG_871X("%s: cmd queue is empty!\n", __func__); */
 			continue;
 		}
 
@@ -521,8 +514,6 @@ int rtw_cmd_thread(void *context)
 			break;
 		}
 
-		/* DBG_871X("%s: leaving... drop cmdcode:%u size:%d\n", __func__, pcmd->cmdcode, pcmd->cmdsz); */
-
 		if (pcmd->cmdcode == GEN_CMD_CODE(_Set_Drv_Extra)) {
 			extra_parm = (struct drvextra_cmd_parm *)pcmd->parmbuf;
 			if (extra_parm->pbuf && extra_parm->size > 0)
@@ -1049,8 +1040,6 @@ u8 rtw_addbareq_cmd(struct adapter *padapter, u8 tid, u8 *addr)
 
 	init_h2fwcmd_w_parm_no_rsp(ph2c, paddbareq_parm, GEN_CMD_CODE(_AddBAReq));
 
-	/* DBG_871X("rtw_addbareq_cmd, tid =%d\n", tid); */
-
 	/* rtw_enqueue_cmd(pcmdpriv, ph2c); */
 	res = rtw_enqueue_cmd(pcmdpriv, ph2c);
 
@@ -1288,7 +1277,6 @@ u8 traffic_status_watchdog(struct adapter *padapter, u8 from_timer)
 		/*  check traffic for  powersaving. */
 		if (((pmlmepriv->LinkDetectInfo.NumRxUnicastOkInPeriod + pmlmepriv->LinkDetectInfo.NumTxOkInPeriod) > 8) ||
 			(pmlmepriv->LinkDetectInfo.NumRxUnicastOkInPeriod > 2)) {
-			/* DBG_871X("(-)Tx = %d, Rx = %d\n", pmlmepriv->LinkDetectInfo.NumTxOkInPeriod, pmlmepriv->LinkDetectInfo.NumRxUnicastOkInPeriod); */
 			bEnterPS = false;
 
 			if (bBusyTraffic == true) {
@@ -1297,14 +1285,10 @@ u8 traffic_status_watchdog(struct adapter *padapter, u8 from_timer)
 
 				pmlmepriv->LinkDetectInfo.TrafficTransitionCount++;
 
-				/* DBG_871X("Set TrafficTransitionCount to %d\n", pmlmepriv->LinkDetectInfo.TrafficTransitionCount); */
-
 				if (pmlmepriv->LinkDetectInfo.TrafficTransitionCount > 30/*TrafficTransitionLevel*/)
 					pmlmepriv->LinkDetectInfo.TrafficTransitionCount = 30;
 			}
 		} else {
-			/* DBG_871X("(+)Tx = %d, Rx = %d\n", pmlmepriv->LinkDetectInfo.NumTxOkInPeriod, pmlmepriv->LinkDetectInfo.NumRxUnicastOkInPeriod); */
-
 			if (pmlmepriv->LinkDetectInfo.TrafficTransitionCount >= 2)
 				pmlmepriv->LinkDetectInfo.TrafficTransitionCount -= 2;
 			else
@@ -1396,7 +1380,6 @@ void lps_ctrl_wk_hdl(struct adapter *padapter, u8 lps_ctrl_type)
 
 	switch (lps_ctrl_type) {
 	case LPS_CTRL_SCAN:
-		/* DBG_871X("LPS_CTRL_SCAN\n"); */
 		hal_btcoex_ScanNotify(padapter, true);
 
 		if (check_fwstate(pmlmepriv, _FW_LINKED) == true) {
@@ -1405,11 +1388,9 @@ void lps_ctrl_wk_hdl(struct adapter *padapter, u8 lps_ctrl_type)
 		}
 		break;
 	case LPS_CTRL_JOINBSS:
-		/* DBG_871X("LPS_CTRL_JOINBSS\n"); */
 		LPS_Leave(padapter, "LPS_CTRL_JOINBSS");
 		break;
 	case LPS_CTRL_CONNECT:
-		/* DBG_871X("LPS_CTRL_CONNECT\n"); */
 		mstatus = 1;/* connect */
 		/*  Reset LPS Setting */
 		pwrpriv->LpsIdleCount = 0;
@@ -1417,20 +1398,17 @@ void lps_ctrl_wk_hdl(struct adapter *padapter, u8 lps_ctrl_type)
 		rtw_btcoex_MediaStatusNotify(padapter, mstatus);
 		break;
 	case LPS_CTRL_DISCONNECT:
-		/* DBG_871X("LPS_CTRL_DISCONNECT\n"); */
 		mstatus = 0;/* disconnect */
 		rtw_btcoex_MediaStatusNotify(padapter, mstatus);
 		LPS_Leave(padapter, "LPS_CTRL_DISCONNECT");
 		rtw_hal_set_hwreg(padapter, HW_VAR_H2C_FW_JOINBSSRPT, (u8 *)(&mstatus));
 		break;
 	case LPS_CTRL_SPECIAL_PACKET:
-		/* DBG_871X("LPS_CTRL_SPECIAL_PACKET\n"); */
 		pwrpriv->DelayLPSLastTimeStamp = jiffies;
 		hal_btcoex_SpecialPacketNotify(padapter, PACKET_DHCP);
 		LPS_Leave(padapter, "LPS_CTRL_SPECIAL_PACKET");
 		break;
 	case LPS_CTRL_LEAVE:
-		/* DBG_871X("LPS_CTRL_LEAVE\n"); */
 		LPS_Leave(padapter, "LPS_CTRL_LEAVE");
 		break;
 	case LPS_CTRL_TRAFFIC_BUSY:
@@ -1542,8 +1520,6 @@ static void rtw_lps_change_dtim_hdl(struct adapter *padapter, u8 dtim)
 	if ((pwrpriv->bFwCurrentInPSMode == true) && (pwrpriv->pwr_mode > PS_MODE_ACTIVE)) {
 		u8 ps_mode = pwrpriv->pwr_mode;
 
-		/* DBG_871X("change DTIM from %d to %d, ps_mode =%d\n", pwrpriv->dtim, dtim, ps_mode); */
-
 		rtw_hal_set_hwreg(padapter, HW_VAR_H2C_FW_PWRMODE, (u8 *)(&ps_mode));
 	}
 
drivers/staging/rtl8723bs/core/rtw_efuse.c +0 -6
index a8e6d1b258eb..a28a06d5a576 100644
@@ -252,9 +252,6 @@ bool		bPseudoTest)
 	u8 bResult;
 	u8 readbyte;
 
-	/* DBG_871X("===> EFUSE_OneByteRead(), addr = %x\n", addr); */
-	/* DBG_871X("===> EFUSE_OneByteRead() start, 0x34 = 0x%X\n", rtw_read32(padapter, EFUSE_TEST)); */
-
 	if (bPseudoTest) {
 		return Efuse_Read1ByteFromFakeContent(padapter, addr, data);
 	}
@@ -297,9 +294,6 @@ u8 efuse_OneByteWrite(struct adapter *padapter, u16 addr, u8 data, bool bPseudoT
 	u8 bResult = false;
 	u32 efuseValue = 0;
 
-	/* DBG_871X("===> EFUSE_OneByteWrite(), addr = %x data =%x\n", addr, data); */
-	/* DBG_871X("===> EFUSE_OneByteWrite() start, 0x34 = 0x%X\n", rtw_read32(padapter, EFUSE_TEST)); */
-
 	if (bPseudoTest) {
 		return Efuse_Write1ByteToFakeContent(padapter, addr, data);
 	}
drivers/staging/rtl8723bs/core/rtw_ieee80211.c +0 -1
index 7d13b2669d45..00be36165f87 100644
@@ -758,7 +758,6 @@ u8 *rtw_get_wps_attr(u8 *wps_ie, uint wps_ielen, u16 target_attr_id, u8 *buf_att
 		u16 attr_data_len = get_unaligned_be16(attr_ptr + 2);
 		u16 attr_len = attr_data_len + 4;
 
-		/* DBG_871X("%s attr_ptr:%p, id:%u, length:%u\n", __func__, attr_ptr, attr_id, attr_data_len); */
 		if (attr_id == target_attr_id) {
 			target_attr_ptr = attr_ptr;
 
drivers/staging/rtl8723bs/core/rtw_io.c +0 -1
index 03ba5bca8156..ed01354f58bd 100644
@@ -175,7 +175,6 @@ int rtw_inc_and_chk_continual_io_error(struct dvobj_priv *dvobj)
 	if (value > MAX_CONTINUAL_IO_ERR) {
 		ret = true;
 	} else {
-		/* DBG_871X("[dvobj:%p] continual_io_error:%d\n", dvobj, value); */
 	}
 	return ret;
 }
drivers/staging/rtl8723bs/core/rtw_ioctl_set.c +0 -3
index 8711e4630423..fbc8e5f60b0c 100644
@@ -117,7 +117,6 @@ u8 rtw_do_join(struct adapter *padapter)
 				if (pmlmepriv->LinkDetectInfo.bBusyTraffic == false
 					|| rtw_to_roam(padapter) > 0
 				) {
-					/* DBG_871X("rtw_do_join() when   no desired bss in scanning queue\n"); */
 					ret = rtw_sitesurvey_cmd(padapter, &pmlmepriv->assoc_ssid, 1, NULL, 0);
 					if (ret != _SUCCESS)
 						pmlmepriv->to_join = false;
@@ -358,8 +357,6 @@ u8 rtw_set_802_11_infrastructure_mode(struct adapter *padapter,
 	enum ndis_802_11_network_infrastructure *pold_state = &(cur_network->network.InfrastructureMode);
 
 	if (*pold_state != networktype) {
-		/* DBG_871X("change mode, old_mode =%d, new_mode =%d, fw_state = 0x%x\n", *pold_state, networktype, get_fwstate(pmlmepriv)); */
-
 		if (*pold_state == Ndis802_11APMode) {
 			/* change to other mode from Ndis802_11APMode */
 			cur_network->join_res = -1;
drivers/staging/rtl8723bs/core/rtw_mlme.c +0 -6
index dc9b0b36c174..fa2f78948fee 100644
@@ -200,8 +200,6 @@ void _rtw_free_network(struct	mlme_priv *pmlmepriv, struct wlan_network *pnetwor
 
 	pmlmepriv->num_of_scanned--;
 
-	/* DBG_871X("_rtw_free_network:SSID =%s\n", pnetwork->network.Ssid.Ssid); */
-
 	spin_unlock_bh(&free_queue->lock);
 }
 
@@ -866,7 +864,6 @@ void rtw_surveydone_event_callback(struct adapter	*adapter, u8 *pbuf)
 		}
 	}
 
-	/* DBG_871X("scan complete in %dms\n", jiffies_to_msecs(jiffies - pmlmepriv->scan_start_time)); */
 unlock:
 	spin_unlock_bh(&pmlmepriv->lock);
 
@@ -1004,8 +1001,6 @@ void rtw_indicate_disconnect(struct adapter *padapter)
 
 	_clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING|WIFI_UNDER_WPS);
 
-	/* DBG_871X("clear wps when %s\n", __func__); */
-
 	if (rtw_to_roam(padapter) > 0)
 		_clr_fwstate_(pmlmepriv, _FW_LINKED);
 
@@ -2583,7 +2578,6 @@ void rtw_update_ht_cap(struct adapter *padapter, u8 *pie, uint ie_len, u8 channe
 		max_ampdu_sz = (pht_capie->ampdu_params_info & IEEE80211_HT_CAP_AMPDU_FACTOR);
 		max_ampdu_sz = 1 << (max_ampdu_sz+3); /*  max_ampdu_sz (kbytes); */
 
-		/* DBG_871X("rtw_update_ht_cap(): max_ampdu_sz =%d\n", max_ampdu_sz); */
 		phtpriv->rx_ampdu_maxlen = max_ampdu_sz;
 
 	}
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c +0 -36
index 7a407b9bfba0..7ad0d680fffa 100644
@@ -605,9 +605,6 @@ unsigned int OnProbeReq(struct adapter *padapter, union recv_frame *precv_frame)
 		return _SUCCESS;
 	}
 
-
-	/* DBG_871X("+OnProbeReq\n"); */
-
 	p = rtw_get_ie(pframe + WLAN_HDR_A3_LEN + _PROBEREQ_IE_OFFSET_, WLAN_EID_SSID, (int *)&ielen,
 			len - WLAN_HDR_A3_LEN - _PROBEREQ_IE_OFFSET_);
 
@@ -625,7 +622,6 @@ unsigned int OnProbeReq(struct adapter *padapter, union recv_frame *precv_frame)
 _issue_probersp:
 		if ((check_fwstate(pmlmepriv, _FW_LINKED)  &&
 			pmlmepriv->cur_network.join_res) || check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE)) {
-			/* DBG_871X("+issue_probersp during ap mode\n"); */
 			issue_probersp(padapter, get_sa(pframe), is_valid_p2p_probereq);
 		}
 
@@ -720,7 +716,6 @@ unsigned int OnBeacon(struct adapter *padapter, union recv_frame *precv_frame)
 				/* update WMM, ERP in the beacon */
 				/* todo: the timer is used instead of the number of the beacon received */
 				if ((sta_rx_pkts(psta) & 0xf) == 0)
-					/* DBG_871X("update_bcn_info\n"); */
 					update_beacon_info(padapter, pframe, len, psta);
 
 				adaptive_early_32k(pmlmeext, pframe, len);
@@ -731,7 +726,6 @@ unsigned int OnBeacon(struct adapter *padapter, union recv_frame *precv_frame)
 				/* update WMM, ERP in the beacon */
 				/* todo: the timer is used instead of the number of the beacon received */
 				if ((sta_rx_pkts(psta) & 0xf) == 0) {
-					/* DBG_871X("update_bcn_info\n"); */
 					update_beacon_info(padapter, pframe, len, psta);
 				}
 			} else {
@@ -986,7 +980,6 @@ unsigned int OnAuthClient(struct adapter *padapter, union recv_frame *precv_fram
 				pkt_len - WLAN_HDR_A3_LEN - _AUTH_IE_OFFSET_);
 
 			if (p == NULL) {
-				/* DBG_871X("marc: no challenge text?\n"); */
 				goto authclnt_fail;
 			}
 
@@ -1008,7 +1001,6 @@ unsigned int OnAuthClient(struct adapter *padapter, union recv_frame *precv_fram
 		}
 	} else {
 		/*  this is also illegal */
-		/* DBG_871X("marc: clnt auth failed due to illegal seq =%x\n", seq); */
 		goto authclnt_fail;
 	}
 
@@ -1794,7 +1786,6 @@ unsigned int OnAction_back(struct adapter *padapter, union recv_frame *precv_fra
 				psta->state ^= WIFI_STA_ALIVE_CHK_STATE;
 			}
 
-			/* DBG_871X("marc: ADDBA RSP: %x\n", pmlmeinfo->agg_enable_bitmap); */
 			break;
 
 		case WLAN_ACTION_DELBA: /* DELBA */
@@ -2020,8 +2011,6 @@ unsigned int OnAction(struct adapter *padapter, union recv_frame *precv_frame)
 
 unsigned int DoReserved(struct adapter *padapter, union recv_frame *precv_frame)
 {
-
-	/* DBG_871X("rcvd mgt frame(%x, %x)\n", (GetFrameSubType(pframe) >> 4), *(unsigned int *)GetAddr1Ptr(pframe)); */
 	return _SUCCESS;
 }
 
@@ -2072,7 +2061,6 @@ void update_mgnt_tx_rate(struct adapter *padapter, u8 rate)
 	struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
 
 	pmlmeext->tx_rate = rate;
-	/* DBG_871X("%s(): rate = %x\n", __func__, rate); */
 }
 
 void update_mgntframe_attrib(struct adapter *padapter, struct pkt_attrib *pattrib)
@@ -2203,8 +2191,6 @@ static int update_hidden_ssid(u8 *ies, u32 ies_len, u8 hidden_ssid_mode)
 
 	ssid_ie = rtw_get_ie(ies,  WLAN_EID_SSID, &ssid_len_ori, ies_len);
 
-	/* DBG_871X("%s hidden_ssid_mode:%u, ssid_ie:%p, ssid_len_ori:%d\n", __func__, hidden_ssid_mode, ssid_ie, ssid_len_ori); */
-
 	if (ssid_ie && ssid_len_ori > 0) {
 		switch (hidden_ssid_mode) {
 		case 1:
@@ -2279,7 +2265,6 @@ void issue_beacon(struct adapter *padapter, int timeout_ms)
 	pattrib->pktlen = sizeof(struct ieee80211_hdr_3addr);
 
 	if ((pmlmeinfo->state&0x03) == WIFI_FW_AP_STATE) {
-		/* DBG_871X("ie len =%d\n", cur_network->IELength); */
 		{
 			int len_diff;
 
@@ -2375,7 +2360,6 @@ void issue_beacon(struct adapter *padapter, int timeout_ms)
 
 	pattrib->last_txcmdsz = pattrib->pktlen;
 
-	/* DBG_871X("issue bcn_sz =%d\n", pattrib->last_txcmdsz); */
 	if (timeout_ms > 0)
 		dump_mgntframe_and_wait(padapter, pmgntframe, timeout_ms);
 	else
@@ -2793,13 +2777,11 @@ void issue_auth(struct adapter *padapter, struct sta_info *psta, unsigned short
 			use_shared_key = 1;
 		}
 		le_tmp = cpu_to_le16(val16);
-		/* DBG_871X("%s auth_algo = %s auth_seq =%d\n", __func__, (pmlmeinfo->auth_algo == 0)?"OPEN":"SHARED", pmlmeinfo->auth_seq); */
 
 		/* setting IV for auth seq #3 */
 		if ((pmlmeinfo->auth_seq == 3) && (pmlmeinfo->state & WIFI_FW_AUTH_STATE) && (use_shared_key == 1)) {
 			__le32 le_tmp32;
 
-			/* DBG_871X("==> iv(%d), key_index(%d)\n", pmlmeinfo->iv, pmlmeinfo->key_index); */
 			val32 = ((pmlmeinfo->iv++) | (pmlmeinfo->key_index << 30));
 			le_tmp32 = cpu_to_le32(val32);
 			pframe = rtw_set_fixed_ie(pframe, 4, (unsigned char *)&le_tmp32, &(pattrib->pktlen));
@@ -3037,14 +3019,12 @@ void issue_assocreq(struct adapter *padapter)
 
 	/*  Check if the AP's supported rates are also supported by STA. */
 	get_rate_set(padapter, sta_bssrate, &sta_bssrate_len);
-	/* DBG_871X("sta_bssrate_len =%d\n", sta_bssrate_len); */
 
 	if (pmlmeext->cur_channel == 14) /*  for JAPAN, channel 14 can only uses B Mode(CCK) */
 		sta_bssrate_len = 4;
 
 
 	/* for (i = 0; i < sta_bssrate_len; i++) { */
-	/* 	DBG_871X("sta_bssrate[%d]=%02X\n", i, sta_bssrate[i]); */
 	/*  */
 
 	for (i = 0; i < NDIS_802_11_LENGTH_RATES_EX; i++) {
@@ -3063,10 +3043,8 @@ void issue_assocreq(struct adapter *padapter)
 			 /*  Avoid the proprietary data rate (22Mbps) of Handlink WSG-4000 AP */
 			if ((pmlmeinfo->network.SupportedRates[i]|IEEE80211_BASIC_RATE_MASK)
 					== (sta_bssrate[j]|IEEE80211_BASIC_RATE_MASK)) {
-				/* DBG_871X("match i = %d, j =%d\n", i, j); */
 				break;
 			} else {
-				/* DBG_871X("not match: %02X != %02X\n", (pmlmeinfo->network.SupportedRates[i]|IEEE80211_BASIC_RATE_MASK), (sta_bssrate[j]|IEEE80211_BASIC_RATE_MASK)); */
 			}
 		}
 
@@ -3169,8 +3147,6 @@ static int _issue_nulldata(struct adapter *padapter, unsigned char *da,
 	struct mlme_ext_priv *pmlmeext;
 	struct mlme_ext_info *pmlmeinfo;
 
-	/* DBG_871X("%s:%d\n", __func__, power_mode); */
-
 	if (!padapter)
 		goto exit;
 
@@ -3442,8 +3418,6 @@ static int _issue_deauth(struct adapter *padapter, unsigned char *da,
 	int ret = _FAIL;
 	__le16 le_tmp;
 
-	/* DBG_871X("%s to %pM\n", __func__, MAC_ARG(da)); */
-
 	pmgntframe = alloc_mgtxmitframe(pxmitpriv);
 	if (pmgntframe == NULL) {
 		goto exit;
@@ -3911,8 +3885,6 @@ unsigned int send_delba(struct adapter *padapter, u8 initiator, u8 *addr)
 	if (psta == NULL)
 		return _SUCCESS;
 
-	/* DBG_871X("%s:%s\n", __func__, (initiator == 0)?"RX_DIR":"TX_DIR"); */
-
 	if (initiator == 0) {/*  recipient */
 		for (tid = 0; tid < MAXTID; tid++) {
 			if (psta->recvreorder_ctrl[tid].enable) {
@@ -3924,7 +3896,6 @@ unsigned int send_delba(struct adapter *padapter, u8 initiator, u8 *addr)
 			}
 		}
 	} else if (initiator == 1) {/*  originator */
-		/* DBG_871X("tx agg_enable_bitmap(0x%08x)\n", psta->htpriv.agg_enable_bitmap); */
 		for (tid = 0; tid < MAXTID; tid++) {
 			if (psta->htpriv.agg_enable_bitmap & BIT(tid)) {
 				issue_action_BA(padapter, addr, WLAN_ACTION_DELBA, (((tid << 1) | initiator)&0x1F));
@@ -3972,7 +3943,6 @@ unsigned int send_beacon(struct adapter *padapter)
 		if (passing_time > 100 || issue > 3)
 			{}
 		/* else */
-		/* 	DBG_871X("%s success, issue:%d, poll:%d, %u ms\n", __func__, issue, poll, passing_time); */
 
 		return _SUCCESS;
 	}
@@ -4121,7 +4091,6 @@ u8 collect_bss_info(struct adapter *padapter, union recv_frame *precv_frame, str
 	len = packet_len - sizeof(struct ieee80211_hdr_3addr);
 
 	if (len > MAX_IE_SZ) {
-		/* DBG_871X("IE too long for survey event\n"); */
 		return _FAIL;
 	}
 
@@ -4375,7 +4344,6 @@ void start_clnt_join(struct adapter *padapter)
 
 		report_join_res(padapter, 1);
 	} else {
-		/* DBG_871X("marc: invalid cap:%x\n", caps); */
 		return;
 	}
 
@@ -5134,8 +5102,6 @@ void mlmeext_joinbss_event_callback(struct adapter *padapter, int join_res)
 
 		pmlmeinfo->FW_sta_info[psta->mac_id].psta = psta;
 
-		/* DBG_871X("set_sta_rate\n"); */
-
 		psta->wireless_mode = pmlmeext->cur_wireless_mode;
 
 		/* set per sta rate after updating HT cap. */
@@ -5407,8 +5373,6 @@ void survey_timer_hdl(struct timer_list *t)
 	struct cmd_priv 				*pcmdpriv = &padapter->cmdpriv;
 	struct mlme_ext_priv 	*pmlmeext = &padapter->mlmeextpriv;
 
-	/* DBG_871X("marc: survey timer\n"); */
-
 	/* issue rtw_sitesurvey_cmd */
 	if (pmlmeext->sitesurvey_res.state > SCAN_START) {
 		if (pmlmeext->sitesurvey_res.state ==  SCAN_PROCESS) {
drivers/staging/rtl8723bs/core/rtw_pwrctrl.c +0 -23
index 4c5df7272ab8..22a3174533bb 100644
@@ -98,12 +98,10 @@ static bool rtw_pwr_unassociated_idle(struct adapter *adapter)
 	bool ret = false;
 
 	if (adapter_to_pwrctl(adapter)->bpower_saving) {
-		/* DBG_871X("%s: already in LPS or IPS mode\n", __func__); */
 		goto exit;
 	}
 
 	if (time_before(jiffies, adapter_to_pwrctl(adapter)->ips_deny_time)) {
-		/* DBG_871X("%s ips_deny_time\n", __func__); */
 		goto exit;
 	}
 
@@ -230,7 +228,6 @@ void traffic_check_for_leave_lps(struct adapter *padapter, u8 tx, u32 tx_packets
 	}
 
 	if (bLeaveLPS)
-		/* DBG_871X("leave lps via %s, Tx = %d, Rx = %d\n", tx?"Tx":"Rx", pmlmepriv->LinkDetectInfo.NumTxOkInPeriod, pmlmepriv->LinkDetectInfo.NumRxUnicastOkInPeriod); */
 		/* rtw_lps_ctrl_wk_cmd(padapter, LPS_CTRL_LEAVE, 1); */
 		rtw_lps_ctrl_wk_cmd(padapter, LPS_CTRL_LEAVE, tx?0:1);
 }
@@ -483,8 +480,6 @@ void LPS_Enter(struct adapter *padapter, const char *msg)
 		} else
 			pwrpriv->LpsIdleCount++;
 	}
-
-/* 	DBG_871X("-LeisurePSEnter\n"); */
 }
 
 /*  */
@@ -499,8 +494,6 @@ void LPS_Leave(struct adapter *padapter, const char *msg)
 	struct pwrctrl_priv *pwrpriv = dvobj_to_pwrctl(dvobj);
 	char buf[32] = {0};
 
-/* 	DBG_871X("+LeisurePSLeave\n"); */
-
 	if (hal_btcoex_IsBtControlLps(padapter))
 		return;
 
@@ -515,8 +508,6 @@ void LPS_Leave(struct adapter *padapter, const char *msg)
 	}
 
 	pwrpriv->bpower_saving = false;
-/* 	DBG_871X("-LeisurePSLeave\n"); */
-
 }
 
 void LeaveAllPowerSaveModeDirect(struct adapter *Adapter)
@@ -673,7 +664,6 @@ static void rpwmtimeout_workitem_callback(struct work_struct *work)
 	pwrpriv = container_of(work, struct pwrctrl_priv, rpwmtimeoutwi);
 	dvobj = pwrctl_to_dvobj(pwrpriv);
 	padapter = dvobj->if1;
-/* 	DBG_871X("+%s: rpwm = 0x%02X cpwm = 0x%02X\n", __func__, pwrpriv->rpwm, pwrpriv->cpwm); */
 
 	mutex_lock(&pwrpriv->lock);
 	if ((pwrpriv->rpwm == pwrpriv->cpwm) || (pwrpriv->cpwm >= PS_STATE_S2)) {
@@ -1181,9 +1171,6 @@ void rtw_ps_deny(struct adapter *padapter, enum ps_deny_reason reason)
 {
 	struct pwrctrl_priv *pwrpriv;
 
-	/* DBG_871X("+" FUNC_ADPT_FMT ": Request PS deny for %d (0x%08X)\n", */
-	/* FUNC_ADPT_ARG(padapter), reason, BIT(reason)); */
-
 	pwrpriv = adapter_to_pwrctl(padapter);
 
 	mutex_lock(&pwrpriv->lock);
@@ -1191,9 +1178,6 @@ void rtw_ps_deny(struct adapter *padapter, enum ps_deny_reason reason)
 	}
 	pwrpriv->ps_deny |= BIT(reason);
 	mutex_unlock(&pwrpriv->lock);
-
-	/* DBG_871X("-" FUNC_ADPT_FMT ": Now PS deny for 0x%08X\n", */
-	/* FUNC_ADPT_ARG(padapter), pwrpriv->ps_deny); */
 }
 
 /*
@@ -1204,10 +1188,6 @@ void rtw_ps_deny_cancel(struct adapter *padapter, enum ps_deny_reason reason)
 {
 	struct pwrctrl_priv *pwrpriv;
 
-
-	/* DBG_871X("+" FUNC_ADPT_FMT ": Cancel PS deny for %d(0x%08X)\n", */
-	/* FUNC_ADPT_ARG(padapter), reason, BIT(reason)); */
-
 	pwrpriv = adapter_to_pwrctl(padapter);
 
 	mutex_lock(&pwrpriv->lock);
@@ -1215,9 +1195,6 @@ void rtw_ps_deny_cancel(struct adapter *padapter, enum ps_deny_reason reason)
 	}
 	pwrpriv->ps_deny &= ~BIT(reason);
 	mutex_unlock(&pwrpriv->lock);
-
-	/* DBG_871X("-" FUNC_ADPT_FMT ": Now PS deny for 0x%08X\n", */
-	/* FUNC_ADPT_ARG(padapter), pwrpriv->ps_deny); */
 }
 
 /*
drivers/staging/rtl8723bs/core/rtw_recv.c +0 -22
index 35c87a0be40d..fac25dd0f174 100644
@@ -333,7 +333,6 @@ static signed int recvframe_chkmic(struct adapter *adapter,  union recv_frame *p
 				/* rxdata_key_idx =(((iv[3])>>6)&0x3) ; */
 				mickey = &psecuritypriv->dot118021XGrprxmickey[prxattrib->key_index].skey[0];
 
-				/* DBG_871X("\n recvframe_chkmic: bcmc key psecuritypriv->dot118021XGrpKeyid(%d), pmlmeinfo->key_index(%d) , recv key_id(%d)\n", */
 				/* psecuritypriv->dot118021XGrpKeyid, pmlmeinfo->key_index, rxdata_key_idx); */
 
 				if (psecuritypriv->binstallGrpkey == false) {
@@ -568,7 +567,6 @@ static void process_pwrbit_data(struct adapter *padapter, union recv_frame *prec
 
 				stop_sta_xmit(padapter, psta);
 
-				/* DBG_871X("to sleep, sta_dz_bitmap =%x\n", pstapriv->sta_dz_bitmap); */
 			}
 		} else {
 			if (psta->state & WIFI_SLEEP_STATE) {
@@ -576,8 +574,6 @@ static void process_pwrbit_data(struct adapter *padapter, union recv_frame *prec
 				/* pstapriv->sta_dz_bitmap &= ~BIT(psta->aid); */
 
 				wakeup_sta_to_xmit(padapter, psta);
-
-				/* DBG_871X("to wakeup, sta_dz_bitmap =%x\n", pstapriv->sta_dz_bitmap); */
 			}
 		}
 
@@ -679,8 +675,6 @@ static signed int sta2sta_data_frame(struct adapter *adapter, union recv_frame *
 	u8 *sta_addr = NULL;
 	signed int bmcast = IS_MCAST(pattrib->dst);
 
-	/* DBG_871X("[%s] %d, seqnum:%d\n", __func__, __LINE__, pattrib->seq_num); */
-
 	if ((check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == true) ||
 		(check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == true)) {
 
@@ -857,8 +851,6 @@ static signed int ap2sta_data_frame(struct adapter *adapter, union recv_frame *p
 				/* for AP multicast issue , modify by yiwei */
 				static unsigned long send_issue_deauth_time;
 
-				/* DBG_871X("After send deauth , %u ms has elapsed.\n", jiffies_to_msecs(jiffies - send_issue_deauth_time)); */
-
 				if (jiffies_to_msecs(jiffies - send_issue_deauth_time) > 10000 || send_issue_deauth_time == 0) {
 					send_issue_deauth_time = jiffies;
 
@@ -935,8 +927,6 @@ static signed int validate_recv_ctrl_frame(struct adapter *padapter, union recv_
 	struct sta_info *psta = NULL;
 	/* uint len = precv_frame->u.hdr.len; */
 
-	/* DBG_871X("+validate_recv_ctrl_frame\n"); */
-
 	if (GetFrameType(pframe) != WIFI_CTRL_TYPE)
 		return _FAIL;
 
@@ -1015,15 +1005,11 @@ static signed int validate_recv_ctrl_frame(struct adapter *padapter, union recv_
 
 				pxmitframe->attrib.triggered = 1;
 
-				/* DBG_871X("handling ps-poll, q_len =%d, tim =%x\n", psta->sleepq_len, pstapriv->tim_bitmap); */
-
 				rtw_hal_xmitframe_enqueue(padapter, pxmitframe);
 
 				if (psta->sleepq_len == 0) {
 					pstapriv->tim_bitmap &= ~BIT(psta->aid);
 
-					/* DBG_871X("after handling ps-poll, tim =%x\n", pstapriv->tim_bitmap); */
-
 					/* update BCN for TIM IE */
 					/* update_BCNTIM(padapter); */
 					update_beacon(padapter, WLAN_EID_TIM, NULL, true);
@@ -1036,7 +1022,6 @@ static signed int validate_recv_ctrl_frame(struct adapter *padapter, union recv_
 				/* spin_unlock_bh(&psta->sleep_q.lock); */
 				spin_unlock_bh(&pxmitpriv->lock);
 
-				/* DBG_871X("no buffered packets to xmit\n"); */
 				if (pstapriv->tim_bitmap&BIT(psta->aid)) {
 					if (psta->sleepq_len == 0) {
 						/* issue nulldata with More data bit = 0 to indicate we have no buffered packets */
@@ -1441,10 +1426,8 @@ static signed int validate_80211w_mgmt(struct adapter *adapter, union recv_frame
 			/* verify BIP MME IE of broadcast/multicast de-auth/disassoc packet */
 			BIP_ret = rtw_BIP_verify(adapter, (u8 *)precv_frame);
 			if (BIP_ret == _FAIL) {
-				/* DBG_871X("802.11w BIP verify fail\n"); */
 				goto validate_80211w_fail;
 			} else if (BIP_ret == RTW_RX_HANDLED) {
-				/* DBG_871X("802.11w recv none protected packet\n"); */
 				/* issue sa query request */
 				issue_action_SA_Query(adapter, NULL, 0, 0);
 				goto validate_80211w_fail;
@@ -1889,8 +1872,6 @@ static int recv_indicatepkts_in_order(struct adapter *padapter, struct recv_reor
 			/* indicate this recv_frame */
 			/* DbgPrint("recv_indicatepkts_in_order, indicate_seq =%d, seq_num =%d\n", precvpriv->indicate_seq, pattrib->seq_num); */
 			if (!pattrib->amsdu) {
-				/* DBG_871X("recv_indicatepkts_in_order, amsdu!= 1, indicate_seq =%d, seq_num =%d\n", preorder_ctrl->indicate_seq, pattrib->seq_num); */
-
 				if ((padapter->bDriverStopped == false) &&
 				    (padapter->bSurpriseRemoved == false))
 					rtw_recv_indicatepkt(padapter, prframe);/* indicate this recv_frame */
@@ -2046,8 +2027,6 @@ void rtw_reordering_ctrl_timeout_handler(struct timer_list *t)
 	if (padapter->bDriverStopped || padapter->bSurpriseRemoved)
 		return;
 
-	/* DBG_871X("+rtw_reordering_ctrl_timeout_handler() =>\n"); */
-
 	spin_lock_bh(&ppending_recvframe_queue->lock);
 
 	if (recv_indicatepkts_in_order(padapter, preorder_ctrl, true) == true)
@@ -2194,7 +2173,6 @@ static int recv_func(struct adapter *padapter, union recv_frame *rframe)
 			psecuritypriv->ndisauthtype == Ndis802_11AuthModeWPAPSK &&
 			!psecuritypriv->busetkipkey) {
 			rtw_enqueue_recvframe(rframe, &padapter->recvpriv.uc_swdec_pending_queue);
-			/* DBG_871X("%s: no key, enqueue uc_swdec_pending_queue\n", __func__); */
 
 			if (recvpriv->free_recvframe_cnt < NR_RECVFRAME/4) {
 				/* to prevent from recvframe starvation, get recvframe from uc_swdec_pending_queue to free_recvframe_cnt  */
drivers/staging/rtl8723bs/core/rtw_wlan_util.c +0 -5
index bb864d3bea0d..0a098bddf135 100644
@@ -1295,7 +1295,6 @@ int rtw_check_bcn_info(struct adapter *Adapter, u8 *pframe, u32 packet_len)
 			if (pht_info) {
 					bcn_channel = pht_info->primary_channel;
 			} else { /* we don't find channel IE, so don't check it */
-					/* DBG_871X("Oops: %s we don't find channel IE, so don't check it\n", __func__); */
 					bcn_channel = Adapter->mlmeextpriv.cur_channel;
 			}
 	}
@@ -1792,8 +1791,6 @@ void adaptive_early_32k(struct mlme_ext_priv *pmlmeext, u8 *pframe, uint len)
 	tsf = tsf << 32;
 	tsf |= le32_to_cpu(*pbuf);
 
-	/* DBG_871X("%s(): tsf_upper = 0x%08x, tsf_lower = 0x%08x\n", __func__, (u32)(tsf>>32), (u32)tsf); */
-
 	/* delay = (timestamp mod 1024*100)/1000 (unit: ms) */
 	/* delay_ms = do_div(tsf, (pmlmeinfo->bcn_interval*1024))/1000; */
 	delay_ms = do_div(tsf, (pmlmeinfo->bcn_interval*1024));
@@ -1807,11 +1804,9 @@ void adaptive_early_32k(struct mlme_ext_priv *pmlmeext, u8 *pframe, uint len)
 		/* pmlmeext->bcn_delay_ratio[delay_ms] = (pmlmeext->bcn_delay_cnt[delay_ms] * 100) /pmlmeext->bcn_cnt; */
 
 /*
-	DBG_871X("%s(): (a)bcn_cnt = %d\n", __func__, pmlmeext->bcn_cnt);
 
 	for (i = 0; i<9; i++)
 	{
-		DBG_871X("%s():bcn_delay_cnt[%d]=%d,  bcn_delay_ratio[%d]=%d\n", __func__, i,
 			pmlmeext->bcn_delay_cnt[i] , i, pmlmeext->bcn_delay_ratio[i]);
 	}
 */
drivers/staging/rtl8723bs/hal/hal_btcoex.c +0 -2
index 2cb5eedddde3..5802ed4c6f82 100644
@@ -1523,7 +1523,6 @@ u32 hal_btcoex_GetDBG(struct adapter *padapter, u8 *pStrBuf, u32 bufSize)
 
 	pstr = pStrBuf;
 	leftSize = bufSize;
-/* 	DBG_871X(FUNC_ADPT_FMT ": bufsize =%d\n", FUNC_ADPT_ARG(padapter), bufSize); */
 
 	count = rtw_sprintf(pstr, leftSize, "#define DBG\t%d\n", DBG);
 	if ((count < 0) || (count >= leftSize))
@@ -1632,7 +1631,6 @@ u32 hal_btcoex_GetDBG(struct adapter *padapter, u8 *pStrBuf, u32 bufSize)
 
 exit:
 	count = pstr - pStrBuf;
-/* 	DBG_871X(FUNC_ADPT_FMT ": usedsize =%d\n", FUNC_ADPT_ARG(padapter), count); */
 
 	return count;
 }
drivers/staging/rtl8723bs/hal/hal_com.c +0 -1
index 77f7ffb562a0..da617b5343f5 100644
@@ -1629,7 +1629,6 @@ void rtw_bb_rf_gain_offset(struct adapter *padapter)
 	u32 res, i = 0;
 	u32 *Array = Array_kfreemap;
 	u32 v1 = 0, v2 = 0, target = 0;
-	/* DBG_871X("+%s value: 0x%02x+\n", __func__, value); */
 
 	if (value & BIT4) {
 		if (padapter->eeprompriv.EEPROMRFGainVal != 0xff) {
drivers/staging/rtl8723bs/hal/hal_com_phycfg.c +0 -78

284 lines not on this page · raw message

drivers/staging/rtl8723bs/hal/odm.c +0 -3
index 3d92eee3a840..6f8f38a58237 100644
@@ -811,12 +811,9 @@ void ODM_TXPowerTrackingCheck(struct dm_odm_t *pDM_Odm)
 	if (!pDM_Odm->RFCalibrateInfo.TM_Trigger) { /* at least delay 1 sec */
 		PHY_SetRFReg(pDM_Odm->Adapter, ODM_RF_PATH_A, RF_T_METER_NEW, (BIT17 | BIT16), 0x03);
 
-		/* DBG_871X("Trigger Thermal Meter!!\n"); */
-
 		pDM_Odm->RFCalibrateInfo.TM_Trigger = 1;
 		return;
 	} else {
-		/* DBG_871X("Schedule TxPowerTracking direct call!!\n"); */
 		ODM_TXPowerTrackingCallback_ThermalMeter(Adapter);
 		pDM_Odm->RFCalibrateInfo.TM_Trigger = 0;
 	}
drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c +0 -30
index e53764250cdd..7369e2c5fc39 100644
@@ -125,9 +125,6 @@ static void ConstructBeacon(struct adapter *padapter, u8 *pframe, u32 *pLength)
 	struct wlan_bssid_ex *cur_network = &(pmlmeinfo->network);
 	u8 bc_addr[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
 
-
-	/* DBG_871X("%s\n", __func__); */
-
 	pwlanhdr = (struct ieee80211_hdr *)pframe;
 
 	fctrl = &(pwlanhdr->frame_control);
@@ -161,7 +158,6 @@ static void ConstructBeacon(struct adapter *padapter, u8 *pframe, u32 *pLength)
 	pktlen += 2;
 
 	if ((pmlmeinfo->state&0x03) == WIFI_FW_AP_STATE) {
-		/* DBG_871X("ie len =%d\n", cur_network->IELength); */
 		pktlen += cur_network->IELength - sizeof(struct ndis_802_11_fix_ie);
 		memcpy(pframe, cur_network->IEs+sizeof(struct ndis_802_11_fix_ie), pktlen);
 
@@ -207,8 +203,6 @@ static void ConstructBeacon(struct adapter *padapter, u8 *pframe, u32 *pLength)
 
 	*pLength = pktlen;
 
-	/* DBG_871X("%s bcn_sz =%d\n", __func__, pktlen); */
-
 }
 
 static void ConstructPSPoll(struct adapter *padapter, u8 *pframe, u32 *pLength)
@@ -218,8 +212,6 @@ static void ConstructPSPoll(struct adapter *padapter, u8 *pframe, u32 *pLength)
 	struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
 	struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
 
-	/* DBG_871X("%s\n", __func__); */
-
 	pwlanhdr = (struct ieee80211_hdr *)pframe;
 
 	/*  Frame control. */
@@ -259,9 +251,6 @@ static void ConstructNullFunctionData(
 	struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
 	struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
 
-
-	/* DBG_871X("%s:%d\n", __func__, bForcePowerSave); */
-
 	pwlanhdr = (struct ieee80211_hdr *)pframe;
 
 	fctrl = &pwlanhdr->frame_control;
@@ -382,9 +371,6 @@ void rtl8723b_set_rssi_cmd(struct adapter *padapter, u8 *param)
 	u8 rssi = *(param+2);
 	u8 uldl_state = 0;
 
-	/* DBG_871X("%s(): param =%.2x-%.2x-%.2x\n", __func__, *param, *(param+1), *(param+2)); */
-	/* DBG_871X("%s(): mac_id =%d rssi =%d\n", __func__, mac_id, rssi); */
-
 	SET_8723B_H2CCMD_RSSI_SETTING_MACID(u1H2CRssiSettingParm, mac_id);
 	SET_8723B_H2CCMD_RSSI_SETTING_RSSI(u1H2CRssiSettingParm, rssi);
 	SET_8723B_H2CCMD_RSSI_SETTING_ULDL_STATE(u1H2CRssiSettingParm, uldl_state);
@@ -511,8 +497,6 @@ void rtl8723b_set_FwPsTuneParam_cmd(struct adapter *padapter)
 	u8 ps_timeout = 20;  /* ms Keep awake when tx */
 	u8 dtim_period = 3;
 
-	/* DBG_871X("%s(): FW LPS mode = %d\n", __func__, psmode); */
-
 	SET_8723B_H2CCMD_PSTUNE_PARM_BCN_TO_LIMIT(u1H2CPsTuneParm, bcn_to_limit);
 	SET_8723B_H2CCMD_PSTUNE_PARM_DTIM_TIMEOUT(u1H2CPsTuneParm, dtim_timeout);
 	SET_8723B_H2CCMD_PSTUNE_PARM_PS_TIMEOUT(u1H2CPsTuneParm, ps_timeout);
@@ -566,8 +550,6 @@ static void rtl8723b_set_FwRsvdPagePkt(
 
 	struct rsvdpage_loc RsvdPageLoc;
 
-	/* DBG_871X("%s---->\n", __func__); */
-
 	pxmitpriv = &padapter->xmitpriv;
 	pmlmeext = &padapter->mlmeextpriv;
 	pmlmeinfo = &pmlmeext->mlmext_info;
@@ -604,9 +586,6 @@ static void rtl8723b_set_FwRsvdPagePkt(
 	ConstructPSPoll(padapter, &ReservedPagePacket[BufIndex], &PSPollLength);
 	rtl8723b_fill_fake_txdesc(padapter, &ReservedPagePacket[BufIndex-TxDescLen], PSPollLength, true, false, false);
 
-	/* DBG_871X("%s(): HW_VAR_SET_TX_CMD: PS-POLL %p %d\n", */
-	/* 	__func__, &ReservedPagePacket[BufIndex-TxDescLen], (PSPollLength+TxDescLen)); */
-
 	CurtPktPageNum = (u8)PageNum_128(TxDescLen + PSPollLength);
 
 	TotalPageNum += CurtPktPageNum;
@@ -624,9 +603,6 @@ static void rtl8723b_set_FwRsvdPagePkt(
 	);
 	rtl8723b_fill_fake_txdesc(padapter, &ReservedPagePacket[BufIndex-TxDescLen], NullDataLength, false, false, false);
 
-	/* DBG_871X("%s(): HW_VAR_SET_TX_CMD: NULL DATA %p %d\n", */
-	/* 	__func__, &ReservedPagePacket[BufIndex-TxDescLen], (NullDataLength+TxDescLen)); */
-
 	CurtPktPageNum = (u8)PageNum_128(TxDescLen + NullDataLength);
 
 	TotalPageNum += CurtPktPageNum;
@@ -644,9 +620,6 @@ static void rtl8723b_set_FwRsvdPagePkt(
 	);
 	rtl8723b_fill_fake_txdesc(padapter, &ReservedPagePacket[BufIndex-TxDescLen], QosNullLength, false, false, false);
 
-	/* DBG_871X("%s(): HW_VAR_SET_TX_CMD: QOS NULL DATA %p %d\n", */
-	/* 	__func__, &ReservedPagePacket[BufIndex-TxDescLen], (QosNullLength+TxDescLen)); */
-
 	CurtPktPageNum = (u8)PageNum_128(TxDescLen + QosNullLength);
 
 	TotalPageNum += CurtPktPageNum;
@@ -664,9 +637,6 @@ static void rtl8723b_set_FwRsvdPagePkt(
 	);
 	rtl8723b_fill_fake_txdesc(padapter, &ReservedPagePacket[BufIndex-TxDescLen], BTQosNullLength, false, true, false);
 
-	/* DBG_871X("%s(): HW_VAR_SET_TX_CMD: BT QOS NULL DATA %p %d\n", */
-	/* 	__func__, &ReservedPagePacket[BufIndex-TxDescLen], (BTQosNullLength+TxDescLen)); */
-
 	CurtPktPageNum = (u8)PageNum_128(TxDescLen + BTQosNullLength);
 
 	TotalPageNum += CurtPktPageNum;
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c +0 -13
index d706ab03d434..fda356e19da7 100644
@@ -751,7 +751,6 @@ static void hal_ReadEFuse_WiFi(
 	u16 i, total, used;
 	u8 efuse_usage = 0;
 
-	/* DBG_871X("YJ: ====>%s():_offset =%d _size_byte =%d bPseudoTest =%d\n", __func__, _offset, _size_byte, bPseudoTest); */
 	/*  */
 	/*  Do NOT excess total size of EFuse table. Added by Roger, 2008.11.10. */
 	/*  */
@@ -2662,8 +2661,6 @@ u8 BWMapping_8723B(struct adapter *Adapter, struct pkt_attrib *pattrib)
 	u8 BWSettingOfDesc = 0;
 	struct hal_com_data *pHalData = GET_HAL_DATA(Adapter);
 
-	/* DBG_871X("BWMapping pHalData->CurrentChannelBW %d, pattrib->bwmode %d\n", pHalData->CurrentChannelBW, pattrib->bwmode); */
-
 	if (pHalData->CurrentChannelBW == CHANNEL_WIDTH_80) {
 		if (pattrib->bwmode == CHANNEL_WIDTH_80)
 			BWSettingOfDesc = 2;
@@ -2690,8 +2687,6 @@ u8 SCMapping_8723B(struct adapter *Adapter, struct pkt_attrib *pattrib)
 	u8 SCSettingOfDesc = 0;
 	struct hal_com_data *pHalData = GET_HAL_DATA(Adapter);
 
-	/* DBG_871X("SCMapping: pHalData->CurrentChannelBW %d, pHalData->nCur80MhzPrimeSC %d, pHalData->nCur40MhzPrimeSC %d\n", pHalData->CurrentChannelBW, pHalData->nCur80MhzPrimeSC, pHalData->nCur40MhzPrimeSC); */
-
 	if (pHalData->CurrentChannelBW == CHANNEL_WIDTH_80) {
 		if (pattrib->bwmode == CHANNEL_WIDTH_80) {
 			SCSettingOfDesc = VHT_DATA_SC_DONOT_CARE;
@@ -2715,8 +2710,6 @@ u8 SCMapping_8723B(struct adapter *Adapter, struct pkt_attrib *pattrib)
 				{}
 		}
 	} else if (pHalData->CurrentChannelBW == CHANNEL_WIDTH_40) {
-		/* DBG_871X("SCMapping: HT Case: pHalData->CurrentChannelBW %d, pHalData->nCur40MhzPrimeSC %d\n", pHalData->CurrentChannelBW, pHalData->nCur40MhzPrimeSC); */
-
 		if (pattrib->bwmode == CHANNEL_WIDTH_40) {
 			SCSettingOfDesc = VHT_DATA_SC_DONOT_CARE;
 		} else if (pattrib->bwmode == CHANNEL_WIDTH_20) {
@@ -3373,9 +3366,6 @@ void CCX_FwC2HTxRpt_8723b(struct adapter *padapter, u8 *pdata, u8 len)
 #define	GET_8723B_C2H_TX_RPT_LIFE_TIME_OVER(_Header)	LE_BITS_TO_1BYTE((_Header + 0), 6, 1)
 #define	GET_8723B_C2H_TX_RPT_RETRY_OVER(_Header)	LE_BITS_TO_1BYTE((_Header + 0), 7, 1)
 
-	/* DBG_871X("%s, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x\n", __func__, */
-	/* 		*pdata, *(pdata+1), *(pdata+2), *(pdata+3), *(pdata+4), *(pdata+5), *(pdata+6), *(pdata+7)); */
-
 	seq_no = *(pdata+6);
 
 	if (GET_8723B_C2H_TX_RPT_RETRY_OVER(pdata) | GET_8723B_C2H_TX_RPT_LIFE_TIME_OVER(pdata)) {
@@ -3383,7 +3373,6 @@ void CCX_FwC2HTxRpt_8723b(struct adapter *padapter, u8 *pdata, u8 len)
 	}
 /*
 	else if (seq_no != padapter->xmitpriv.seq_no) {
-		DBG_871X("tx_seq_no =%d, rpt_seq_no =%d\n", padapter->xmitpriv.seq_no, seq_no);
 		rtw_ack_tx_done(&padapter->xmitpriv, RTW_SCTX_DONE_CCX_PKT_FAIL);
 	}
 */
@@ -3492,8 +3481,6 @@ void C2HPacketHandler_8723B(struct adapter *padapter, u8 *pbuffer, u16 length)
 	C2hEvent.CmdLen = length-2;
 	tmpBuf = pbuffer+2;
 
-	/* DBG_871X("%s C2hEvent.CmdID:%x C2hEvent.CmdLen:%x C2hEvent.CmdSeq:%x\n", */
-	/* 		__func__, C2hEvent.CmdID, C2hEvent.CmdLen, C2hEvent.CmdSeq); */
 	print_hex_dump_debug(DRIVER_PREFIX ": C2HPacketHandler_8723B(): Command Content:\n",
 			     DUMP_PREFIX_NONE, 16, 1, tmpBuf, C2hEvent.CmdLen, false);
 
drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c +0 -5
index e30c310d8439..116f5e6644c3 100644
@@ -38,7 +38,6 @@ static void update_recvframe_attrib(struct adapter *padapter,
 
 	/*  update rx report to recv_frame attribute */
 	pattrib->pkt_rpt_type = prxreport->c2h_ind ? C2H_PACKET : NORMAL_RX;
-/* 	DBG_871X("%s: pkt_rpt_type =%d\n", __func__, pattrib->pkt_rpt_type); */
 
 	if (pattrib->pkt_rpt_type == NORMAL_RX) {
 		/*  Normal rx packet */
@@ -165,8 +164,6 @@ static void rtl8723bs_c2h_packet_handler(struct adapter *padapter,
 	if (length == 0)
 		return;
 
-	/* DBG_871X("+%s() length =%d\n", __func__, length); */
-
 	tmp = rtw_zmalloc(length);
 	if (!tmp)
 		return;
@@ -177,8 +174,6 @@ static void rtl8723bs_c2h_packet_handler(struct adapter *padapter,
 
 	if (!res)
 		kfree(tmp);
-
-	/* DBG_871X("-%s res(%d)\n", __func__, res); */
 }
 
 static inline union recv_frame *try_alloc_recvframe(struct recv_priv *precvpriv,
drivers/staging/rtl8723bs/include/rtw_mlme_ext.h +0 -2
index b26da309f54d..393eeecaf3a0 100644
@@ -690,13 +690,11 @@ void sa_query_timer_hdl(struct timer_list *t);
 
 #define set_survey_timer(mlmeext, ms) \
 	do { \
-		/*DBG_871X("%s set_survey_timer(%p, %d)\n", __func__, (mlmeext), (ms));*/ \
 		_set_timer(&(mlmeext)->survey_timer, (ms)); \
 	} while (0)
 
 #define set_link_timer(mlmeext, ms) \
 	do { \
-		/*DBG_871X("%s set_link_timer(%p, %d)\n", __func__, (mlmeext), (ms));*/ \
 		_set_timer(&(mlmeext)->link_timer, (ms)); \
 	} while (0)
 #define set_sa_query_timer(mlmeext, ms) \
drivers/staging/rtl8723bs/include/rtw_pwrctrl.h +0 -1
index b052b86944c4..2e739a17dd95 100644
@@ -244,7 +244,6 @@ struct pwrctrl_priv {
 
 #define _rtw_set_pwr_state_check_timer(pwrctl, ms) \
 	do { \
-		/*DBG_871X("%s _rtw_set_pwr_state_check_timer(%p, %d)\n", __func__, (pwrctl), (ms));*/ \
 		_set_timer(&(pwrctl)->pwr_state_check_timer, (ms)); \
 	} while (0)
 
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c +2 -7
index aa2cd69d7056..62106d4c7006 100644
@@ -421,7 +421,6 @@ void rtw_cfg80211_ibss_indicate_connect(struct adapter *padapter)
 			) {
 				if (!rtw_cfg80211_inform_bss(padapter, scanned)) {
 				} else {
-					/* DBG_871X(FUNC_ADPT_FMT" inform success !!\n", FUNC_ADPT_ARG(padapter)); */
 				}
 			} else {
 				rtw_warn_on(1);
@@ -455,8 +454,6 @@ void rtw_cfg80211_indicate_connect(struct adapter *padapter)
 		struct wlan_bssid_ex  *pnetwork = &(padapter->mlmeextpriv.mlmext_info.network);
 		struct wlan_network *scanned = pmlmepriv->cur_network_scanned;
 
-		/* DBG_871X(FUNC_ADPT_FMT" BSS not found\n", FUNC_ADPT_ARG(padapter)); */
-
 		if (scanned == NULL) {
 			rtw_warn_on(1);
 			goto check_bss;
@@ -467,7 +464,6 @@ void rtw_cfg80211_indicate_connect(struct adapter *padapter)
 		) {
 			if (!rtw_cfg80211_inform_bss(padapter, scanned)) {
 			} else {
-				/* DBG_871X(FUNC_ADPT_FMT" inform success !!\n", FUNC_ADPT_ARG(padapter)); */
 			}
 		} else {
 			rtw_warn_on(1);
@@ -959,13 +955,12 @@ static int rtw_cfg80211_set_encryption(struct net_device *dev, struct ieee_param
 					}
 					else if (strcmp(param->u.crypt.alg, "BIP") == 0)
 					{
-						/* DBG_871X("BIP key_len =%d , index =%d @@@@@@@@@@@@@@@@@@\n", param->u.crypt.key_len, param->u.crypt.idx); */
 						/* save the IGTK key, length 16 bytes */
 						memcpy(padapter->securitypriv.dot11wBIPKey[param->u.crypt.idx].skey, param->u.crypt.key, (param->u.crypt.key_len > 16 ? 16 : param->u.crypt.key_len));
-						/*DBG_871X("IGTK key below:\n");
+						/*
 						for (no = 0;no<16;no++)
 							printk(" %02x ", padapter->securitypriv.dot11wBIPKey[param->u.crypt.idx].skey[no]);
-						DBG_871X("\n");*/
+						*/
 						padapter->securitypriv.dot11wBIPKeyid = param->u.crypt.idx;
 						padapter->securitypriv.binstallBIPkey = true;
 					}
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c +0 -34
index 17c7730f1434..91f540d50774 100644
@@ -42,8 +42,6 @@ void indicate_wx_scan_complete_event(struct adapter *padapter)
 	union iwreq_data wrqu;
 
 	memset(&wrqu, 0, sizeof(union iwreq_data));
-
-	/* DBG_871X("+rtw_indicate_wx_scan_complete_event\n"); */
 }
 
 
@@ -213,7 +211,6 @@ static char *translate_scan(struct adapter *padapter,
 		if (mcs_rate&0x8000) { /* MCS15 */
 			max_rate = (bw_40MHz) ? ((short_GI)?300:270):((short_GI)?144:130);
 		} else { /* default MCS7 */
-			/* DBG_871X("wx_get_scan, mcs_rate_bitmap = 0x%x\n", mcs_rate); */
 			max_rate = (bw_40MHz) ? ((short_GI)?150:135):((short_GI)?72:65);
 		}
 
@@ -329,8 +326,6 @@ static char *translate_scan(struct adapter *padapter,
 
 	iwe.u.qual.noise = 0; /*  noise level */
 
-	/* DBG_871X("iqual =%d, ilevel =%d, inoise =%d, iupdated =%d\n", iwe.u.qual.qual, iwe.u.qual.level , iwe.u.qual.noise, iwe.u.qual.updated); */
-
 	start = iwe_stream_add_event(info, start, stop, &iwe, IW_EV_QUAL_LEN);
 
 	{
@@ -1239,14 +1234,11 @@ static int rtw_wx_set_scan(struct net_device *dev, struct iw_request_info *a,
 		char sec_len;
 		int ssid_index = 0;
 
-		/* DBG_871X("%s COMBO_SCAN header is recognized\n", __func__); */
-
 		while (len >= 1) {
 			section = *(pos++); len -= 1;
 
 			switch (section) {
 			case WEXT_CSCAN_SSID_SECTION:
-				/* DBG_871X("WEXT_CSCAN_SSID_SECTION\n"); */
 				if (len < 1) {
 					len = 0;
 					break;
@@ -1257,8 +1249,6 @@ static int rtw_wx_set_scan(struct net_device *dev, struct iw_request_info *a,
 				if (sec_len > 0 && sec_len <= len) {
 					ssid[ssid_index].SsidLength = sec_len;
 					memcpy(ssid[ssid_index].Ssid, pos, ssid[ssid_index].SsidLength);
-					/* DBG_871X("%s COMBO_SCAN with specific ssid:%s, %d\n", __func__ */
-					/* 	, ssid[ssid_index].Ssid, ssid[ssid_index].SsidLength); */
 					ssid_index++;
 				}
 
@@ -1267,31 +1257,23 @@ static int rtw_wx_set_scan(struct net_device *dev, struct iw_request_info *a,
 
 
 			case WEXT_CSCAN_CHANNEL_SECTION:
-				/* DBG_871X("WEXT_CSCAN_CHANNEL_SECTION\n"); */
 				pos += 1; len -= 1;
 				break;
 			case WEXT_CSCAN_ACTV_DWELL_SECTION:
-				/* DBG_871X("WEXT_CSCAN_ACTV_DWELL_SECTION\n"); */
 				pos += 2; len -= 2;
 				break;
 			case WEXT_CSCAN_PASV_DWELL_SECTION:
-				/* DBG_871X("WEXT_CSCAN_PASV_DWELL_SECTION\n"); */
 				pos += 2; len -= 2;
 				break;
 			case WEXT_CSCAN_HOME_DWELL_SECTION:
-				/* DBG_871X("WEXT_CSCAN_HOME_DWELL_SECTION\n"); */
 				pos += 2; len -= 2;
 				break;
 			case WEXT_CSCAN_TYPE_SECTION:
-				/* DBG_871X("WEXT_CSCAN_TYPE_SECTION\n"); */
 				pos += 1; len -= 1;
 				break;
 			default:
-				/* DBG_871X("Unknown CSCAN section %c\n", section); */
 				len = 0; /*  stop parsing */
 			}
-			/* DBG_871X("len:%d\n", len); */
-
 		}
 
 		/* jeff: it has still some scan parameter to parse, we only do this now... */
@@ -2194,7 +2176,6 @@ static int rtw_wx_write_rf(struct net_device *dev,
 	path = *(u32 *)extra;
 	addr = *((u32 *)extra + 1);
 	data32 = *((u32 *)extra + 2);
-/* 	DBG_871X("%s: path =%d addr = 0x%02x data = 0x%05x\n", __func__, path, addr, data32); */
 	rtw_hal_write_rfreg(padapter, path, addr, 0xFFFFF, data32);
 
 	return 0;
@@ -2212,8 +2193,6 @@ static int dummy(struct net_device *dev, struct iw_request_info *a,
 	/* struct adapter *padapter = rtw_netdev_priv(dev); */
 	/* struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); */
 
-	/* DBG_871X("cmd_code =%x, fwstate = 0x%x\n", a->cmd, get_fwstate(pmlmepriv)); */
-
 	return -1;
 
 }
@@ -2462,7 +2441,6 @@ static int rtw_rereg_nd_name(struct net_device *dev,
 		rereg_priv->old_ifname[IFNAMSIZ-1] = 0;
 	}
 
-	/* DBG_871X("%s wrqu->data.length:%d\n", __func__, wrqu->data.length); */
 	if (wrqu->data.length > IFNAMSIZ)
 		return -EFAULT;
 
@@ -2967,7 +2945,6 @@ static int wpa_set_param(struct net_device *dev, u8 name, u32 value)
 	case IEEE_PARAM_WPAX_SELECT:
 
 		/*  added for WPA2 mixed mode */
-		/* DBG_871X(KERN_WARNING "------------------------>wpax value = %x\n", value); */
 		/*
 		spin_lock_irqsave(&ieee->wpax_suitlist_lock, flags);
 		ieee->wpax_type_set = 1;
@@ -3375,7 +3352,6 @@ static int rtw_add_sta(struct net_device *dev, struct ieee_param *param)
 	psta = rtw_get_stainfo(pstapriv, param->sta_addr);
 	if (psta)
 	{
-		DBG_871X("rtw_add_sta(), free has been added psta =%p\n", psta);
 		spin_lock_bh(&(pstapriv->sta_hash_lock));
 		rtw_free_stainfo(padapter,  psta);
 		spin_unlock_bh(&(pstapriv->sta_hash_lock));
@@ -3388,8 +3364,6 @@ static int rtw_add_sta(struct net_device *dev, struct ieee_param *param)
 	if (psta) {
 		int flags = param->u.add_sta.flags;
 
-		/* DBG_871X("rtw_add_sta(), init sta's variables, psta =%p\n", psta); */
-
 		psta->aid = param->u.add_sta.aid;/* aid = 1~2007 */
 
 		memcpy(psta->bssrateset, param->u.add_sta.tx_supp_rates, 16);
@@ -3448,8 +3422,6 @@ static int rtw_del_sta(struct net_device *dev, struct ieee_param *param)
 	if (psta) {
 		u8 updated = false;
 
-		/* DBG_871X("free psta =%p, aid =%d\n", psta, psta->aid); */
-
 		spin_lock_bh(&pstapriv->asoc_list_lock);
 		if (list_empty(&psta->asoc_list) == false) {
 			list_del_init(&psta->asoc_list);
@@ -3794,8 +3766,6 @@ static int rtw_hostapd_ioctl(struct net_device *dev, struct iw_point *p)
 		return -EFAULT;
 	}
 
-	/* DBG_871X("%s, cmd =%d\n", __func__, param->cmd); */
-
 	switch (param->cmd) {
 	case RTL871X_HOSTAPD_FLUSH:
 
@@ -3982,9 +3952,6 @@ static int rtw_wx_set_priv(struct net_device *dev,
 	vfree(ext_dbg);
 	#endif
 
-	/* DBG_871X("rtw_wx_set_priv: (SIOCSIWPRIV) %s ret =%d\n", */
-	/* 		dev->name, ret); */
-
 	return ret;
 
 }
@@ -4298,7 +4265,6 @@ static struct iw_statistics *rtw_get_wireless_stats(struct net_device *dev)
 		piwstats->qual.qual = 0;
 		piwstats->qual.level = 0;
 		piwstats->qual.noise = 0;
-		/* DBG_871X("No link  level:%d, qual:%d, noise:%d\n", tmp_level, tmp_qual, tmp_noise); */
 	} else {
 		tmp_level = padapter->recvpriv.signal_strength;
 		tmp_qual = padapter->recvpriv.signal_qual;
drivers/staging/rtl8723bs/os_dep/os_intfs.c +0 -2
index 58763dc34f22..5062aeef169f 100644
@@ -304,7 +304,6 @@ static int rtw_net_set_mac_address(struct net_device *pnetdev, void *p)
 	struct sockaddr *addr = p;
 
 	if (!padapter->bup) {
-		/* DBG_871X("r8711_net_set_mac_address(), MAC =%x:%x:%x:%x:%x:%x\n", addr->sa_data[0], addr->sa_data[1], addr->sa_data[2], addr->sa_data[3], */
 		/* addr->sa_data[4], addr->sa_data[5]); */
 		memcpy(padapter->eeprompriv.mac_addr, addr->sa_data, ETH_ALEN);
 		/* memcpy(pnetdev->dev_addr, addr->sa_data, ETH_ALEN); */
@@ -1004,7 +1003,6 @@ static int netdev_close(struct net_device *pnetdev)
 
 /*if (!padapter->hw_init_completed)
 	{
-		DBG_871X("(1)871x_drv - drv_close, bup =%d, hw_init_completed =%d\n", padapter->bup, padapter->hw_init_completed);
 
 		padapter->bDriverStopped = true;
 
drivers/staging/rtl8723bs/os_dep/recv_linux.c +0 -1
index af39a021dc71..bb4835b64262 100644
@@ -129,7 +129,6 @@ void rtw_os_recv_indicate_pkt(struct adapter *padapter, struct sk_buff *pkt, str
 				}
 			} else {
 				/*  to APself */
-				/* DBG_871X("to APSelf\n"); */
 			}
 		}
 
drivers/staging/rtl8723bs/os_dep/sdio_ops_linux.c +0 -13
index ee68b564e8db..827ce3013acb 100644
@@ -41,7 +41,6 @@ u8 sd_f0_read8(struct intf_hdl *pintfhdl, u32 addr, s32 *err)
 	psdio = &psdiodev->intf_data;
 
 	if (padapter->bSurpriseRemoved) {
-		/* DBG_871X(" %s (padapter->bSurpriseRemoved ||adapter->pwrctrlpriv.pnp_bstop_trx)!!!\n", __func__); */
 		return v;
 	}
 
@@ -77,7 +76,6 @@ s32 _sd_cmd52_read(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pdata)
 	psdio = &psdiodev->intf_data;
 
 	if (padapter->bSurpriseRemoved) {
-		/* DBG_871X(" %s (padapter->bSurpriseRemoved ||adapter->pwrctrlpriv.pnp_bstop_trx)!!!\n", __func__); */
 		return err;
 	}
 
@@ -112,7 +110,6 @@ s32 sd_cmd52_read(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pdata)
 	psdio = &psdiodev->intf_data;
 
 	if (padapter->bSurpriseRemoved) {
-		/* DBG_871X(" %s (padapter->bSurpriseRemoved ||adapter->pwrctrlpriv.pnp_bstop_trx)!!!\n", __func__); */
 		return err;
 	}
 
@@ -146,7 +143,6 @@ s32 _sd_cmd52_write(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pdata)
 	psdio = &psdiodev->intf_data;
 
 	if (padapter->bSurpriseRemoved) {
-		/* DBG_871X(" %s (padapter->bSurpriseRemoved ||adapter->pwrctrlpriv.pnp_bstop_trx)!!!\n", __func__); */
 		return err;
 	}
 
@@ -181,7 +177,6 @@ s32 sd_cmd52_write(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pdata)
 	psdio = &psdiodev->intf_data;
 
 	if (padapter->bSurpriseRemoved) {
-		/* DBG_871X(" %s (padapter->bSurpriseRemoved ||adapter->pwrctrlpriv.pnp_bstop_trx)!!!\n", __func__); */
 		return err;
 	}
 
@@ -211,7 +206,6 @@ u8 sd_read8(struct intf_hdl *pintfhdl, u32 addr, s32 *err)
 	psdio = &psdiodev->intf_data;
 
 	if (padapter->bSurpriseRemoved) {
-		/* DBG_871X(" %s (padapter->bSurpriseRemoved ||adapter->pwrctrlpriv.pnp_bstop_trx)!!!\n", __func__); */
 		return v;
 	}
 
@@ -242,7 +236,6 @@ u32 sd_read32(struct intf_hdl *pintfhdl, u32 addr, s32 *err)
 	psdio = &psdiodev->intf_data;
 
 	if (padapter->bSurpriseRemoved) {
-		/* DBG_871X(" %s (padapter->bSurpriseRemoved ||adapter->pwrctrlpriv.pnp_bstop_trx)!!!\n", __func__); */
 		return v;
 	}
 
@@ -302,7 +295,6 @@ void sd_write8(struct intf_hdl *pintfhdl, u32 addr, u8 v, s32 *err)
 	psdio = &psdiodev->intf_data;
 
 	if (padapter->bSurpriseRemoved) {
-		/* DBG_871X(" %s (padapter->bSurpriseRemoved ||adapter->pwrctrlpriv.pnp_bstop_trx)!!!\n", __func__); */
 		return;
 	}
 
@@ -331,7 +323,6 @@ void sd_write32(struct intf_hdl *pintfhdl, u32 addr, u32 v, s32 *err)
 	psdio = &psdiodev->intf_data;
 
 	if (padapter->bSurpriseRemoved) {
-		/* DBG_871X(" %s (padapter->bSurpriseRemoved ||adapter->pwrctrlpriv.pnp_bstop_trx)!!!\n", __func__); */
 		return;
 	}
 
@@ -404,7 +395,6 @@ s32 _sd_read(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, void *pdata)
 	psdio = &psdiodev->intf_data;
 
 	if (padapter->bSurpriseRemoved) {
-		/* DBG_871X(" %s (padapter->bSurpriseRemoved ||adapter->pwrctrlpriv.pnp_bstop_trx)!!!\n", __func__); */
 		return err;
 	}
 
@@ -459,7 +449,6 @@ s32 sd_read(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, void *pdata)
 	psdio = &psdiodev->intf_data;
 
 	if (padapter->bSurpriseRemoved) {
-		/* DBG_871X(" %s (padapter->bSurpriseRemoved ||adapter->pwrctrlpriv.pnp_bstop_trx)!!!\n", __func__); */
 		return err;
 	}
 	func = psdio->func;
@@ -503,7 +492,6 @@ s32 _sd_write(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, void *pdata)
 	psdio = &psdiodev->intf_data;
 
 	if (padapter->bSurpriseRemoved) {
-		/* DBG_871X(" %s (padapter->bSurpriseRemoved ||adapter->pwrctrlpriv.pnp_bstop_trx)!!!\n", __func__); */
 		return err;
 	}
 
@@ -559,7 +547,6 @@ s32 sd_write(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, void *pdata)
 	psdio = &psdiodev->intf_data;
 
 	if (padapter->bSurpriseRemoved) {
-		/* DBG_871X(" %s (padapter->bSurpriseRemoved ||adapter->pwrctrlpriv.pnp_bstop_trx)!!!\n", __func__); */
 		return err;
 	}
 
drivers/staging/rtl8723bs/os_dep/xmit_linux.c +0 -3
index f0bd29a66395..eea7b59f2034 100644
@@ -113,7 +113,6 @@ static void rtw_check_xmit_resource(struct adapter *padapter, struct sk_buff *pk
 	if (padapter->registrypriv.wifi_spec) {
 		/* No free space for Tx, tx_worker is too slow */
 		if (pxmitpriv->hwxmits[queue].accnt > WMM_XMIT_THRESHOLD) {
-			/* DBG_871X("%s(): stop netif_subqueue[%d]\n", __func__, queue); */
 			netif_stop_subqueue(padapter->pnetdev, queue);
 		}
 	} else {
@@ -213,8 +212,6 @@ int _rtw_xmit_entry(struct sk_buff *pkt, struct net_device *pnetdev)
 			if (res)
 				goto exit;
 		} else {
-			/* DBG_871X("Stop M2U(%d, %d)! ", pxmitpriv->free_xmitframe_cnt, pxmitpriv->free_xmitbuf_cnt); */
-			/* DBG_871X("!m2u); */
 		}
 	}
 
Signature · 1 line
2.20.1
#5 lore raw

PATCH 5/19 staging: rtl8723bs: remove DBG_871X macro definitions

In reply to Fabio Aiuto

remove DBG_781X macro definitions.

Remove all of the DBG_871X logs as they
currently do nothing as they require the code to be modified by hand in order to be turned on. This obviously has not happened since the code was merged, so just remove them as they are unused.

---
 drivers/staging/rtl8723bs/include/rtw_debug.h | 6 ------
 1 file changed, 6 deletions(-)
drivers/staging/rtl8723bs/include/rtw_debug.h +0 -6
index 6639d79cd7ec..4c159c1a0747 100644
@@ -131,7 +131,6 @@
 	#define	_MODULE_DEFINE_	_module_efuse_
 #endif
 
-#define DBG_871X(x, ...) do {} while (0)
 #define MSG_8192C(x, ...) do {} while (0)
 #define DBG_8192C(x, ...) do {} while (0)
 #define DBG_871X_LEVEL(x, ...) do {} while (0)
@@ -197,11 +196,6 @@
 
 #ifdef DEBUG
 #if	defined(_dbgdump)
-	#undef DBG_871X
-	#define DBG_871X(...)     do {\
-		_dbgdump(DRIVER_PREFIX __VA_ARGS__);\
-	} while (0)
-
 	#undef MSG_8192C
 	#define MSG_8192C(...)     do {\
 		_dbgdump(DRIVER_PREFIX __VA_ARGS__);\
Signature · 1 line
2.20.1
#6 lore raw

PATCH 6/19 staging: rtl8723bs: remove all if-else empty blocks left by DBG_871X removal

In reply to Fabio Aiuto

remove all if-else empty {} blocks left by spatch application.

removed unused variables and an unused static function definition after if-else blocks removal, to suppress compiler warnings.

---
 drivers/staging/rtl8723bs/core/rtw_ap.c       | 22 +++-------
 drivers/staging/rtl8723bs/core/rtw_cmd.c      |  5 ---
 .../staging/rtl8723bs/core/rtw_ieee80211.c    |  4 --
 drivers/staging/rtl8723bs/core/rtw_io.c       |  2 +-
 .../staging/rtl8723bs/core/rtw_ioctl_set.c    |  3 +-
 drivers/staging/rtl8723bs/core/rtw_mlme.c     | 16 --------
 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 40 +------------------
 drivers/staging/rtl8723bs/core/rtw_pwrctrl.c  | 21 ++--------
 drivers/staging/rtl8723bs/core/rtw_recv.c     |  7 ----
 drivers/staging/rtl8723bs/core/rtw_sta_mgt.c  |  6 ---
 .../staging/rtl8723bs/core/rtw_wlan_util.c    |  8 ----
 drivers/staging/rtl8723bs/core/rtw_xmit.c     | 24 -----------
 drivers/staging/rtl8723bs/hal/hal_com.c       |  6 +--
 .../staging/rtl8723bs/hal/hal_com_phycfg.c    | 32 ++++-----------
 drivers/staging/rtl8723bs/hal/hal_intf.c      | 10 +----
 drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c  | 10 +----
 .../staging/rtl8723bs/hal/rtl8723b_hal_init.c |  7 ----
 .../staging/rtl8723bs/hal/rtl8723b_phycfg.c   |  3 --
 .../staging/rtl8723bs/hal/rtl8723bs_recv.c    |  3 --
 .../staging/rtl8723bs/hal/rtl8723bs_xmit.c    |  2 -
 drivers/staging/rtl8723bs/hal/sdio_halinit.c  |  4 --
 drivers/staging/rtl8723bs/hal/sdio_ops.c      |  7 +---
 .../staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 38 +++---------------
 .../staging/rtl8723bs/os_dep/ioctl_linux.c    | 34 ++--------------
 drivers/staging/rtl8723bs/os_dep/os_intfs.c   |  3 --
 .../staging/rtl8723bs/os_dep/sdio_ops_linux.c | 20 ----------
 drivers/staging/rtl8723bs/os_dep/xmit_linux.c |  1 -
 27 files changed, 33 insertions(+), 305 deletions(-)
drivers/staging/rtl8723bs/core/rtw_ap.c +5 -17
index ae477abced65..30afe9f4ceef 100644
@@ -195,8 +195,6 @@ void expire_timeout_chk(struct adapter *padapter)
 
 	/* check auth_queue */
 	#ifdef DBG_EXPIRATION_CHK
-	if (phead != plist) {
-	}
 	#endif
 	while (phead != plist) {
 		psta = container_of(plist, struct sta_info, auth_list);
@@ -228,8 +226,6 @@ void expire_timeout_chk(struct adapter *padapter)
 
 	/* check asoc_queue */
 	#ifdef DBG_EXPIRATION_CHK
-	if (phead != plist) {
-	}
 	#endif
 	while (phead != plist) {
 		psta = container_of(plist, struct sta_info, asoc_list);
@@ -392,7 +388,6 @@ void add_RATid(struct adapter *padapter, struct sta_info *psta, u8 rssi_level)
 		arg[3] = psta->init_rate;
 
 		rtw_hal_add_ra_tid(padapter, tx_ra_bitmap, arg, rssi_level);
-	} else {
 	}
 }
 
@@ -468,7 +463,6 @@ void update_bmc_sta(struct adapter *padapter)
 		psta->state = _FW_LINKED;
 		spin_unlock_bh(&psta->lock);
 
-	} else {
 	}
 }
 
@@ -662,8 +656,6 @@ static void update_hw_ht_param(struct adapter *padapter)
 	pmlmeinfo->SM_PS = (le16_to_cpu(
 		pmlmeinfo->HT_caps.u.HT_cap_element.HT_caps_info
 	) & 0x0C) >> 2;
-	if (pmlmeinfo->SM_PS == WLAN_HT_CAP_SM_PS_STATIC)
-		{}
 
 	/*  */
 	/*  Config current HT Protection mode. */
@@ -832,8 +824,7 @@ void start_bss_network(struct adapter *padapter, u8 *pbuf)
 		update_beacon(padapter, WLAN_EID_TIM, NULL, true);
 
 		/* issue beacon frame */
-		if (send_beacon(padapter) == _FAIL)
-			{}
+		send_beacon(padapter);
 	}
 
 	/* update bc/mc sta_info */
@@ -1573,9 +1564,6 @@ static void update_bcn_vendor_spec_ie(struct adapter *padapter, u8 *oui)
 
 	else if (!memcmp(P2P_OUI, oui, 4))
 		update_bcn_p2p_ie(padapter);
-
-	else
-		{}
 }
 
 void update_beacon(struct adapter *padapter, u8 ie_id, u8 *oui, u8 tx)
@@ -1863,8 +1851,6 @@ void bss_cap_update_on_sta_join(struct adapter *padapter, struct sta_info *psta)
 			psta->no_ht_set = 1;
 			pmlmepriv->num_sta_no_ht++;
 		}
-		if (pmlmepriv->htpriv.ht_option == true) {
-		}
 	}
 
 	if (rtw_ht_operation_update(padapter) > 0) {
@@ -2117,8 +2103,10 @@ void rtw_ap_restore_network(struct adapter *padapter)
 	for (i = 0; i < chk_alive_num; i++) {
 		psta = rtw_get_stainfo_by_offset(pstapriv, chk_alive_list[i]);
 
-		if (psta == NULL) {
-		} else if (psta->state & _FW_LINKED) {
+		if (psta == NULL)
+			continue;
+
+		if (psta->state & _FW_LINKED) {
 			rtw_sta_media_status_rpt(padapter, psta, 1);
 			Update_RA_Entry(padapter, psta);
 			/* pairwise key */
drivers/staging/rtl8723bs/core/rtw_cmd.c +0 -5
index 2000e7703571..c29cd23b74a0 100644
@@ -388,7 +388,6 @@ int rtw_cmd_thread(void *context)
 	struct cmd_obj *pcmd;
 	u8 *pcmdbuf;
 	unsigned long cmd_start_time;
-	unsigned long cmd_process_time;
 	u8 (*cmd_hdl)(struct adapter *padapter, u8 *pbuf);
 	void (*pcmd_callback)(struct adapter *dev, struct cmd_obj *pcmd);
 	struct adapter *padapter = context;
@@ -483,10 +482,6 @@ int rtw_cmd_thread(void *context)
 			mutex_unlock(&(pcmd->padapter->cmdpriv.sctx_mutex));
 		}
 
-		cmd_process_time = jiffies_to_msecs(jiffies - cmd_start_time);
-		if (cmd_process_time > 1000) {
-		}
-
 		/* call callback function for post-processed */
 		if (pcmd->cmdcode < ARRAY_SIZE(rtw_cmd_callback)) {
 			pcmd_callback = rtw_cmd_callback[pcmd->cmdcode].callback;
drivers/staging/rtl8723bs/core/rtw_ieee80211.c +0 -4
index 00be36165f87..f57d6552c338 100644
@@ -819,8 +819,6 @@ static int rtw_ieee802_11_parse_vendor_specific(u8 *pos, uint elen,
 	 * OUI of the vendor. The following byte is used a vendor specific
 	 * sub-type. */
 	if (elen < 4) {
-		if (show_errors) {
-		}
 		return -1;
 	}
 
@@ -908,8 +906,6 @@ enum ParseRes rtw_ieee802_11_parse_elems(u8 *start, uint len,
 		left -= 2;
 
 		if (elen > left) {
-			if (show_errors) {
-			}
 			return ParseFailed;
 		}
 
drivers/staging/rtl8723bs/core/rtw_io.c +1 -1
index ed01354f58bd..25fc52e557d1 100644
@@ -174,8 +174,8 @@ int rtw_inc_and_chk_continual_io_error(struct dvobj_priv *dvobj)
 	int value = atomic_inc_return(&dvobj->continual_io_error);
 	if (value > MAX_CONTINUAL_IO_ERR) {
 		ret = true;
-	} else {
 	}
+
 	return ret;
 }
 
drivers/staging/rtl8723bs/core/rtw_ioctl_set.c +1 -2
index fbc8e5f60b0c..f6bd360f3183 100644
@@ -422,8 +422,7 @@ u8 rtw_set_802_11_disassociate(struct adapter *padapter)
 		rtw_indicate_disconnect(padapter);
 		/* modify for CONFIG_IEEE80211W, none 11w can use it */
 		rtw_free_assoc_resources_cmd(padapter);
-		if (_FAIL == rtw_pwr_wakeup(padapter))
-			{}
+		rtw_pwr_wakeup(padapter);
 	}
 
 	spin_unlock_bh(&pmlmepriv->lock);
drivers/staging/rtl8723bs/core/rtw_mlme.c +0 -16
index fa2f78948fee..f5eb13e4c36e 100644
@@ -519,8 +519,6 @@ void update_network(struct wlan_bssid_ex *dst, struct wlan_bssid_ex *src,
 	dst->Rssi = rssi_final;
 
 	#if defined(DBG_RX_SIGNAL_DISPLAY_SSID_MONITORED) && 1
-	if (strcmp(dst->Ssid.Ssid, DBG_RX_SIGNAL_DISPLAY_SSID_MONITORED) == 0) {
-	}
 	#endif
 }
 
@@ -1051,8 +1049,6 @@ void rtw_scan_abort(struct adapter *adapter)
 	}
 
 	if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY)) {
-		if (!adapter->bDriverStopped && !adapter->bSurpriseRemoved)
-			{}
 		rtw_indicate_scan_done(adapter, true);
 	}
 	pmlmeext->scan_abort = false;
@@ -1705,9 +1701,6 @@ void rtw_dynamic_check_timer_handler(struct adapter *adapter)
 	if (adapter->net_closed)
 		return;
 
-	if (is_primary_adapter(adapter))
-		{}
-
 	if ((adapter_to_pwrctl(adapter)->bFwCurrentInPSMode)
 		&& !(hal_btcoex_IsBtControlLps(adapter))
 		) {
@@ -1884,9 +1877,6 @@ static int rtw_check_join_candidate(struct mlme_priv *mlme
 		updated = true;
 	}
 
-	if (updated) {
-	}
-
 exit:
 	return updated;
 }
@@ -2350,8 +2340,6 @@ void rtw_ht_use_default_setting(struct adapter *padapter)
 		if (TEST_FLAG(pregistrypriv->ldpc_cap, BIT5))
 			SET_FLAG(phtpriv->ldpc_cap, LDPC_HT_ENABLE_TX);
 	}
-	if (phtpriv->ldpc_cap)
-		{}
 
 	/*  STBC */
 	rtw_hal_get_def_var(padapter, HAL_DEF_TX_STBC, (u8 *)&bHwSTBCSupport);
@@ -2365,8 +2353,6 @@ void rtw_ht_use_default_setting(struct adapter *padapter)
 		if (TEST_FLAG(pregistrypriv->stbc_cap, BIT4))
 			SET_FLAG(phtpriv->stbc_cap, STBC_HT_ENABLE_RX);
 	}
-	if (phtpriv->stbc_cap)
-		{}
 
 	/*  Beamforming setting */
 	rtw_hal_get_def_var(padapter, HAL_DEF_EXPLICIT_BEAMFORMER, (u8 *)&bHwSupportBeamformer);
@@ -2644,8 +2630,6 @@ void rtw_update_ht_cap(struct adapter *padapter, u8 *pie, uint ie_len, u8 channe
 	pmlmeinfo->SM_PS =
 		(le16_to_cpu(pmlmeinfo->HT_caps.u.HT_cap_element.HT_caps_info) &
 		 0x0C) >> 2;
-	if (pmlmeinfo->SM_PS == WLAN_HT_CAP_SM_PS_STATIC)
-		{}
 
 	/*  */
 	/*  Config current HT Protection mode. */
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c +2 -38
index 7ad0d680fffa..b889e1214ef2 100644
@@ -1373,8 +1373,7 @@ unsigned int OnAssocReq(struct adapter *padapter, union recv_frame *precv_frame)
 
 
 	/* get a unique AID */
-	if (pstat->aid > 0) {
-	} else {
+	if (pstat->aid == 0) {
 		for (pstat->aid = 1; pstat->aid <= NUM_STA; pstat->aid++)
 			if (pstapriv->sta_aid[pstat->aid - 1] == NULL)
 				break;
@@ -2684,12 +2683,6 @@ int issue_probereq_ex(struct adapter *padapter, struct ndis_802_11_ssid *pssid,
 		#endif
 	}
 
-	if (try_cnt && wait_ms) {
-		if (da)
-			{}
-		else
-			{}
-	}
 exit:
 	return ret;
 }
@@ -3044,12 +3037,10 @@ void issue_assocreq(struct adapter *padapter)
 			if ((pmlmeinfo->network.SupportedRates[i]|IEEE80211_BASIC_RATE_MASK)
 					== (sta_bssrate[j]|IEEE80211_BASIC_RATE_MASK)) {
 				break;
-			} else {
 			}
 		}
 
-		if (j == sta_bssrate_len) {
-		} else {
+		if (j != sta_bssrate_len) {
 			/*  the rate is supported by STA */
 			bssrate[index++] = pmlmeinfo->network.SupportedRates[i];
 		}
@@ -3252,12 +3243,6 @@ int issue_nulldata(struct adapter *padapter, unsigned char *da, unsigned int pow
 		#endif
 	}
 
-	if (try_cnt && wait_ms) {
-		if (da)
-			{}
-		else
-			{}
-	}
 exit:
 	return ret;
 }
@@ -3394,12 +3379,6 @@ int issue_qos_nulldata(struct adapter *padapter, unsigned char *da, u16 tid, int
 		#endif
 	}
 
-	if (try_cnt && wait_ms) {
-		if (da)
-			{}
-		else
-			{}
-	}
 exit:
 	return ret;
 }
@@ -3495,12 +3474,6 @@ int issue_deauth_ex(struct adapter *padapter, u8 *da, unsigned short reason, int
 		#endif
 	}
 
-	if (try_cnt && wait_ms) {
-		if (da)
-			{}
-		else
-			{}
-	}
 exit:
 	return ret;
 }
@@ -3915,7 +3888,6 @@ unsigned int send_beacon(struct adapter *padapter)
 	u8 bxmitok = false;
 	int	issue = 0;
 	int poll = 0;
-	unsigned long start = jiffies;
 
 	rtw_hal_set_hwreg(padapter, HW_VAR_BCN_VALID, NULL);
 	rtw_hal_set_hwreg(padapter, HW_VAR_DL_BCN_SEL, NULL);
@@ -3938,12 +3910,6 @@ unsigned int send_beacon(struct adapter *padapter)
 	if (false == bxmitok) {
 		return _FAIL;
 	} else {
-		unsigned long passing_time = jiffies_to_msecs(jiffies - start);
-
-		if (passing_time > 100 || issue > 3)
-			{}
-		/* else */
-
 		return _SUCCESS;
 	}
 }
@@ -4225,8 +4191,6 @@ u8 collect_bss_info(struct adapter *padapter, union recv_frame *precv_frame, str
 	}
 
 	#if defined(DBG_RX_SIGNAL_DISPLAY_SSID_MONITORED) & 1
-	if (strcmp(bssid->Ssid.Ssid, DBG_RX_SIGNAL_DISPLAY_SSID_MONITORED) == 0) {
-	}
 	#endif
 
 	/*  mark bss info receiving from nearby channel as SignalQuality 101 */
drivers/staging/rtl8723bs/core/rtw_pwrctrl.c +3 -18
index 22a3174533bb..8b2993e817a0 100644
@@ -249,8 +249,7 @@ void rtw_set_rpwm(struct adapter *padapter, u8 pslv)
 
 	pslv = PS_STATE(pslv);
 
-	if (pwrpriv->brpwmtimeout) {
-	} else {
+	if (!pwrpriv->brpwmtimeout) {
 		if (pwrpriv->rpwm == pslv ||
 		    (pwrpriv->rpwm >= PS_STATE_S2 && pslv >= PS_STATE_S2))
 			return;
@@ -535,8 +534,7 @@ void LeaveAllPowerSaveModeDirect(struct adapter *Adapter)
 		rtw_lps_ctrl_wk_cmd(pri_padapter, LPS_CTRL_LEAVE, 0);
 	} else {
 		if (pwrpriv->rf_pwrstate == rf_off)
-			if (!ips_leave(pri_padapter))
-				{}
+			ips_leave(pri_padapter);
 	}
 }
 
@@ -569,8 +567,7 @@ void LeaveAllPowerSaveMode(struct adapter *Adapter)
 		LPS_Leave_check(Adapter);
 	} else {
 		if (adapter_to_pwrctl(Adapter)->rf_pwrstate == rf_off) {
-			if (!ips_leave(Adapter))
-				{}
+			ips_leave(Adapter);
 		}
 	}
 }
@@ -1059,10 +1056,6 @@ int _rtw_pwr_wakeup(struct adapter *padapter, u32 ips_deffer_ms, const char *cal
 	if (pwrpriv->ps_processing) {
 		while (pwrpriv->ps_processing && jiffies_to_msecs(jiffies - start) <= 3000)
 			mdelay(10);
-		if (pwrpriv->ps_processing)
-			{}
-		else
-			{}
 	}
 
 	if (!(pwrpriv->bInternalAutoSuspend) && pwrpriv->bInSuspend) {
@@ -1070,10 +1063,6 @@ int _rtw_pwr_wakeup(struct adapter *padapter, u32 ips_deffer_ms, const char *cal
 		) {
 			mdelay(10);
 		}
-		if (pwrpriv->bInSuspend)
-			{}
-		else
-			{}
 	}
 
 	/* System suspend is not allowed to wakeup */
@@ -1174,8 +1163,6 @@ void rtw_ps_deny(struct adapter *padapter, enum ps_deny_reason reason)
 	pwrpriv = adapter_to_pwrctl(padapter);
 
 	mutex_lock(&pwrpriv->lock);
-	if (pwrpriv->ps_deny & BIT(reason)) {
-	}
 	pwrpriv->ps_deny |= BIT(reason);
 	mutex_unlock(&pwrpriv->lock);
 }
@@ -1191,8 +1178,6 @@ void rtw_ps_deny_cancel(struct adapter *padapter, enum ps_deny_reason reason)
 	pwrpriv = adapter_to_pwrctl(padapter);
 
 	mutex_lock(&pwrpriv->lock);
-	if ((pwrpriv->ps_deny & BIT(reason)) == 0) {
-	}
 	pwrpriv->ps_deny &= ~BIT(reason);
 	mutex_unlock(&pwrpriv->lock);
 }
drivers/staging/rtl8723bs/core/rtw_recv.c +0 -7
index fac25dd0f174..71ec5af0455d 100644
@@ -248,9 +248,6 @@ u32 rtw_free_uc_swdec_pending_queue(struct adapter *adapter)
 		cnt++;
 	}
 
-	if (cnt)
-		{}
-
 	return cnt;
 }
 
@@ -367,7 +364,6 @@ static signed int recvframe_chkmic(struct adapter *adapter,  union recv_frame *p
 
 				if ((prxattrib->bdecrypted == true) && (brpt_micerror == true)) {
 					rtw_handle_tkip_mic_err(adapter, (u8)IS_MCAST(prxattrib->ra));
-				} else {
 				}
 
 				res = _FAIL;
@@ -2157,9 +2153,6 @@ static int recv_func(struct adapter *padapter, union recv_frame *rframe)
 			cnt++;
 			recv_func_posthandle(padapter, pending_frame);
 		}
-
-		if (cnt)
-			{}
 	}
 
 	ret = recv_func_prehandle(padapter, rframe);
drivers/staging/rtl8723bs/core/rtw_sta_mgt.c +0 -6
index 2afda4f7d58c..6e5a0841950c 100644
@@ -106,17 +106,11 @@ inline int rtw_stainfo_offset(struct sta_priv *stapriv, struct sta_info *sta)
 {
 	int offset = (((u8 *)sta) - stapriv->pstainfo_buf)/sizeof(struct sta_info);
 
-	if (!stainfo_offset_valid(offset))
-		{}
-
 	return offset;
 }
 
 inline struct sta_info *rtw_get_stainfo_by_offset(struct sta_priv *stapriv, int offset)
 {
-	if (!stainfo_offset_valid(offset))
-		{}
-
 	return (struct sta_info *)(stapriv->pstainfo_buf + offset * sizeof(struct sta_info));
 }
 
drivers/staging/rtl8723bs/core/rtw_wlan_util.c +0 -8
index 0a098bddf135..d6579c2b21f6 100644
@@ -379,9 +379,6 @@ void set_channel_bwmode(struct adapter *padapter, unsigned char channel, unsigne
 {
 	u8 center_ch, chnl_offset80 = HAL_PRIME_CHNL_OFFSET_DONT_CARE;
 
-	if (padapter->bNotifyChannelChange)
-		{}
-
 	center_ch = rtw_get_center_ch(channel, bwmode, channel_offset);
 
 	if (bwmode == CHANNEL_WIDTH_80) {
@@ -626,11 +623,6 @@ static s16 _rtw_camid_search(struct adapter *adapter, u8 *addr, s16 kid)
 		break;
 	}
 
-	if (addr)
-		{}
-	else
-		{}
-
 	return cam_id;
 }
 
drivers/staging/rtl8723bs/core/rtw_xmit.c +0 -24
index 62429571151c..1af4aad59b8f 100644
@@ -1425,7 +1425,6 @@ static struct xmit_buf *__rtw_alloc_cmd_xmitbuf(struct xmit_priv *pxmitpriv,
 		if (pxmitbuf->sctx) {
 			rtw_sctx_done_err(&pxmitbuf->sctx, RTW_SCTX_DONE_BUF_ALLOC);
 		}
-	} else {
 	}
 
 	return pxmitbuf;
@@ -1561,8 +1560,6 @@ struct xmit_buf *rtw_alloc_xmitbuf(struct xmit_priv *pxmitpriv)
 		}
 	}
 	#ifdef DBG_XMIT_BUF
-	else
-		{}
 	#endif
 
 	spin_unlock_irqrestore(&pfree_xmitbuf_queue->lock, irqL);
@@ -1988,8 +1985,6 @@ s32 rtw_xmit(struct adapter *padapter, struct sk_buff **ppkt)
 	pxmitframe = rtw_alloc_xmitframe(pxmitpriv);
 
 	if (jiffies_to_msecs(jiffies - start) > 2000) {
-		if (drop_cnt)
-			{}
 		start = jiffies;
 		drop_cnt = 0;
 	}
@@ -2590,26 +2585,9 @@ int rtw_sctx_wait(struct submit_ctx *sctx, const char *msg)
 	return ret;
 }
 
-static bool rtw_sctx_chk_warning_status(int status)
-{
-	switch (status) {
-	case RTW_SCTX_DONE_UNKNOWN:
-	case RTW_SCTX_DONE_BUF_ALLOC:
-	case RTW_SCTX_DONE_BUF_FREE:
-
-	case RTW_SCTX_DONE_DRV_STOP:
-	case RTW_SCTX_DONE_DEV_REMOVE:
-		return true;
-	default:
-		return false;
-	}
-}
-
 void rtw_sctx_done_err(struct submit_ctx **sctx, int status)
 {
 	if (*sctx) {
-		if (rtw_sctx_chk_warning_status(status))
-			{}
 		(*sctx)->status = status;
 		complete(&((*sctx)->done));
 		*sctx = NULL;
@@ -2638,6 +2616,4 @@ void rtw_ack_tx_done(struct xmit_priv *pxmitpriv, int status)
 
 	if (pxmitpriv->ack_tx)
 		rtw_sctx_done_err(&pack_tx_ops, status);
-	else
-		{}
 }
drivers/staging/rtl8723bs/hal/hal_com.c +2 -4
index da617b5343f5..509eac352c15 100644
@@ -1648,8 +1648,6 @@ void rtw_bb_rf_gain_offset(struct adapter *padapter)
 			/* res |= (padapter->eeprompriv.EEPROMRFGainVal & 0x0f)<< 15; */
 			/* rtw_hal_write_rfreg(padapter, RF_PATH_A, REG_RF_BB_GAIN_OFFSET, RF_GAIN_OFFSET_MASK, res); */
 			res = rtw_hal_read_rfreg(padapter, RF_PATH_A, 0x7f, 0xffffffff);
-		} else
-			{}
-	} else
-		{}
+		}
+	}
 }
drivers/staging/rtl8723bs/hal/hal_com_phycfg.c +7 -25
index db8f4aa43a94..de73e6504d9c 100644
@@ -88,8 +88,7 @@ u8 PHY_GetTxPowerByRateBase(struct adapter *Adapter, u8 Band, u8 RfPath,
 		default:
 			break;
 		}
-	} else
-		{}
+	}
 
 	return value;
 }
@@ -177,8 +176,7 @@ phy_SetTxPowerByRateBase(
 		default:
 			break;
 		}
-	} else
-		{}
+	}
 }
 
 static void
@@ -770,9 +768,7 @@ void PHY_StoreTxPowerByRate(
 			pHalData->pwrGroupCnt++;
 		else if (RegAddr == rTxAGC_B_Mcs15_Mcs12 && pHalData->rf_type != RF_1T1R)
 			pHalData->pwrGroupCnt++;
-	} else
-		{}
-
+	}
 }
 
 static void
@@ -963,8 +959,7 @@ void PHY_SetTxPowerIndexByRateSection(
 					       pHalData->CurrentChannelBW,
 					       Channel, vhtRates4T,
 					       ARRAY_SIZE(vhtRates4T));
-	} else
-		{}
+	}
 }
 
 static bool phy_GetChnlIndex(u8 Channel, u8 *ChannelIdx)
@@ -1020,8 +1015,6 @@ u8 PHY_GetTxPowerIndexBase(
 			txPower = pHalData->Index24G_CCK_Base[RFPath][chnlIdx];
 		else if (MGN_6M <= Rate)
 			txPower = pHalData->Index24G_BW40_Base[RFPath][chnlIdx];
-		else
-			{}
 
 		/*  OFDM-1T */
 		if ((MGN_6M <= Rate && Rate <= MGN_54M) && !IS_CCK_RATE(Rate)) {
@@ -1063,8 +1056,6 @@ u8 PHY_GetTxPowerIndexBase(
 	} else {/* 3 ============================== 5 G ============================== */
 		if (MGN_6M <= Rate)
 			txPower = pHalData->Index5G_BW40_Base[RFPath][chnlIdx];
-		else
-			{}
 
 		/*  OFDM-1T */
 		if ((MGN_6M <= Rate && Rate <= MGN_54M) && !IS_CCK_RATE(Rate)) {
@@ -1520,11 +1511,7 @@ static s8 phy_GetChannelIndexOfTxPowerLimit(u8 Band, u8 Channel)
 			if (channel5G[i] == Channel)
 				channelIndex = i;
 		}
-	} else
-		{}
-
-	if (channelIndex == -1)
-		{}
+	}
 
 	return channelIndex;
 }
@@ -1635,9 +1622,6 @@ s8 phy_get_tx_pwr_lmt(struct adapter *adapter, u32 reg_pwr_tbl_sel,
 	idx_bandwidth = get_bandwidth_idx(bandwidth);
 	idx_rate_sctn = get_rate_sctn_idx(data_rate);
 
-	if (band_type == BAND_ON_5G && idx_rate_sctn == 0)
-		{}
-
 	/*  workaround for wrong index combination to obtain tx power limit, */
 	/*  OFDM only exists in BW 20M */
 	/*  CCK table will only be given in BW 20M */
@@ -1692,7 +1676,6 @@ s8 phy_get_tx_pwr_lmt(struct adapter *adapter, u32 reg_pwr_tbl_sel,
 					       [idx_rate_sctn]
 					       [idx_channel]
 					       [rf_path];
-	} else {
 	}
 
 	return pwr_lmt;
@@ -1831,9 +1814,8 @@ void PHY_SetTxPowerLimit(
 	u8 regulation = 0, bandwidth = 0, rateSection = 0, channel;
 	s8 powerLimit = 0, prevPowerLimit, channelIndex;
 
-	if (!GetU1ByteIntegerFromStringInDecimal((s8 *)Channel, &channel) ||
-		 !GetU1ByteIntegerFromStringInDecimal((s8 *)PowerLimit, &powerLimit))
-		{}
+	GetU1ByteIntegerFromStringInDecimal((s8 *)Channel, &channel);
+	GetU1ByteIntegerFromStringInDecimal((s8 *)PowerLimit, &powerLimit);
 
 	powerLimit = powerLimit > MAX_POWER_INDEX ? MAX_POWER_INDEX : powerLimit;
 
drivers/staging/rtl8723bs/hal/hal_intf.c +1 -9
index 71afbb17448c..bc9ae2088754 100644
@@ -120,8 +120,8 @@ uint rtw_hal_deinit(struct adapter *padapter)
 	if (status == _SUCCESS) {
 		padapter = dvobj->padapters;
 		padapter->hw_init_completed = false;
-	} else {
 	}
+
 	return status;
 }
 
@@ -173,16 +173,12 @@ void rtw_hal_enable_interrupt(struct adapter *padapter)
 {
 	if (padapter->HalFunc.enable_interrupt)
 		padapter->HalFunc.enable_interrupt(padapter);
-	else
-		{}
 }
 
 void rtw_hal_disable_interrupt(struct adapter *padapter)
 {
 	if (padapter->HalFunc.disable_interrupt)
 		padapter->HalFunc.disable_interrupt(padapter);
-	else
-		{}
 }
 
 u8 rtw_hal_check_ips_status(struct adapter *padapter)
@@ -190,8 +186,6 @@ u8 rtw_hal_check_ips_status(struct adapter *padapter)
 	u8 val = false;
 	if (padapter->HalFunc.check_ips_status)
 		val = padapter->HalFunc.check_ips_status(padapter);
-	else
-		{}
 
 	return val;
 }
@@ -443,8 +437,6 @@ s32 rtw_hal_fill_h2c_cmd(struct adapter *padapter, u8 ElementID, u32 CmdLen, u8
 
 	if (padapter->HalFunc.fill_h2c_cmd)
 		ret = padapter->HalFunc.fill_h2c_cmd(padapter, ElementID, CmdLen, pCmdBuffer);
-	else
-		{}
 
 	return ret;
 }
drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c +1 -9
index 7369e2c5fc39..66140fcfb40f 100644
@@ -389,11 +389,6 @@ void rtl8723b_set_FwPwrMode_cmd(struct adapter *padapter, u8 psmode)
 	u8 u1H2CPwrModeParm[H2C_PWRMODE_LEN] = {0};
 	u8 PowerState = 0, awake_intvl = 1, byte5 = 0, rlbm = 0;
 
-	if (pwrpriv->dtim > 0)
-		{}
-	else
-		{}
-
 	if (pwrpriv->dtim > 0 && pwrpriv->dtim < 16)
 		awake_intvl = pwrpriv->dtim+1;/* DTIM = (awake_intvl - 1) */
 	else
@@ -468,7 +463,6 @@ void rtl8723b_set_FwPwrMode_cmd(struct adapter *padapter, u8 psmode)
 			pmlmeext->bcn_cnt = 0;
 			pmlmeext->adaptive_tsf_done = true;
 
-		} else {
 		}
 
 /* offload to FW if fw version > v15.10
@@ -732,9 +726,7 @@ void rtl8723b_download_rsvd_page(struct adapter *padapter, u8 mstatus)
 		} while (!bcn_valid && DLBcnCount <= 100 && !padapter->bSurpriseRemoved && !padapter->bDriverStopped);
 
 		if (padapter->bSurpriseRemoved || padapter->bDriverStopped) {
-		} else if (!bcn_valid)
-			{}
-		else {
+		} else {
 			struct pwrctrl_priv *pwrctl = adapter_to_pwrctl(padapter);
 			pwrctl->fw_psmode_iface_id = padapter->iface_id;
 		}
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c +0 -7
index fda356e19da7..1930049756b2 100644
@@ -33,9 +33,6 @@ static void _FWDownloadEnable(struct adapter *padapter, bool enable)
 			msleep(1);
 		} while (count++ < 100);
 
-		if (count > 0)
-			{}
-
 		/*  8051 reset */
 		tmp = rtw_read8(padapter, REG_MCUFWDL+2);
 		rtw_write8(padapter, REG_MCUFWDL+2, tmp&0xf7);
@@ -2695,8 +2692,6 @@ u8 SCMapping_8723B(struct adapter *Adapter, struct pkt_attrib *pattrib)
 				SCSettingOfDesc = VHT_DATA_SC_40_LOWER_OF_80MHZ;
 			else if (pHalData->nCur80MhzPrimeSC == HAL_PRIME_CHNL_OFFSET_UPPER)
 				SCSettingOfDesc = VHT_DATA_SC_40_UPPER_OF_80MHZ;
-			else
-				{}
 		} else {
 			if ((pHalData->nCur40MhzPrimeSC == HAL_PRIME_CHNL_OFFSET_LOWER) && (pHalData->nCur80MhzPrimeSC == HAL_PRIME_CHNL_OFFSET_LOWER))
 				SCSettingOfDesc = VHT_DATA_SC_20_LOWEST_OF_80MHZ;
@@ -2706,8 +2701,6 @@ u8 SCMapping_8723B(struct adapter *Adapter, struct pkt_attrib *pattrib)
 				SCSettingOfDesc = VHT_DATA_SC_20_UPPER_OF_80MHZ;
 			else if ((pHalData->nCur40MhzPrimeSC == HAL_PRIME_CHNL_OFFSET_UPPER) && (pHalData->nCur80MhzPrimeSC == HAL_PRIME_CHNL_OFFSET_UPPER))
 				SCSettingOfDesc = VHT_DATA_SC_20_UPPERST_OF_80MHZ;
-			else
-				{}
 		}
 	} else if (pHalData->CurrentChannelBW == CHANNEL_WIDTH_40) {
 		if (pattrib->bwmode == CHANNEL_WIDTH_40) {
drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c +0 -3
index 5c1aa45c2984..973ade5f0d54 100644
@@ -741,9 +741,6 @@ static void phy_SwChnlAndSetBwMode8723B(struct adapter *Adapter)
 {
 	struct hal_com_data *pHalData = GET_HAL_DATA(Adapter);
 
-	if (Adapter->bNotifyChannelChange) {
-	}
-
 	if (Adapter->bDriverStopped || Adapter->bSurpriseRemoved)
 		return;
 
drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c +0 -3
index 116f5e6644c3..38d798cfe413 100644
@@ -420,9 +420,6 @@ s32 rtl8723bs_init_recv_priv(struct adapter *padapter)
 				alignment = tmpaddr & (RECVBUFF_ALIGN_SZ-1);
 				skb_reserve(precvbuf->pskb, (RECVBUFF_ALIGN_SZ - alignment));
 			}
-
-			if (!precvbuf->pskb) {
-			}
 		}
 
 		list_add_tail(&precvbuf->list, &precvpriv->free_recv_buf_queue.queue);
drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c +0 -2
index 2f4601aab9d5..b18d20242d6d 100644
@@ -26,8 +26,6 @@ static u8 rtw_sdio_wait_enough_TxOQT_space(struct adapter *padapter, u8 agg_num)
 		HalQueryTxOQTBufferStatus8723BSdio(padapter);
 
 		if ((++n % 60) == 0) {
-			if ((n % 300) == 0) {
-			}
 			msleep(1);
 			/* yield(); */
 		}
drivers/staging/rtl8723bs/hal/sdio_halinit.c +0 -4
index 05524cd72c17..839fd32fc8dc 100644
@@ -960,7 +960,6 @@ static u32 rtl8723bs_hal_deinit(struct adapter *padapter)
 						cnt++;
 						mdelay(10);
 					} while (cnt < 100 && (val8 != 0xEA));
-				} else {
 				}
 
 				adapter_to_pwrctl(padapter)->pre_ips_type = 0;
@@ -1110,9 +1109,6 @@ static void _ReadEfuseInfo8723BS(struct adapter *padapter)
 	/*  This part read and parse the eeprom/efuse content */
 	/*  */
 
-	if (sizeof(pEEPROM->efuse_eeprom_data) < HWSET_MAX_SIZE_8723B)
-		{}
-
 	hwinfo = pEEPROM->efuse_eeprom_data;
 
 	Hal_InitPGData(padapter, hwinfo);
drivers/staging/rtl8723bs/hal/sdio_ops.c +1 -6
index cdfc8cf4aba4..d417b1372fe2 100644
@@ -958,8 +958,7 @@ void sd_int_dpc(struct adapter *adapter)
 			}
 		} else {
 			/* Error handling for malloc fail */
-			if (rtw_cbuf_push(adapter->evtpriv.c2h_queue, NULL) != _SUCCESS)
-				{}
+			rtw_cbuf_push(adapter->evtpriv.c2h_queue, NULL);
 			_set_workitem(&adapter->evtpriv.c2h_wk);
 		}
 	}
@@ -997,10 +996,6 @@ void sd_int_dpc(struct adapter *adapter)
 			if (!hisr)
 				break;
 		} while (1);
-
-		if (alloc_fail_time == 10)
-			{}
-
 	}
 }
 
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c +6 -32
index 62106d4c7006..4506ddf19d17 100644
@@ -274,13 +274,9 @@ struct cfg80211_bss *rtw_cfg80211_inform_bss(struct adapter *padapter, struct wl
 			{
 				DBG_8192C("ssid =%s, len =%d\n", pssid->Ssid, pssid->SsidLength);
 
-				if (ssids[0].ssid_len == 0) {
-				}
-				else if (pssid->SsidLength == ssids[0].ssid_len &&
-					!memcmp(pssid->Ssid, ssids[0].ssid, ssids[0].ssid_len))
-				{
-				}
-				else
+				if (ssids[0].ssid_len != 0 &&
+				    (pssid->SsidLength != ssids[0].ssid_len ||
+				     memcmp(pssid->Ssid, ssids[0].ssid, ssids[0].ssid_len)))
 				{
 					if (psr)
 						*psr = 0; /* clear sr */
@@ -405,10 +401,7 @@ void rtw_cfg80211_ibss_indicate_connect(struct adapter *padapter)
 		{
 
 			memcpy(&cur_network->network, pnetwork, sizeof(struct wlan_bssid_ex));
-			if (!rtw_cfg80211_inform_bss(padapter, cur_network))
-				{}
-			else
-				{}
+			rtw_cfg80211_inform_bss(padapter, cur_network);
 		}
 		else
 		{
@@ -419,9 +412,7 @@ void rtw_cfg80211_ibss_indicate_connect(struct adapter *padapter)
 			if (!memcmp(&(scanned->network.Ssid), &(pnetwork->Ssid), sizeof(struct ndis_802_11_ssid))
 				&& !memcmp(scanned->network.MacAddress, pnetwork->MacAddress, sizeof(NDIS_802_11_MAC_ADDRESS))
 			) {
-				if (!rtw_cfg80211_inform_bss(padapter, scanned)) {
-				} else {
-				}
+				rtw_cfg80211_inform_bss(padapter, scanned);
 			} else {
 				rtw_warn_on(1);
 			}
@@ -462,9 +453,7 @@ void rtw_cfg80211_indicate_connect(struct adapter *padapter)
 		if (!memcmp(scanned->network.MacAddress, pnetwork->MacAddress, sizeof(NDIS_802_11_MAC_ADDRESS))
 			&& !memcmp(&(scanned->network.Ssid), &(pnetwork->Ssid), sizeof(struct ndis_802_11_ssid))
 		) {
-			if (!rtw_cfg80211_inform_bss(padapter, scanned)) {
-			} else {
-			}
+			rtw_cfg80211_inform_bss(padapter, scanned);
 		} else {
 			rtw_warn_on(1);
 		}
@@ -2354,10 +2343,6 @@ static netdev_tx_t rtw_cfg80211_monitor_if_xmit_entry(struct sk_buff *skb, struc
 
 		DBG_8192C("RTW_Tx:da =%pM via "FUNC_NDEV_FMT"\n",
 			MAC_ARG(GetAddr1Ptr(buf)), FUNC_NDEV_ARG(ndev));
-		if (category == RTW_WLAN_CATEGORY_PUBLIC)
-			{}
-		else
-			{}
 
 		/* starting alloc mgmt frame to dump it */
 		pmgntframe = alloc_mgtxmitframe(pxmitpriv);
@@ -2773,10 +2758,6 @@ void rtw_cfg80211_rx_action(struct adapter *adapter, u8 *frame, uint frame_len,
 	rtw_action_frame_parse(frame, frame_len, &category, &action);
 
 	DBG_8192C("RTW_Rx:cur_ch =%d\n", channel);
-	if (msg)
-		{}
-	else
-		{}
 
 	freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_2GHZ);
 
@@ -2901,10 +2882,6 @@ static int cfg80211_rtw_mgmt_tx(struct wiphy *wiphy,
 	}
 
 	DBG_8192C("RTW_Tx:tx_ch =%d, da =%pM\n", tx_ch, MAC_ARG(GetAddr1Ptr(buf)));
-	if (category == RTW_WLAN_CATEGORY_PUBLIC)
-		{}
-	else
-		{}
 
 	rtw_ps_deny(padapter, PS_DENY_MGNT_TX);
 	if (_FAIL == rtw_pwr_wakeup(padapter)) {
@@ -2917,9 +2894,6 @@ static int cfg80211_rtw_mgmt_tx(struct wiphy *wiphy,
 		tx_ret = _cfg80211_rtw_mgmt_tx(padapter, tx_ch, buf, len);
 	} while (dump_cnt < dump_limit && tx_ret != _SUCCESS);
 
-	if (tx_ret != _SUCCESS || dump_cnt > 1) {
-	}
-
 	switch (type) {
 	case P2P_GO_NEGO_CONF:
 		rtw_clear_scan_deny(padapter);
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c +3 -31
index 91f540d50774..2392eb2b0458 100644
@@ -369,7 +369,6 @@ static int wpa_set_auth_algs(struct net_device *dev, u32 value)
 			padapter->securitypriv.ndisauthtype = Ndis802_11AuthModeOpen;
 			padapter->securitypriv.dot11AuthAlgrthm = dot11AuthAlgrthm_Open;
 		}
-	} else if (value & WLAN_AUTH_LEAP) {
 	} else {
 		ret = -EINVAL;
 	}
@@ -1223,7 +1222,6 @@ static int rtw_wx_set_scan(struct net_device *dev, struct iw_request_info *a,
 
 			spin_unlock_bh(&pmlmepriv->lock);
 
-		} else if (req->scan_type == IW_SCAN_TYPE_PASSIVE) {
 		}
 
 	} else if (wrqu->data.length >= WEXT_CSCAN_HEADER_SIZE
@@ -1412,9 +1410,6 @@ static int rtw_wx_set_essid(struct net_device *dev,
 	if (wrqu->essid.flags && wrqu->essid.length) {
 		len = (wrqu->essid.length < IW_ESSID_MAX_SIZE) ? wrqu->essid.length : IW_ESSID_MAX_SIZE;
 
-		if (wrqu->essid.length != 33)
-			{}
-
 		memset(&ndis_ssid, 0, sizeof(struct ndis_802_11_ssid));
 		ndis_ssid.SsidLength = len;
 		memcpy(ndis_ssid.Ssid, extra, len);
@@ -2204,9 +2199,7 @@ static int rtw_wx_set_channel_plan(struct net_device *dev,
 	struct adapter *padapter = rtw_netdev_priv(dev);
 	u8 channel_plan_req = (u8)(*((int *)wrqu));
 
-	if (_SUCCESS == rtw_set_chplan_cmd(padapter, channel_plan_req, 1, 1))
-		{}
-	 else
+	if (_SUCCESS != rtw_set_chplan_cmd(padapter, channel_plan_req, 1, 1))
 		return -EPERM;
 
 	return 0;
@@ -2360,8 +2353,6 @@ static int rtw_set_pid(struct net_device *dev,
 	if (selector < 3 && selector >= 0) {
 		padapter->pid[selector] = *(pdata+1);
 	}
-	else
-		{}
 
 exit:
 
@@ -2585,11 +2576,8 @@ static int rtw_dbg_port(struct net_device *dev,
 
 						for (i = 0; i < 16; i++) {
 							preorder_ctrl = &psta->recvreorder_ctrl[i];
-							if (preorder_ctrl->enable)
-								{}
 						}
 
-					} else {
 					}
 					break;
 				case 0x06:
@@ -2626,8 +2614,6 @@ static int rtw_dbg_port(struct net_device *dev,
 								if (extra_arg == psta->aid) {
 									for (j = 0; j < 16; j++) {
 										preorder_ctrl = &psta->recvreorder_ctrl[j];
-										if (preorder_ctrl->enable)
-											{}
 									}
 								}
 							}
@@ -2695,9 +2681,7 @@ static int rtw_dbg_port(struct net_device *dev,
 					/* default is set to enable 2.4GHZ for IOT issue with bufflao's AP at 5GHZ */
 					if (extra_arg == 0 || extra_arg == 1 || extra_arg == 2 || extra_arg == 3) {
 						pregpriv->rx_stbc = extra_arg;
-					} else
-						{}
-
+					}
 				}
 				break;
 				case 0x13: /* set ampdu_enable */
@@ -2706,9 +2690,7 @@ static int rtw_dbg_port(struct net_device *dev,
 					/*  0: disable, 0x1:enable (but wifi_spec should be 0), 0x2: force enable (don't care wifi_spec) */
 					if (extra_arg < 3) {
 						pregpriv->ampdu_enable = extra_arg;
-					} else
-						{}
-
+					}
 				}
 				break;
 				case 0x14:
@@ -3435,11 +3417,8 @@ static int rtw_del_sta(struct net_device *dev, struct ieee_param *param)
 
 		psta = NULL;
 
-	} else {
-		/* ret = -1; */
 	}
 
-
 	return ret;
 
 }
@@ -3535,7 +3514,6 @@ static int rtw_get_sta_wpaie(struct net_device *dev, struct ieee_param *param)
 			param->u.wpa_ie.len = copy_len;
 
 			memcpy(param->u.wpa_ie.reserved, psta->wpa_ie, copy_len);
-		} else {
 		}
 	} else {
 		ret = -1;
@@ -3674,16 +3652,10 @@ static int rtw_set_hidden_ssid(struct net_device *dev, struct ieee_param *param,
 		memcpy(ssid, ssid_ie+2, ssid_len);
 		ssid[ssid_len] = 0x0;
 
-		if (0)
-			{}
-
 		memcpy(pbss_network->Ssid.Ssid, (void *)ssid, ssid_len);
 		pbss_network->Ssid.SsidLength = ssid_len;
 		memcpy(pbss_network_ext->Ssid.Ssid, (void *)ssid, ssid_len);
 		pbss_network_ext->Ssid.SsidLength = ssid_len;
-
-		if (0)
-			{}
 	}
 
 	return ret;
drivers/staging/rtl8723bs/os_dep/os_intfs.c +0 -3
index 5062aeef169f..2a366b4e3716 100644
@@ -1088,7 +1088,6 @@ void rtw_dev_unload(struct adapter *padapter)
 
 		padapter->bup = false;
 
-	} else {
 	}
 }
 
@@ -1259,8 +1258,6 @@ static int rtw_resume_process_normal(struct adapter *padapter)
 
 	} else if (check_fwstate(pmlmepriv, WIFI_AP_STATE)) {
 		rtw_ap_restore_network(padapter);
-	} else if (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE)) {
-	} else {
 	}
 
 exit:
drivers/staging/rtl8723bs/os_dep/sdio_ops_linux.c +0 -20
index 827ce3013acb..6ece6daee499 100644
@@ -52,8 +52,6 @@ u8 sd_f0_read8(struct intf_hdl *pintfhdl, u32 addr, s32 *err)
 	v = sdio_f0_readb(func, addr, err);
 	if (claim_needed)
 		sdio_release_host(func);
-	if (err && *err)
-		{}
 	return v;
 }
 
@@ -217,8 +215,6 @@ u8 sd_read8(struct intf_hdl *pintfhdl, u32 addr, s32 *err)
 	v = sdio_readb(func, addr, err);
 	if (claim_needed)
 		sdio_release_host(func);
-	if (err && *err)
-		{}
 	return v;
 }
 
@@ -272,12 +268,6 @@ u32 sd_read32(struct intf_hdl *pintfhdl, u32 addr, s32 *err)
 				}
 			}
 		}
-
-		if (i == SD_IO_TRY_CNT)
-			{}
-		else
-			{}
-
 	}
 	return  v;
 }
@@ -306,8 +296,6 @@ void sd_write8(struct intf_hdl *pintfhdl, u32 addr, u8 v, s32 *err)
 	sdio_writeb(func, v, addr, err);
 	if (claim_needed)
 		sdio_release_host(func);
-	if (err && *err)
-		{}
 }
 
 void sd_write32(struct intf_hdl *pintfhdl, u32 addr, u32 v, s32 *err)
@@ -359,10 +347,6 @@ void sd_write32(struct intf_hdl *pintfhdl, u32 addr, u32 v, s32 *err)
 			}
 		}
 
-		if (i == SD_IO_TRY_CNT)
-			{}
-		else
-			{}
 	}
 }
 
@@ -415,8 +399,6 @@ s32 _sd_read(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, void *pdata)
 	}
 
 	err = sdio_memcpy_fromio(func, pdata, addr, cnt);
-	if (err)
-		{}
 
 	return err;
 }
@@ -514,8 +496,6 @@ s32 _sd_write(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, void *pdata)
 
 	size = cnt;
 	err = sdio_memcpy_toio(func, addr, pdata, size);
-	if (err)
-		{}
 
 	return err;
 }
drivers/staging/rtl8723bs/os_dep/xmit_linux.c +0 -1
index eea7b59f2034..0c9dfbaafcfd 100644
@@ -211,7 +211,6 @@ int _rtw_xmit_entry(struct sk_buff *pkt, struct net_device *pnetdev)
 			res = rtw_mlcst2unicst(padapter, pkt);
 			if (res)
 				goto exit;
-		} else {
 		}
 	}
 
Signature · 1 line
2.20.1
#8 lore raw

PATCH 7/19 drivers: rtl8723bs: rewrite comparison to null

In reply to Fabio Aiuto

fix following post-commit hook checkpatch warnings:

CHECK: Comparison to NULL could be written "!psta" 97: FILE: drivers/staging/rtl8723bs/core/rtw_ap.c:2115:
+ if (psta == NULL)

---
 drivers/staging/rtl8723bs/core/rtw_ap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8723bs/core/rtw_ap.c +1 -1
index 30afe9f4ceef..e7712391a87d 100644
@@ -2103,7 +2103,7 @@ void rtw_ap_restore_network(struct adapter *padapter)
 	for (i = 0; i < chk_alive_num; i++) {
 		psta = rtw_get_stainfo_by_offset(pstapriv, chk_alive_list[i]);
 
-		if (psta == NULL)
+		if (!psta)
 			continue;
 
 		if (psta->state & _FW_LINKED) {
Signature · 1 line
2.20.1
#13 lore raw

PATCH 8/19 staging: rtl8723bs: put constant on the right side in if condition

In reply to Fabio Aiuto

fix the following post-commit hook checkpatch warning:

WARNING: Comparisons should place the constant on the right side of the test 683: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:2204:
+ if (_SUCCESS != rtw_set_chplan_cmd(padapter, channel_plan_req, 1, 1))

---
 drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c +1 -1
index 2392eb2b0458..2f6516283248 100644
@@ -2199,7 +2199,7 @@ static int rtw_wx_set_channel_plan(struct net_device *dev,
 	struct adapter *padapter = rtw_netdev_priv(dev);
 	u8 channel_plan_req = (u8)(*((int *)wrqu));
 
-	if (_SUCCESS != rtw_set_chplan_cmd(padapter, channel_plan_req, 1, 1))
+	if (rtw_set_chplan_cmd(padapter, channel_plan_req, 1, 1) != _SUCCESS)
 		return -EPERM;
 
 	return 0;
Signature · 1 line
2.20.1
#14 lore raw

PATCH 9/19 staging: rtl8723bs: remove empty for cycles left by DBG_871X removal

In reply to Fabio Aiuto

remove empty for cycles and unused counter variables to suppress compiler warnings.

---
 drivers/staging/rtl8723bs/core/rtw_recv.c      | 4 ----
 drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 7 -------
 2 files changed, 11 deletions(-)
drivers/staging/rtl8723bs/core/rtw_recv.c +0 -4
index 71ec5af0455d..2d1201b70ab1 100644
@@ -1454,10 +1454,6 @@ static signed int validate_80211w_mgmt(struct adapter *adapter, union recv_frame
 
 static inline void dump_rx_packet(u8 *ptr)
 {
-	int i;
-
-	for (i = 0; i < 64; i = i+8)
-		{}
 }
 
 static signed int validate_recv_frame(struct adapter *adapter, union recv_frame *precv_frame)
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c +0 -7
index 2f6516283248..5d103d33a128 100644
@@ -571,13 +571,6 @@ static int rtw_set_wpa_ie(struct adapter *padapter, char *pie, unsigned short ie
 
 		memcpy(buf, pie, ielen);
 
-		/* dump */
-		{
-			int i;
-			for (i = 0; i < ielen; i = i + 8)
-				{}
-		}
-
 		if (ielen < RSN_HEADER_LEN) {
 			ret  = -1;
 			goto exit;
Signature · 1 line
2.20.1
#15 lore raw

PATCH 10/19 staging: rtl8723bs: remove empty tracing function dump_rx_packet

In reply to Fabio Aiuto

remove tracing function dump_rx_packet after DBG_871X removal.

---
 drivers/staging/rtl8723bs/core/rtw_recv.c | 12 ------------
 1 file changed, 12 deletions(-)
drivers/staging/rtl8723bs/core/rtw_recv.c +0 -12
index 2d1201b70ab1..cd76fe2afcd0 100644
@@ -1452,10 +1452,6 @@ static signed int validate_80211w_mgmt(struct adapter *adapter, union recv_frame
 
 }
 
-static inline void dump_rx_packet(u8 *ptr)
-{
-}
-
 static signed int validate_recv_frame(struct adapter *adapter, union recv_frame *precv_frame)
 {
 	/* shall check frame subtype, to / from ds, da, bssid */
@@ -1492,12 +1488,6 @@ static signed int validate_recv_frame(struct adapter *adapter, union recv_frame
 	pattrib->privacy = GetPrivacy(ptr);
 	pattrib->order = GetOrder(ptr);
 	rtw_hal_get_def_var(adapter, HAL_DEF_DBG_DUMP_RXPKT, &(bDumpRxPkt));
-	if (bDumpRxPkt == 1) /* dump all rx packets */
-		dump_rx_packet(ptr);
-	else if ((bDumpRxPkt == 2) && (type == WIFI_MGT_TYPE))
-		dump_rx_packet(ptr);
-	else if ((bDumpRxPkt == 3) && (type == WIFI_DATA_TYPE))
-		dump_rx_packet(ptr);
 
 	switch (type) {
 	case WIFI_MGT_TYPE: /* mgnt */
@@ -1529,8 +1519,6 @@ static signed int validate_recv_frame(struct adapter *adapter, union recv_frame
 			/*  get ether_type */
 			memcpy(&eth_type, ptr + pattrib->hdrlen + pattrib->iv_len + LLC_HEADER_SIZE, 2);
 			eth_type = ntohs((unsigned short) eth_type);
-			if ((bDumpRxPkt == 4) && (eth_type == 0x888e))
-				dump_rx_packet(ptr);
 #endif
 		}
 		break;
Signature · 1 line
2.20.1
#16 lore raw

PATCH 11/19 staging: rtl8723bs: remove empty #ifdef blocks after DBG_871X removal

In reply to Fabio Aiuto

remove #ifdef and blocks #if defined() blocks left empty after DBG_871X removal.

---
 drivers/staging/rtl8723bs/core/rtw_ap.c       |  7 --
 drivers/staging/rtl8723bs/core/rtw_mlme.c     | 14 ----
 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 18 -----
 drivers/staging/rtl8723bs/core/rtw_recv.c     | 76 -------------------
 drivers/staging/rtl8723bs/core/rtw_sta_mgt.c  |  2 -
 drivers/staging/rtl8723bs/core/rtw_xmit.c     | 20 -----
 .../staging/rtl8723bs/hal/rtl8723bs_xmit.c    |  2 -
 .../staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 16 ----
 .../staging/rtl8723bs/os_dep/ioctl_linux.c    | 18 -----
 drivers/staging/rtl8723bs/os_dep/xmit_linux.c |  4 -
 10 files changed, 177 deletions(-)
drivers/staging/rtl8723bs/core/rtw_ap.c +0 -7
index e7712391a87d..015c1d74a92d 100644
@@ -170,9 +170,6 @@ static void update_BCNTIM(struct adapter *padapter)
 u8 chk_sta_is_alive(struct sta_info *psta);
 u8 chk_sta_is_alive(struct sta_info *psta)
 {
-	#ifdef DBG_EXPIRATION_CHK
-	#endif
-
 	sta_update_last_rx_pkts(psta);
 
 	return true;
@@ -194,8 +191,6 @@ void expire_timeout_chk(struct adapter *padapter)
 	plist = get_next(phead);
 
 	/* check auth_queue */
-	#ifdef DBG_EXPIRATION_CHK
-	#endif
 	while (phead != plist) {
 		psta = container_of(plist, struct sta_info, auth_list);
 
@@ -225,8 +220,6 @@ void expire_timeout_chk(struct adapter *padapter)
 	plist = get_next(phead);
 
 	/* check asoc_queue */
-	#ifdef DBG_EXPIRATION_CHK
-	#endif
 	while (phead != plist) {
 		psta = container_of(plist, struct sta_info, asoc_list);
 		plist = get_next(plist);
drivers/staging/rtl8723bs/core/rtw_mlme.c +0 -14
index f5eb13e4c36e..9af75f683a18 100644
@@ -479,11 +479,6 @@ void update_network(struct wlan_bssid_ex *dst, struct wlan_bssid_ex *src,
 	u8 sq_final;
 	long rssi_final;
 
-	#if defined(DBG_RX_SIGNAL_DISPLAY_SSID_MONITORED) && 1
-	if (strcmp(dst->Ssid.Ssid, DBG_RX_SIGNAL_DISPLAY_SSID_MONITORED) == 0) {
-	}
-	#endif
-
 	/* The rule below is 1/5 for sample value, 4/5 for history value */
 	if (check_fwstate(&padapter->mlmepriv, _FW_LINKED) && is_same_network(&(padapter->mlmepriv.cur_network.network), src, 0)) {
 		/* Take the recvpriv's value for the connected AP*/
@@ -517,9 +512,6 @@ void update_network(struct wlan_bssid_ex *dst, struct wlan_bssid_ex *src,
 	dst->PhyInfo.SignalStrength = ss_final;
 	dst->PhyInfo.SignalQuality = sq_final;
 	dst->Rssi = rssi_final;
-
-	#if defined(DBG_RX_SIGNAL_DISPLAY_SSID_MONITORED) && 1
-	#endif
 }
 
 static void update_current_network(struct adapter *adapter, struct wlan_bssid_ex *pnetwork)
@@ -1119,8 +1111,6 @@ static struct sta_info *rtw_joinbss_update_stainfo(struct adapter *padapter, str
 			preorder_ctrl = &psta->recvreorder_ctrl[i];
 			preorder_ctrl->enable = false;
 			preorder_ctrl->indicate_seq = 0xffff;
-			#ifdef DBG_RX_SEQ
-			#endif
 			preorder_ctrl->wend_b = 0xffff;
 			preorder_ctrl->wsize_b = 64;/* max_ampdu_sz;ex. 32(kbytes) -> wsize_b =32 */
 		}
@@ -1132,8 +1122,6 @@ static struct sta_info *rtw_joinbss_update_stainfo(struct adapter *padapter, str
 				preorder_ctrl = &bmc_sta->recvreorder_ctrl[i];
 				preorder_ctrl->enable = false;
 				preorder_ctrl->indicate_seq = 0xffff;
-				#ifdef DBG_RX_SEQ
-				#endif
 				preorder_ctrl->wend_b = 0xffff;
 				preorder_ctrl->wsize_b = 64;/* max_ampdu_sz;ex. 32(kbytes) -> wsize_b =32 */
 			}
@@ -1165,8 +1153,6 @@ static void rtw_joinbss_update_network(struct adapter *padapter, struct wlan_net
 	padapter->recvpriv.signal_qual = ptarget_wlan->network.PhyInfo.SignalQuality;
 	/* the ptarget_wlan->network.Rssi is raw data, we use ptarget_wlan->network.PhyInfo.SignalStrength instead (has scaled) */
 	padapter->recvpriv.rssi = translate_percentage_to_dbm(ptarget_wlan->network.PhyInfo.SignalStrength);
-	#if defined(DBG_RX_SIGNAL_DISPLAY_PROCESSING) && 1
-	#endif
 
 	rtw_set_signal_stat_timer(&padapter->recvpriv);
 
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c +0 -18
index b889e1214ef2..c353ce2c8e0a 100644
@@ -1802,8 +1802,6 @@ unsigned int OnAction_back(struct adapter *padapter, union recv_frame *precv_fra
 				preorder_ctrl =  &psta->recvreorder_ctrl[tid];
 				preorder_ctrl->enable = false;
 				preorder_ctrl->indicate_seq = 0xffff;
-				#ifdef DBG_RX_SEQ
-				#endif
 			}
 			/* todo: how to notify the host while receiving DELETE BA */
 			break;
@@ -3864,8 +3862,6 @@ unsigned int send_delba(struct adapter *padapter, u8 initiator, u8 *addr)
 				issue_action_BA(padapter, addr, WLAN_ACTION_DELBA, (((tid << 1) | initiator)&0x1F));
 				psta->recvreorder_ctrl[tid].enable = false;
 				psta->recvreorder_ctrl[tid].indicate_seq = 0xffff;
-				#ifdef DBG_RX_SEQ
-				#endif
 			}
 		}
 	} else if (initiator == 1) {/*  originator */
@@ -3939,10 +3935,6 @@ void site_survey(struct adapter *padapter)
 		}
 	}
 
-#ifdef DBG_FIXED_CHAN
-	
-#endif
-
 	if (survey_channel != 0) {
 		/* PAUSE 4-AC Queue when site_survey */
 		/* rtw_hal_get_hwreg(padapter, HW_VAR_TXPAUSE, (u8 *)(&val8)); */
@@ -4190,9 +4182,6 @@ u8 collect_bss_info(struct adapter *padapter, union recv_frame *precv_frame, str
 			pmlmepriv->num_sta_no_ht++;
 	}
 
-	#if defined(DBG_RX_SIGNAL_DISPLAY_SSID_MONITORED) & 1
-	#endif
-
 	/*  mark bss info receiving from nearby channel as SignalQuality 101 */
 	if (bssid->Configuration.DSConfig != rtw_get_oper_ch(padapter))
 		bssid->PhyInfo.SignalQuality = 101;
@@ -5203,9 +5192,6 @@ static u8 chk_ap_is_alive(struct adapter *padapter, struct sta_info *psta)
 {
 	u8 ret = false;
 
-	#ifdef DBG_EXPIRATION_CHK
-	#endif
-
 	if ((sta_rx_data_pkts(psta) == sta_last_rx_data_pkts(psta))
 		&& sta_rx_beacon_pkts(psta) == sta_last_rx_beacon_pkts(psta)
 		&& sta_rx_probersp_pkts(psta) == sta_last_rx_probersp_pkts(psta)
@@ -5258,8 +5244,6 @@ void linked_status_chk(struct adapter *padapter)
 			{
 				if (rx_chk != _SUCCESS) {
 					if (pmlmeext->retry == 0) {
-						#ifdef DBG_EXPIRATION_CHK
-						#endif
 						issue_probereq_ex(padapter, &pmlmeinfo->network.Ssid, pmlmeinfo->network.MacAddress, 0, 0, 0, 0);
 						issue_probereq_ex(padapter, &pmlmeinfo->network.Ssid, pmlmeinfo->network.MacAddress, 0, 0, 0, 0);
 						issue_probereq_ex(padapter, &pmlmeinfo->network.Ssid, pmlmeinfo->network.MacAddress, 0, 0, 0, 0);
@@ -5267,8 +5251,6 @@ void linked_status_chk(struct adapter *padapter)
 				}
 
 				if (tx_chk != _SUCCESS && pmlmeinfo->link_count++ == link_count_limit) {
-					#ifdef DBG_EXPIRATION_CHK
-					#endif
 					tx_chk = issue_nulldata_in_interrupt(padapter, NULL);
 				}
 			}
drivers/staging/rtl8723bs/core/rtw_recv.c +0 -76

272 lines not on this page · raw message

drivers/staging/rtl8723bs/core/rtw_sta_mgt.c +0 -2
index 6e5a0841950c..85663182b388 100644
@@ -244,8 +244,6 @@ struct	sta_info *rtw_alloc_stainfo(struct	sta_priv *pstapriv, u8 *hwaddr)
 			preorder_ctrl->enable = false;
 
 			preorder_ctrl->indicate_seq = 0xffff;
-			#ifdef DBG_RX_SEQ
-			#endif
 			preorder_ctrl->wend_b = 0xffff;
 			/* preorder_ctrl->wsize_b = (NR_RECVBUFF-2); */
 			preorder_ctrl->wsize_b = 64;/* 64; */
drivers/staging/rtl8723bs/core/rtw_xmit.c +0 -20
index 1af4aad59b8f..be65d550d6a0 100644
@@ -480,8 +480,6 @@ static s32 update_attrib_sec_info(struct adapter *padapter, struct pkt_attrib *p
 		pattrib->encrypt = 0;
 
 		if ((pattrib->ether_type != 0x888e) && (check_fwstate(pmlmepriv, WIFI_MP_STATE) == false)) {
-			#ifdef DBG_TX_DROP_FRAME
-			#endif
 			res = _FAIL;
 			goto exit;
 		}
@@ -523,8 +521,6 @@ static s32 update_attrib_sec_info(struct adapter *padapter, struct pkt_attrib *p
 		pattrib->icv_len = 4;
 
 		if (psecuritypriv->busetkipkey == _FAIL) {
-			#ifdef DBG_TX_DROP_FRAME
-			#endif
 			res = _FAIL;
 			goto exit;
 		}
@@ -700,8 +696,6 @@ static s32 update_attrib(struct adapter *padapter, struct sk_buff *pkt, struct p
 	} else {
 		psta = rtw_get_stainfo(pstapriv, pattrib->ra);
 		if (!psta)	{ /*  if we cannot get psta => drop the pkt */
-			#ifdef DBG_TX_DROP_FRAME
-			#endif
 			res = _FAIL;
 			goto exit;
 		} else if ((check_fwstate(pmlmepriv, WIFI_AP_STATE) == true) && (!(psta->state & _FW_LINKED))) {
@@ -712,8 +706,6 @@ static s32 update_attrib(struct adapter *padapter, struct sk_buff *pkt, struct p
 
 	if (!psta) {
 		/*  if we cannot get psta => drop the pkt */
-		#ifdef DBG_TX_DROP_FRAME
-		#endif
 		res = _FAIL;
 		goto exit;
 	}
@@ -1481,8 +1473,6 @@ struct xmit_buf *rtw_alloc_xmitbuf_ext(struct xmit_priv *pxmitpriv)
 
 	if (pxmitbuf) {
 		pxmitpriv->free_xmit_extbuf_cnt--;
-		#ifdef DBG_XMIT_BUF_EXT
-		#endif
 
 		pxmitbuf->priv_data = NULL;
 
@@ -1514,8 +1504,6 @@ s32 rtw_free_xmitbuf_ext(struct xmit_priv *pxmitpriv, struct xmit_buf *pxmitbuf)
 
 	list_add_tail(&pxmitbuf->list, get_list_head(pfree_queue));
 	pxmitpriv->free_xmit_extbuf_cnt++;
-	#ifdef DBG_XMIT_BUF_EXT
-	#endif
 
 	spin_unlock_irqrestore(&pfree_queue->lock, irqL);
 
@@ -1545,8 +1533,6 @@ struct xmit_buf *rtw_alloc_xmitbuf(struct xmit_priv *pxmitpriv)
 
 	if (pxmitbuf) {
 		pxmitpriv->free_xmitbuf_cnt--;
-		#ifdef DBG_XMIT_BUF
-		#endif
 
 		pxmitbuf->priv_data = NULL;
 
@@ -1559,8 +1545,6 @@ struct xmit_buf *rtw_alloc_xmitbuf(struct xmit_priv *pxmitpriv)
 			rtw_sctx_done_err(&pxmitbuf->sctx, RTW_SCTX_DONE_BUF_ALLOC);
 		}
 	}
-	#ifdef DBG_XMIT_BUF
-	#endif
 
 	spin_unlock_irqrestore(&pfree_xmitbuf_queue->lock, irqL);
 
@@ -1591,8 +1575,6 @@ s32 rtw_free_xmitbuf(struct xmit_priv *pxmitpriv, struct xmit_buf *pxmitbuf)
 			      get_list_head(pfree_xmitbuf_queue));
 
 		pxmitpriv->free_xmitbuf_cnt++;
-		#ifdef DBG_XMIT_BUF
-		#endif
 		spin_unlock_irqrestore(&pfree_xmitbuf_queue->lock, irqL);
 	}
 	return _SUCCESS;
@@ -1997,8 +1979,6 @@ s32 rtw_xmit(struct adapter *padapter, struct sk_buff **ppkt)
 	res = update_attrib(padapter, *ppkt, &pxmitframe->attrib);
 
 	if (res == _FAIL) {
-		#ifdef DBG_TX_DROP_FRAME
-		#endif
 		rtw_free_xmitframe(pxmitpriv, pxmitframe);
 		return -1;
 	}
drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c +0 -2
index b18d20242d6d..247cf095d0e1 100644
@@ -230,8 +230,6 @@ static s32 xmit_xmitframes(struct adapter *padapter, struct xmit_priv *pxmitpriv
 			ptxservq = container_of(sta_plist, struct tx_servq, tx_pending);
 			sta_plist = get_next(sta_plist);
 
-#ifdef DBG_XMIT_BUF
-#endif
 			pframe_queue = &ptxservq->sta_pending;
 
 			frame_phead = get_list_head(pframe_queue);
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c +0 -16
index 4506ddf19d17..3514a74068c3 100644
@@ -1162,9 +1162,6 @@ static int cfg80211_rtw_get_station(struct wiphy *wiphy,
 		goto exit;
 	}
 
-#ifdef DEBUG_CFG80211
-#endif
-
 	/* for infra./P2PClient mode */
 	if (check_fwstate(pmlmepriv, WIFI_STATION_STATE)
 		&& check_fwstate(pmlmepriv, _FW_LINKED)
@@ -1283,9 +1280,6 @@ void rtw_cfg80211_indicate_scan_done(struct adapter *adapter, bool aborted)
 
 	spin_lock_bh(&pwdev_priv->scan_req_lock);
 	if (pwdev_priv->scan_request) {
-		#ifdef DEBUG_CFG80211
-		#endif
-
 		/* avoid WARN_ON(request != wiphy_to_dev(request->wiphy)->scan_req); */
 		if (pwdev_priv->scan_request->wiphy != pwdev_priv->rtw_wdev->wiphy)
 		{
@@ -1298,8 +1292,6 @@ void rtw_cfg80211_indicate_scan_done(struct adapter *adapter, bool aborted)
 
 		pwdev_priv->scan_request = NULL;
 	} else {
-		#ifdef DEBUG_CFG80211
-		#endif
 	}
 	spin_unlock_bh(&pwdev_priv->scan_req_lock);
 }
@@ -1437,9 +1429,6 @@ static int cfg80211_rtw_scan(struct wiphy *wiphy
 
 	if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true)
 	{
-#ifdef DEBUG_CFG80211
-#endif
-
 		if (check_fwstate(pmlmepriv, WIFI_UNDER_WPS|_FW_UNDER_SURVEY|_FW_UNDER_LINKING) == true)
 		{
 			DBG_8192C("%s, fwstate = 0x%x\n", __func__, pmlmepriv->fw_state);
@@ -1513,8 +1502,6 @@ static int cfg80211_rtw_scan(struct wiphy *wiphy
 	/* parsing channels, n_channels */
 	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++) {
-		#ifdef DEBUG_CFG80211
-		#endif
 		ch[i].hw_value = request->channels[i]->hw_value;
 		ch[i].flags = request->channels[i]->flags;
 	}
@@ -2869,9 +2856,6 @@ static int cfg80211_rtw_mgmt_tx(struct wiphy *wiphy,
 	/* cookie generation */
 	*cookie = (unsigned long) buf;
 
-#ifdef DEBUG_CFG80211
-#endif /* DEBUG_CFG80211 */
-
 	/* indicate ack before issue frame to avoid racing with rsp frame */
 	rtw_cfg80211_mgmt_tx_status(padapter, *cookie, buf, len, ack, GFP_KERNEL);
 
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c +0 -18
index 5d103d33a128..730c4728ae92 100644
@@ -1161,9 +1161,6 @@ static int rtw_wx_set_scan(struct net_device *dev, struct iw_request_info *a,
 	struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
 	struct ndis_802_11_ssid ssid[RTW_SSID_SCAN_AMOUNT];
 
-	#ifdef DBG_IOCTL
-	#endif
-
 	rtw_ps_deny(padapter, PS_DENY_SCAN);
 	if (_FAIL == rtw_pwr_wakeup(padapter)) {
 		ret = -1;
@@ -1281,9 +1278,6 @@ static int rtw_wx_set_scan(struct net_device *dev, struct iw_request_info *a,
 
 	rtw_ps_deny_cancel(padapter, PS_DENY_SCAN);
 
-	#ifdef DBG_IOCTL
-	#endif
-
 	return ret;
 }
 
@@ -1300,9 +1294,6 @@ static int rtw_wx_get_scan(struct net_device *dev, struct iw_request_info *a,
 	u32 ret = 0;
 	signed int wait_status;
 
-	#ifdef DBG_IOCTL
-	#endif
-
 	if (adapter_to_pwrctl(padapter)->brfoffbyhw && padapter->bDriverStopped) {
 		ret = -EINVAL;
 		goto exit;
@@ -1348,9 +1339,6 @@ static int rtw_wx_get_scan(struct net_device *dev, struct iw_request_info *a,
 
 exit:
 
-	#ifdef DBG_IOCTL
-	#endif
-
 	return ret;
 
 }
@@ -1375,9 +1363,6 @@ static int rtw_wx_set_essid(struct net_device *dev,
 
 	uint ret = 0, len;
 
-	#ifdef DBG_IOCTL
-	#endif
-
 	rtw_ps_deny(padapter, PS_DENY_JOIN);
 	if (_FAIL == rtw_pwr_wakeup(padapter)) {
 		ret = -1;
@@ -1451,9 +1436,6 @@ static int rtw_wx_set_essid(struct net_device *dev,
 
 	rtw_ps_deny_cancel(padapter, PS_DENY_JOIN);
 
-	#ifdef DBG_IOCTL
-	#endif
-
 	return ret;
 }
 
drivers/staging/rtl8723bs/os_dep/xmit_linux.c +0 -4
index 0c9dfbaafcfd..5e33b6c16157 100644
@@ -194,8 +194,6 @@ int _rtw_xmit_entry(struct sk_buff *pkt, struct net_device *pnetdev)
 	s32 res = 0;
 
 	if (rtw_if_up(padapter) == false) {
-		#ifdef DBG_TX_DROP_FRAME
-		#endif
 		goto drop_packet;
 	}
 
@@ -216,8 +214,6 @@ int _rtw_xmit_entry(struct sk_buff *pkt, struct net_device *pnetdev)
 
 	res = rtw_xmit(padapter, &pkt);
 	if (res < 0) {
-		#ifdef DBG_TX_DROP_FRAME
-		#endif
 		goto drop_packet;
 	}
 
Signature · 1 line
2.20.1
#17 lore raw

PATCH 12/19 staging: rtl8723bs: remove unnecessary bracks on DBG_871X removal sites

In reply to Fabio Aiuto

remove unnecessary bracks on DBG_871X removal sites

---
 drivers/staging/rtl8723bs/core/rtw_ap.c       |  9 +-
 drivers/staging/rtl8723bs/core/rtw_btcoex.c   |  6 +-
 drivers/staging/rtl8723bs/core/rtw_cmd.c      | 10 +--
 .../staging/rtl8723bs/core/rtw_ieee80211.c    | 10 +--
 drivers/staging/rtl8723bs/core/rtw_io.c       |  3 +-
 drivers/staging/rtl8723bs/core/rtw_mlme.c     | 32 +++----
 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 77 ++++++-----------
 drivers/staging/rtl8723bs/core/rtw_pwrctrl.c  | 54 +++++-------
 drivers/staging/rtl8723bs/core/rtw_recv.c     | 28 +++---
 drivers/staging/rtl8723bs/core/rtw_security.c | 15 ++--
 .../staging/rtl8723bs/core/rtw_wlan_util.c    | 85 ++++++++-----------
 drivers/staging/rtl8723bs/core/rtw_xmit.c     | 61 +++++--------
 drivers/staging/rtl8723bs/hal/HalPwrSeqCmd.c  |  4 +-
 drivers/staging/rtl8723bs/hal/hal_com.c       |  6 +-
 .../staging/rtl8723bs/hal/hal_com_phycfg.c    | 69 ++++++---------
 drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c  | 12 +--
 .../staging/rtl8723bs/hal/rtl8723b_hal_init.c |  8 +-
 .../staging/rtl8723bs/hal/rtl8723b_phycfg.c   |  3 +-
 .../staging/rtl8723bs/hal/rtl8723bs_xmit.c    |  9 +-
 drivers/staging/rtl8723bs/hal/sdio_halinit.c  |  4 +-
 drivers/staging/rtl8723bs/hal/sdio_ops.c      |  6 +-
 .../staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 18 ++--
 .../staging/rtl8723bs/os_dep/ioctl_linux.c    | 57 +++++--------
 drivers/staging/rtl8723bs/os_dep/mlme_linux.c |  4 +-
 drivers/staging/rtl8723bs/os_dep/os_intfs.c   | 22 ++---
 drivers/staging/rtl8723bs/os_dep/recv_linux.c |  3 +-
 drivers/staging/rtl8723bs/os_dep/sdio_intf.c  |  9 +-
 .../staging/rtl8723bs/os_dep/sdio_ops_linux.c | 52 ++++--------
 drivers/staging/rtl8723bs/os_dep/xmit_linux.c |  9 +-
 29 files changed, 254 insertions(+), 431 deletions(-)
drivers/staging/rtl8723bs/core/rtw_ap.c +3 -6
index 015c1d74a92d..10589d52bba9 100644
@@ -274,9 +274,8 @@ void expire_timeout_chk(struct adapter *padapter)
 				&& padapter->xmitpriv.free_xmitframe_cnt < ((
 					NR_XMITFRAME / pstapriv->asoc_list_cnt
 				) / 2)
-			) {
+			)
 				wakeup_sta_to_xmit(padapter, psta);
-			}
 		}
 	}
 
@@ -536,15 +535,13 @@ void update_sta_info_apmode(struct adapter *padapter, struct sta_info *psta)
 
 		/*  B0 Config LDPC Coding Capability */
 		if (TEST_FLAG(phtpriv_ap->ldpc_cap, LDPC_HT_ENABLE_TX) &&
-			      GET_HT_CAPABILITY_ELE_LDPC_CAP((u8 *)(&phtpriv_sta->ht_cap))) {
+			      GET_HT_CAPABILITY_ELE_LDPC_CAP((u8 *)(&phtpriv_sta->ht_cap)))
 			SET_FLAG(cur_ldpc_cap, (LDPC_HT_ENABLE_TX | LDPC_HT_CAP_TX));
-		}
 
 		/*  B7 B8 B9 Config STBC setting */
 		if (TEST_FLAG(phtpriv_ap->stbc_cap, STBC_HT_ENABLE_TX) &&
-			      GET_HT_CAPABILITY_ELE_RX_STBC((u8 *)(&phtpriv_sta->ht_cap))) {
+			      GET_HT_CAPABILITY_ELE_RX_STBC((u8 *)(&phtpriv_sta->ht_cap)))
 			SET_FLAG(cur_stbc_cap, (STBC_HT_ENABLE_TX | STBC_HT_CAP_TX));
-		}
 	} else {
 		phtpriv_sta->ampdu_enable = false;
 
drivers/staging/rtl8723bs/core/rtw_btcoex.c +2 -4
index ebdbd328b62c..62cbf84b079a 100644
@@ -21,13 +21,11 @@ void rtw_btcoex_MediaStatusNotify(struct adapter *padapter, u8 mediaStatus)
 
 void rtw_btcoex_HaltNotify(struct adapter *padapter)
 {
-	if (!padapter->bup) {
+	if (!padapter->bup)
 		return;
-	}
 
-	if (padapter->bSurpriseRemoved) {
+	if (padapter->bSurpriseRemoved)
 		return;
-	}
 
 	hal_btcoex_HaltNotify(padapter);
 }
drivers/staging/rtl8723bs/core/rtw_cmd.c +4 -6
index c29cd23b74a0..cc00bd4f4bc6 100644
@@ -313,9 +313,9 @@ int rtw_cmd_filter(struct cmd_priv *pcmdpriv, struct cmd_obj *cmd_obj)
 
 	if ((pcmdpriv->padapter->hw_init_completed == false && bAllow == false)
 		|| atomic_read(&(pcmdpriv->cmdthd_running)) == false	/* com_thread not running */
-	) {
+	)
 		return _FAIL;
-	}
+
 	return _SUCCESS;
 }
 
@@ -419,9 +419,8 @@ int rtw_cmd_thread(void *context)
 			break;
 		}
 
-		if (list_empty(&(pcmdpriv->cmd_queue.queue))) {
+		if (list_empty(&(pcmdpriv->cmd_queue.queue)))
 			continue;
-		}
 
 		if (rtw_register_cmd_alive(padapter) != _SUCCESS)
 			continue;
@@ -1508,9 +1507,8 @@ static void rtw_lps_change_dtim_hdl(struct adapter *padapter, u8 dtim)
 
 	mutex_lock(&pwrpriv->lock);
 
-	if (pwrpriv->dtim != dtim) {
+	if (pwrpriv->dtim != dtim)
 		pwrpriv->dtim = dtim;
-	}
 
 	if ((pwrpriv->bFwCurrentInPSMode == true) && (pwrpriv->pwr_mode > PS_MODE_ACTIVE)) {
 		u8 ps_mode = pwrpriv->pwr_mode;
drivers/staging/rtl8723bs/core/rtw_ieee80211.c +4 -6
index f57d6552c338..1b60252545b3 100644
@@ -818,9 +818,8 @@ static int rtw_ieee802_11_parse_vendor_specific(u8 *pos, uint elen,
 	/* first 3 bytes in vendor specific information element are the IEEE
 	 * OUI of the vendor. The following byte is used a vendor specific
 	 * sub-type. */
-	if (elen < 4) {
+	if (elen < 4)
 		return -1;
-	}
 
 	oui = get_unaligned_be24(pos);
 	switch (oui) {
@@ -835,9 +834,9 @@ static int rtw_ieee802_11_parse_vendor_specific(u8 *pos, uint elen,
 			elems->wpa_ie_len = elen;
 			break;
 		case WME_OUI_TYPE: /* this is a Wi-Fi WME info. element */
-			if (elen < 5) {
+			if (elen < 5)
 				return -1;
-			}
+
 			switch (pos[4]) {
 			case WME_OUI_SUBTYPE_INFORMATION_ELEMENT:
 			case WME_OUI_SUBTYPE_PARAMETER_ELEMENT:
@@ -905,9 +904,8 @@ enum ParseRes rtw_ieee802_11_parse_elems(u8 *start, uint len,
 		elen = *pos++;
 		left -= 2;
 
-		if (elen > left) {
+		if (elen > left)
 			return ParseFailed;
-		}
 
 		switch (id) {
 		case WLAN_EID_SSID:
drivers/staging/rtl8723bs/core/rtw_io.c +1 -2
index 25fc52e557d1..1208ead0ed52 100644
@@ -172,9 +172,8 @@ int rtw_inc_and_chk_continual_io_error(struct dvobj_priv *dvobj)
 {
 	int ret = false;
 	int value = atomic_inc_return(&dvobj->continual_io_error);
-	if (value > MAX_CONTINUAL_IO_ERR) {
+	if (value > MAX_CONTINUAL_IO_ERR)
 		ret = true;
-	}
 
 	return ret;
 }
drivers/staging/rtl8723bs/core/rtw_mlme.c +12 -20
index 9af75f683a18..585048c2520b 100644
@@ -707,9 +707,8 @@ int rtw_is_desired_network(struct adapter *adapter, struct wlan_network *pnetwor
 		}
 	}
 
-	if ((desired_encmode != Ndis802_11EncryptionDisabled) && (privacy == 0)) {
+	if ((desired_encmode != Ndis802_11EncryptionDisabled) && (privacy == 0))
 		bselected = false;
-	}
 
 	if (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == true) {
 		if (pnetwork->network.InfrastructureMode != pmlmepriv->cur_network.network.InfrastructureMode)
@@ -1040,9 +1039,9 @@ void rtw_scan_abort(struct adapter *adapter)
 		msleep(20);
 	}
 
-	if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY)) {
+	if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY))
 		rtw_indicate_scan_done(adapter, true);
-	}
+
 	pmlmeext->scan_abort = false;
 }
 
@@ -1657,13 +1656,11 @@ static void rtw_auto_scan_handler(struct adapter *padapter)
 		&& jiffies_to_msecs(jiffies - pmlmepriv->scan_start_time) > pmlmepriv->auto_scan_int_ms) {
 
 		if (!padapter->registrypriv.wifi_spec) {
-			if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY|_FW_UNDER_LINKING) == true) {
+			if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY|_FW_UNDER_LINKING) == true)
 				goto exit;
-			}
 
-			if (pmlmepriv->LinkDetectInfo.bBusyTraffic) {
+			if (pmlmepriv->LinkDetectInfo.bBusyTraffic)
 				goto exit;
-			}
 		}
 
 		rtw_set_802_11_bssid_list_scan(padapter, NULL, 0);
@@ -2344,12 +2341,11 @@ void rtw_ht_use_default_setting(struct adapter *padapter)
 	rtw_hal_get_def_var(padapter, HAL_DEF_EXPLICIT_BEAMFORMER, (u8 *)&bHwSupportBeamformer);
 	rtw_hal_get_def_var(padapter, HAL_DEF_EXPLICIT_BEAMFORMEE, (u8 *)&bHwSupportBeamformee);
 	CLEAR_FLAGS(phtpriv->beamform_cap);
-	if (TEST_FLAG(pregistrypriv->beamform_cap, BIT4) && bHwSupportBeamformer) {
+	if (TEST_FLAG(pregistrypriv->beamform_cap, BIT4) && bHwSupportBeamformer)
 		SET_FLAG(phtpriv->beamform_cap, BEAMFORMING_HT_BEAMFORMER_ENABLE);
-	}
-	if (TEST_FLAG(pregistrypriv->beamform_cap, BIT5) && bHwSupportBeamformee) {
+
+	if (TEST_FLAG(pregistrypriv->beamform_cap, BIT5) && bHwSupportBeamformee)
 		SET_FLAG(phtpriv->beamform_cap, BEAMFORMING_HT_BEAMFORMEE_ENABLE);
-	}
 }
 
 void rtw_build_wmm_ie_ht(struct adapter *padapter, u8 *out_ie, uint *pout_len)
@@ -2445,9 +2441,8 @@ unsigned int rtw_restructure_ht_ie(struct adapter *padapter, u8 *in_ie, u8 *out_
 
 	if (TEST_FLAG(phtpriv->stbc_cap, STBC_HT_ENABLE_RX)) {
 		if ((channel <= 14 && pregistrypriv->rx_stbc == 0x1) ||	/* enable for 2.4GHz */
-			(pregistrypriv->wifi_spec == 1)) {
+			(pregistrypriv->wifi_spec == 1))
 			stbc_rx_enable = 1;
-		}
 	}
 
 	/* fill default supported_mcs_set */
@@ -2639,17 +2634,14 @@ void rtw_issue_addbareq_cmd(struct adapter *padapter, struct xmit_frame *pxmitfr
 	priority = pattrib->priority;
 
 	psta = rtw_get_stainfo(&padapter->stapriv, pattrib->ra);
-	if (pattrib->psta != psta) {
+	if (pattrib->psta != psta)
 		return;
-	}
 
-	if (!psta) {
+	if (!psta)
 		return;
-	}
 
-	if (!(psta->state & _FW_LINKED)) {
+	if (!(psta->state & _FW_LINKED))
 		return;
-	}
 
 	phtpriv = &psta->htpriv;
 
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c +27 -50

227 lines not on this page · raw message

drivers/staging/rtl8723bs/core/rtw_pwrctrl.c +20 -34

150 lines not on this page · raw message

drivers/staging/rtl8723bs/core/rtw_recv.c +10 -18
index 3980873f3b37..866b8c540c0c 100644
@@ -362,9 +362,8 @@ static signed int recvframe_chkmic(struct adapter *adapter,  union recv_frame *p
 				if ((IS_MCAST(prxattrib->ra) == true)  && (prxattrib->key_index != pmlmeinfo->key_index))
 					brpt_micerror = false;
 
-				if ((prxattrib->bdecrypted == true) && (brpt_micerror == true)) {
+				if ((prxattrib->bdecrypted == true) && (brpt_micerror == true))
 					rtw_handle_tkip_mic_err(adapter, (u8)IS_MCAST(prxattrib->ra));
-				}
 
 				res = _FAIL;
 
@@ -773,9 +772,8 @@ static signed int ap2sta_data_frame(struct adapter *adapter, union recv_frame *p
 		     !memcmp(mybssid, "\x0\x0\x0\x0\x0\x0", ETH_ALEN) ||
 		     (memcmp(pattrib->bssid, mybssid, ETH_ALEN))) {
 
-			if (!bmcast) {
+			if (!bmcast)
 				issue_deauth(adapter, pattrib->bssid, WLAN_REASON_CLASS3_FRAME_FROM_NONASSOC_STA);
-			}
 
 			ret = _FAIL;
 			goto exit;
@@ -1592,14 +1590,12 @@ static int amsdu_to_msdu(struct adapter *padapter, union recv_frame *prframe)
 		/* Offset 12 denote 2 mac address */
 		nSubframe_Length = get_unaligned_be16(pdata + 12);
 
-		if (a_len < (ETHERNET_HEADER_SIZE + nSubframe_Length)) {
+		if (a_len < (ETHERNET_HEADER_SIZE + nSubframe_Length))
 			break;
-		}
 
 		sub_pkt = rtw_os_alloc_msdu_pkt(prframe, nSubframe_Length, pdata);
-		if (!sub_pkt) {
+		if (!sub_pkt)
 			break;
-		}
 
 		/* move the data point to data content */
 		pdata += ETH_HLEN;
@@ -1607,9 +1603,8 @@ static int amsdu_to_msdu(struct adapter *padapter, union recv_frame *prframe)
 
 		subframes[nr_subframes++] = sub_pkt;
 
-		if (nr_subframes >= MAX_SUBFRAME_COUNT) {
+		if (nr_subframes >= MAX_SUBFRAME_COUNT)
 			break;
-		}
 
 		pdata += nSubframe_Length;
 		a_len -= nSubframe_Length;
@@ -1618,9 +1613,9 @@ static int amsdu_to_msdu(struct adapter *padapter, union recv_frame *prframe)
 			if (padding_len == 4)
 				padding_len = 0;
 
-			if (a_len < padding_len) {
+			if (a_len < padding_len)
 				break;
-			}
+
 			pdata += padding_len;
 			a_len -= padding_len;
 		}
@@ -1794,9 +1789,8 @@ static int recv_indicatepkts_in_order(struct adapter *padapter, struct recv_reor
 			plist = get_next(plist);
 			list_del_init(&(prframe->u.hdr.list));
 
-			if (SN_EQUAL(preorder_ctrl->indicate_seq, pattrib->seq_num)) {
+			if (SN_EQUAL(preorder_ctrl->indicate_seq, pattrib->seq_num))
 				preorder_ctrl->indicate_seq = (preorder_ctrl->indicate_seq + 1) & 0xFFF;
-			}
 
 			/* Set this as a lock to make sure that only one thread is indicating packet. */
 			/* pTS->RxIndicateState = RXTS_INDICATE_PROCESSING; */
@@ -1976,9 +1970,8 @@ static int process_recv_indicatepkts(struct adapter *padapter, union recv_frame
 		}
 	} else { /* B/G mode */
 		retval = wlanhdr_to_ethhdr(prframe);
-		if (retval != _SUCCESS) {
+		if (retval != _SUCCESS)
 			return retval;
-		}
 
 		if ((padapter->bDriverStopped == false) && (padapter->bSurpriseRemoved == false)) {
 			/* indicate this recv_frame */
@@ -2024,9 +2017,8 @@ static int recv_func_posthandle(struct adapter *padapter, union recv_frame *prfr
 	}
 
 	prframe = recvframe_chk_defrag(padapter, prframe);
-	if (!prframe)	{
+	if (!prframe)
 		goto _recv_data_drop;
-	}
 
 	prframe = portctrl(padapter, prframe);
 	if (!prframe) {
drivers/staging/rtl8723bs/core/rtw_security.c +7 -8
index eca1e0f0680c..302479d9236b 100644
@@ -1587,9 +1587,8 @@ static signed int aes_decipher(u8 *key, uint	hdrlen,
 
 	/* compare the mic */
 	for (i = 0; i < 8; i++) {
-		if (pframe[hdrlen+8+plen-8+i] != message[hdrlen+8+plen-8+i]) {
+		if (pframe[hdrlen+8+plen-8+i] != message[hdrlen+8+plen-8+i])
 			res = _FAIL;
-		}
 	}
 	return res;
 }
@@ -1688,9 +1687,9 @@ u32 rtw_BIP_verify(struct adapter *padapter, u8 *precvframe)
 	ori_len = pattrib->pkt_len-WLAN_HDR_A3_LEN+BIP_AAD_SIZE;
 	BIP_AAD = rtw_zmalloc(ori_len);
 
-	if (BIP_AAD == NULL) {
+	if (BIP_AAD == NULL)
 		return _FAIL;
-	}
+
 	/* PKT start */
 	pframe = (unsigned char *)((union recv_frame *)precvframe)->u.hdr.rx_data;
 	/* mapping to wlan header */
@@ -1707,15 +1706,15 @@ u32 rtw_BIP_verify(struct adapter *padapter, u8 *precvframe)
 		memcpy(&le_tmp64, p+4, 6);
 		temp_ipn = le64_to_cpu(le_tmp64);
 		/* BIP packet number should bigger than previous BIP packet */
-		if (temp_ipn <= pmlmeext->mgnt_80211w_IPN_rx) {
+		if (temp_ipn <= pmlmeext->mgnt_80211w_IPN_rx)
 			goto BIP_exit;
-		}
+
 		/* copy key index */
 		memcpy(&le_tmp, p+2, 2);
 		keyid = le16_to_cpu(le_tmp);
-		if (keyid != padapter->securitypriv.dot11wBIPKeyid) {
+		if (keyid != padapter->securitypriv.dot11wBIPKeyid)
 			goto BIP_exit;
-		}
+
 		/* clear the MIC field of MME to zero */
 		memset(p+2+len-8, 0, 8);
 
drivers/staging/rtl8723bs/core/rtw_wlan_util.c +34 -51

188 lines not on this page · raw message

drivers/staging/rtl8723bs/core/rtw_xmit.c +22 -39

171 lines not on this page · raw message

drivers/staging/rtl8723bs/hal/HalPwrSeqCmd.c +2 -2
index 1d2c828cafe8..5f9e94a7e6ad 100644
@@ -116,9 +116,9 @@ u8 HalPwrSeqCmdParsing(
 					else
 						udelay(10);
 
-					if (pollingCount++ > maxPollingCnt) {
+					if (pollingCount++ > maxPollingCnt)
 						return false;
-					}
+
 				} while (!bPollingBit);
 
 				break;
drivers/staging/rtl8723bs/hal/hal_com.c +2 -4
index 509eac352c15..6b871f2cb8dd 100644
@@ -151,9 +151,8 @@ bool HAL_IsLegalChannel(struct adapter *Adapter, u32 Channel)
 	bool bLegalChannel = true;
 
 	if ((Channel <= 14) && (Channel >= 1)) {
-		if (IsSupported24G(Adapter->registrypriv.wireless_mode) == false) {
+		if (IsSupported24G(Adapter->registrypriv.wireless_mode) == false)
 			bLegalChannel = false;
-		}
 	} else {
 		bLegalChannel = false;
 	}
@@ -1335,9 +1334,8 @@ bool GetHexValueFromString(char *szStr, u32 *pu4bVal, u32 *pu4bMove)
 	char *szScan = szStr;
 
 	/*  Check input parameter. */
-	if (!szStr || !pu4bVal || !pu4bMove) {
+	if (!szStr || !pu4bVal || !pu4bMove)
 		return false;
-	}
 
 	/*  Initialize output. */
 	*pu4bMove = 0;
drivers/staging/rtl8723bs/hal/hal_com_phycfg.c +27 -42

158 lines not on this page · raw message

drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c +4 -8
index 66140fcfb40f..f2ab878babcb 100644
@@ -197,9 +197,8 @@ static void ConstructBeacon(struct adapter *padapter, u8 *pframe, u32 *pLength)
 
 _ConstructBeacon:
 
-	if ((pktlen + TXDESC_SIZE) > 512) {
+	if ((pktlen + TXDESC_SIZE) > 512)
 		return;
-	}
 
 	*pLength = pktlen;
 
@@ -446,13 +445,11 @@ void rtl8723b_set_FwPwrMode_cmd(struct adapter *padapter, u8 psmode)
 				ratio_20_delay += pmlmeext->bcn_delay_ratio[i];
 				ratio_80_delay += pmlmeext->bcn_delay_ratio[i];
 
-				if (ratio_20_delay > 20 && pmlmeext->DrvBcnEarly == 0xff) {
+				if (ratio_20_delay > 20 && pmlmeext->DrvBcnEarly == 0xff)
 					pmlmeext->DrvBcnEarly = i;
-				}
 
-				if (ratio_80_delay > 80 && pmlmeext->DrvBcnTimeOut == 0xff) {
+				if (ratio_80_delay > 80 && pmlmeext->DrvBcnTimeOut == 0xff)
 					pmlmeext->DrvBcnTimeOut = i;
-				}
 
 				/* reset adaptive_early_32k cnt */
 				pmlmeext->bcn_delay_cnt[i] = 0;
@@ -553,9 +550,8 @@ static void rtl8723b_set_FwRsvdPagePkt(
 	MaxRsvdPageBufSize = RsvdPageNum*PageSize;
 
 	pcmdframe = rtw_alloc_cmdxmitframe(pxmitpriv);
-	if (!pcmdframe) {
+	if (!pcmdframe)
 		return;
-	}
 
 	ReservedPagePacket = pcmdframe->buf_addr;
 	memset(&RsvdPageLoc, 0, sizeof(struct rsvdpage_loc));
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c +3 -5
index 1930049756b2..e31ad3feed62 100644
@@ -327,9 +327,8 @@ s32 rtl8723b_FirmwareDownload(struct adapter *padapter, bool  bUsedWoWLANFw)
 	/* 2. read power_state = 0xA0[1:0] */
 	tmp_ps = rtw_read8(padapter, 0xa0);
 	tmp_ps &= 0x03;
-	if (tmp_ps != 0x01) {
+	if (tmp_ps != 0x01)
 		pdbgpriv->dbg_downloadfw_pwr_state_cnt++;
-	}
 
 	fwfilepath = "rtlwifi/rtl8723bs_nic.bin";
 
@@ -1970,11 +1969,10 @@ static void rtl8723b_SetHalODMVar(
 
 static void hal_notch_filter_8723b(struct adapter *adapter, bool enable)
 {
-	if (enable) {
+	if (enable)
 		rtw_write8(adapter, rOFDM0_RxDSP+1, rtw_read8(adapter, rOFDM0_RxDSP+1) | BIT1);
-	} else {
+	else
 		rtw_write8(adapter, rOFDM0_RxDSP+1, rtw_read8(adapter, rOFDM0_RxDSP+1) & ~BIT1);
-	}
 }
 
 static void UpdateHalRAMask8723B(struct adapter *padapter, u32 mac_id, u8 rssi_level)
drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c +1 -2
index 973ade5f0d54..e302c404fec0 100644
@@ -777,9 +777,8 @@ static void PHY_HandleSwChnlAndSetBW8723B(
 	u8 tmpCenterFrequencyIndex1 = pHalData->CurrentCenterFrequencyIndex1;
 
 	/* check is swchnl or setbw */
-	if (!bSwitchChannel && !bSetBandWidth) {
+	if (!bSwitchChannel && !bSetBandWidth)
 		return;
-	}
 
 	/* skip change for channel or bandwidth is the same */
 	if (bSwitchChannel) {
drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c +3 -6
index 247cf095d0e1..b40d2e1a4fd1 100644
@@ -19,9 +19,8 @@ static u8 rtw_sdio_wait_enough_TxOQT_space(struct adapter *padapter, u8 agg_num)
 		if (
 			(padapter->bSurpriseRemoved) ||
 			(padapter->bDriverStopped)
-		) {
+		)
 			return false;
-		}
 
 		HalQueryTxOQTBufferStatus8723BSdio(padapter);
 
@@ -275,14 +274,12 @@ static s32 xmit_xmitframes(struct adapter *padapter, struct xmit_priv *pxmitpriv
 				}
 
 				/*  ok to send, remove frame from queue */
-				if (check_fwstate(&padapter->mlmepriv, WIFI_AP_STATE) == true) {
+				if (check_fwstate(&padapter->mlmepriv, WIFI_AP_STATE) == true)
 					if (
 						(pxmitframe->attrib.psta->state & WIFI_SLEEP_STATE) &&
 						(pxmitframe->attrib.triggered == 0)
-					) {
+					)
 						break;
-					}
-				}
 
 				list_del_init(&pxmitframe->list);
 				ptxservq->qcnt--;
drivers/staging/rtl8723bs/hal/sdio_halinit.c +2 -2
index 839fd32fc8dc..0251ddafe605 100644
@@ -651,9 +651,9 @@ static u32 rtl8723bs_hal_init(struct adapter *padapter)
 			if ((cpwm_orig ^ cpwm_now) & 0x80)
 				break;
 
-			if (jiffies_to_msecs(jiffies - start_time) > 100) {
+			if (jiffies_to_msecs(jiffies - start_time) > 100)
 				break;
-			}
+
 		} while (1);
 
 		rtl8723b_set_FwPwrModeInIPS_cmd(padapter, 0);
drivers/staging/rtl8723bs/hal/sdio_ops.c +2 -4
index d417b1372fe2..8df3350d53fb 100644
@@ -469,9 +469,8 @@ static u32 sdio_write_port(
 	adapter = intfhdl->padapter;
 	psdio = &adapter_to_dvobj(adapter)->intf_data;
 
-	if (!adapter->hw_init_completed) {
+	if (!adapter->hw_init_completed)
 		return _FAIL;
-	}
 
 	cnt = round_up(cnt, 4);
 	HalSdioGetCmdAddr8723BSdio(adapter, addr, cnt >> 2, &addr);
@@ -856,9 +855,8 @@ static struct recv_buf *sd_recv_rxfifo(struct adapter *adapter, u32 size)
 			skb_reserve(recvbuf->pskb, (RECVBUFF_ALIGN_SZ - alignment));
 		}
 
-		if (!recvbuf->pskb) {
+		if (!recvbuf->pskb)
 			return NULL;
-		}
 	}
 
 	/* 3 3. read data from rxfifo */
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c +6 -12
index 3514a74068c3..ca58ea6c4fb8 100644
@@ -236,9 +236,8 @@ struct cfg80211_bss *rtw_cfg80211_inform_bss(struct adapter *padapter, struct wl
 	struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
 
 	bssinf_len = pnetwork->network.IELength + sizeof(struct ieee80211_hdr_3addr);
-	if (bssinf_len > MAX_BSSINFO_LEN) {
+	if (bssinf_len > MAX_BSSINFO_LEN)
 		goto exit;
-	}
 
 	{
 		u16 wapi_len = 0;
@@ -246,9 +245,7 @@ struct cfg80211_bss *rtw_cfg80211_inform_bss(struct adapter *padapter, struct wl
 		if (rtw_get_wapi_ie(pnetwork->network.IEs, pnetwork->network.IELength, NULL, &wapi_len) > 0)
 		{
 			if (wapi_len > 0)
-			{
 				goto exit;
-			}
 		}
 	}
 
@@ -411,11 +408,10 @@ void rtw_cfg80211_ibss_indicate_connect(struct adapter *padapter)
 			}
 			if (!memcmp(&(scanned->network.Ssid), &(pnetwork->Ssid), sizeof(struct ndis_802_11_ssid))
 				&& !memcmp(scanned->network.MacAddress, pnetwork->MacAddress, sizeof(NDIS_802_11_MAC_ADDRESS))
-			) {
+			)
 				rtw_cfg80211_inform_bss(padapter, scanned);
-			} else {
+			else
 				rtw_warn_on(1);
-			}
 		}
 
 		if (!rtw_cfg80211_check_bss(padapter))
@@ -452,11 +448,10 @@ void rtw_cfg80211_indicate_connect(struct adapter *padapter)
 
 		if (!memcmp(scanned->network.MacAddress, pnetwork->MacAddress, sizeof(NDIS_802_11_MAC_ADDRESS))
 			&& !memcmp(&(scanned->network.Ssid), &(pnetwork->Ssid), sizeof(struct ndis_802_11_ssid))
-		) {
+		)
 			rtw_cfg80211_inform_bss(padapter, scanned);
-		} else {
+		else
 			rtw_warn_on(1);
-		}
 	}
 
 check_bss:
@@ -2196,9 +2191,8 @@ static int cfg80211_rtw_del_pmksa(struct wiphy *wiphy,
 		}
 	}
 
-	if (false == bMatched) {
+	if (false == bMatched)
 		return -EINVAL;
-	}
 
 	return 0;
 }
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c +21 -36

168 lines not on this page · raw message

drivers/staging/rtl8723bs/os_dep/mlme_linux.c +2 -2
index 8a97458f05e0..f5c94509ad71 100644
@@ -148,9 +148,9 @@ void rtw_report_sec_ie(struct adapter *adapter, u8 authmode, u8 *sec_ie)
 	buff = NULL;
 	if (authmode == WLAN_EID_VENDOR_SPECIFIC) {
 		buff = rtw_zmalloc(IW_CUSTOM_MAX);
-		if (NULL == buff) {
+		if (NULL == buff)
 			return;
-		}
+
 		p = buff;
 
 		p += scnprintf(p, IW_CUSTOM_MAX - (p - buff), "ASSOCINFO(ReqIEs =");
drivers/staging/rtl8723bs/os_dep/os_intfs.c +8 -14
index 2a366b4e3716..1f34cb2e367c 100644
@@ -863,9 +863,8 @@ static int _netdev_open(struct net_device *pnetdev)
 			goto netdev_open_error;
 
 		status = rtw_start_drv_threads(padapter);
-		if (status == _FAIL) {
+		if (status == _FAIL)
 			goto netdev_open_error;
-		}
 
 		if (padapter->intf_start)
 			padapter->intf_start(padapter);
@@ -904,9 +903,8 @@ int netdev_open(struct net_device *pnetdev)
 	struct adapter *padapter = rtw_netdev_priv(pnetdev);
 	struct pwrctrl_priv *pwrctrlpriv = adapter_to_pwrctl(padapter);
 
-	if (pwrctrlpriv->bInSuspend) {
+	if (pwrctrlpriv->bInSuspend)
 		return 0;
-	}
 
 	if (mutex_lock_interruptible(&(adapter_to_dvobj(padapter)->hw_init_mutex)))
 		return -1;
@@ -1179,21 +1177,19 @@ int rtw_suspend_common(struct adapter *padapter)
 	rtw_stop_cmd_thread(padapter);
 
 	/*  wait for the latest FW to remove this condition. */
-	if (check_fwstate(pmlmepriv, WIFI_AP_STATE)) {
+	if (check_fwstate(pmlmepriv, WIFI_AP_STATE))
 		hal_btcoex_SuspendNotify(padapter, 0);
-	} else if (check_fwstate(pmlmepriv, WIFI_STATION_STATE)) {
+	else if (check_fwstate(pmlmepriv, WIFI_STATION_STATE))
 		hal_btcoex_SuspendNotify(padapter, 1);
-	}
 
 	rtw_ps_deny_cancel(padapter, PS_DENY_SUSPEND);
 
-	if (check_fwstate(pmlmepriv, WIFI_STATION_STATE)) {
+	if (check_fwstate(pmlmepriv, WIFI_STATION_STATE))
 		rtw_suspend_normal(padapter);
-	} else if (check_fwstate(pmlmepriv, WIFI_AP_STATE)) {
+	else if (check_fwstate(pmlmepriv, WIFI_AP_STATE))
 		rtw_suspend_normal(padapter);
-	} else {
+	else
 		rtw_suspend_normal(padapter);
-	}
 
 	DBG_871X_LEVEL(_drv_always_, "rtw suspend success in %d ms\n",
 		jiffies_to_msecs(jiffies - start_time));
@@ -1248,14 +1244,12 @@ static int rtw_resume_process_normal(struct adapter *padapter)
 	netif_device_attach(pnetdev);
 	netif_carrier_on(pnetdev);
 
-	if (padapter->pid[1] != 0) {
+	if (padapter->pid[1] != 0)
 		rtw_signal_process(padapter->pid[1], SIGUSR2);
-	}
 
 	if (check_fwstate(pmlmepriv, WIFI_STATION_STATE)) {
 		if (rtw_chk_roam_flags(padapter, RTW_ROAM_ON_RESUME))
 			rtw_roaming(padapter, NULL);
-
 	} else if (check_fwstate(pmlmepriv, WIFI_AP_STATE)) {
 		rtw_ap_restore_network(padapter);
 	}
drivers/staging/rtl8723bs/os_dep/recv_linux.c +1 -2
index bb4835b64262..cd51430d4618 100644
@@ -62,9 +62,8 @@ struct sk_buff *rtw_os_alloc_msdu_pkt(union recv_frame *prframe, u16 nSubframe_L
 	pattrib = &prframe->u.hdr.attrib;
 
 	sub_skb = rtw_skb_alloc(nSubframe_Length + 12);
-	if (!sub_skb) {
+	if (!sub_skb)
 		return NULL;
-	}
 
 	skb_reserve(sub_skb, 12);
 	skb_put_data(sub_skb, (pdata + ETH_HLEN), nSubframe_Length);
drivers/staging/rtl8723bs/os_dep/sdio_intf.c +3 -6
index 99185fa73783..7010bdd0e69d 100644
@@ -58,9 +58,8 @@ static void sd_sync_int_hdl(struct sdio_func *func)
 
 	psdpriv = sdio_get_drvdata(func);
 
-	if (!psdpriv->if1) {
+	if (!psdpriv->if1)
 		return;
-	}
 
 	rtw_sdio_set_irq_thd(psdpriv, current);
 	sd_int_hdl(psdpriv->if1);
@@ -390,9 +389,8 @@ static int rtw_drv_init(
 		goto exit;
 
 	if1 = rtw_sdio_if1_init(dvobj, id);
-	if (if1 == NULL) {
+	if (if1 == NULL)
 		goto free_dvobj;
-	}
 
 	/* dev_alloc_name && register_netdev */
 	status = rtw_drv_register_netdev(if1);
@@ -461,9 +459,8 @@ static int rtw_sdio_suspend(struct device *dev)
 	struct adapter *padapter = psdpriv->if1;
 	struct debug_priv *pdbgpriv = &psdpriv->drv_dbg;
 
-	if (padapter->bDriverStopped) {
+	if (padapter->bDriverStopped)
 		return 0;
-	}
 
 	if (pwrpriv->bInSuspend) {
 		pdbgpriv->dbg_suspend_error_cnt++;
drivers/staging/rtl8723bs/os_dep/sdio_ops_linux.c +18 -34

169 lines not on this page · raw message

drivers/staging/rtl8723bs/os_dep/xmit_linux.c +3 -6
index 5e33b6c16157..639408eaf4df 100644
@@ -112,9 +112,8 @@ static void rtw_check_xmit_resource(struct adapter *padapter, struct sk_buff *pk
 	queue = skb_get_queue_mapping(pkt);
 	if (padapter->registrypriv.wifi_spec) {
 		/* No free space for Tx, tx_worker is too slow */
-		if (pxmitpriv->hwxmits[queue].accnt > WMM_XMIT_THRESHOLD) {
+		if (pxmitpriv->hwxmits[queue].accnt > WMM_XMIT_THRESHOLD)
 			netif_stop_subqueue(padapter->pnetdev, queue);
-		}
 	} else {
 		if (pxmitpriv->free_xmitframe_cnt <= 4) {
 			if (!netif_tx_queue_stopped(netdev_get_tx_queue(padapter->pnetdev, queue)))
@@ -193,9 +192,8 @@ int _rtw_xmit_entry(struct sk_buff *pkt, struct net_device *pnetdev)
 	struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
 	s32 res = 0;
 
-	if (rtw_if_up(padapter) == false) {
+	if (rtw_if_up(padapter) == false)
 		goto drop_packet;
-	}
 
 	rtw_check_xmit_resource(padapter, pkt);
 
@@ -213,9 +211,8 @@ int _rtw_xmit_entry(struct sk_buff *pkt, struct net_device *pnetdev)
 	}
 
 	res = rtw_xmit(padapter, &pkt);
-	if (res < 0) {
+	if (res < 0)
 		goto drop_packet;
-	}
 
 	goto exit;
 
Signature · 1 line
2.20.1
#20 lore raw

PATCH 13/19 staging: rtl8723bs: remove unnecessary parentheses in if condition

In reply to Fabio Aiuto

fix following post-commit hook checkpatch issue:

CHECK: Unnecessary parentheses around pcmdpriv->cmd_queue.queue 85: FILE: drivers/staging/rtl8723bs/core/rtw_cmd.c:422:
+ if (list_empty(&(pcmdpriv->cmd_queue.queue)))

---
 drivers/staging/rtl8723bs/core/rtw_cmd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8723bs/core/rtw_cmd.c +1 -1
index cc00bd4f4bc6..baf8b1e0f43c 100644
@@ -419,7 +419,7 @@ int rtw_cmd_thread(void *context)
 			break;
 		}
 
-		if (list_empty(&(pcmdpriv->cmd_queue.queue)))
+		if (list_empty(&pcmdpriv->cmd_queue.queue))
 			continue;
 
 		if (rtw_register_cmd_alive(padapter) != _SUCCESS)
Signature · 1 line
2.20.1
#21 lore raw

PATCH 14/19 staging: rtl8723bs: add spaces around operators

In reply to Fabio Aiuto

fix the following post-commit checkpatch issues:

CHECK: spaces preferred around that '|' (ctx:VxV)
187: FILE: drivers/staging/rtl8723bs/core/rtw_mlme.c:1659:
+ if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY|_FW_UNDER_LINKING) == true)
--
CHECK: spaces preferred around that '|' (ctx:VxV)
373: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:3023:
+ == (sta_bssrate[j]|IEEE80211_BASIC_RATE_MASK))
--
CHECK: spaces preferred around that '-' (ctx:VxV)
456: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:4098:
+ if (len > (NDIS_802_11_LENGTH_RATES_EX-i))
--
CHECK: spaces preferred around that '+' (ctx:VxV)
770: FILE: drivers/staging/rtl8723bs/core/rtw_security.c:1590:
+ if (pframe[hdrlen+8+plen-8+i] != message[hdrlen+8+plen-8+i])
--
CHECK: spaces preferred around that '+' (ctx:VxV)
770: FILE: drivers/staging/rtl8723bs/core/rtw_security.c:1590:
+ if (pframe[hdrlen+8+plen-8+i] != message[hdrlen+8+plen-8+i])
--
CHECK: spaces preferred around that '-' (ctx:VxV)
770: FILE: drivers/staging/rtl8723bs/core/rtw_security.c:1590:
+ if (pframe[hdrlen+8+plen-8+i] != message[hdrlen+8+plen-8+i])
--
CHECK: spaces preferred around that '+' (ctx:VxV)
770: FILE: drivers/staging/rtl8723bs/core/rtw_security.c:1590:
+ if (pframe[hdrlen+8+plen-8+i] != message[hdrlen+8+plen-8+i])
--
CHECK: spaces preferred around that '+' (ctx:VxV)
770: FILE: drivers/staging/rtl8723bs/core/rtw_security.c:1590:
+ if (pframe[hdrlen+8+plen-8+i] != message[hdrlen+8+plen-8+i])
--
CHECK: spaces preferred around that '+' (ctx:VxV)
770: FILE: drivers/staging/rtl8723bs/core/rtw_security.c:1590:
+ if (pframe[hdrlen+8+plen-8+i] != message[hdrlen+8+plen-8+i])
--
CHECK: spaces preferred around that '-' (ctx:VxV)
770: FILE: drivers/staging/rtl8723bs/core/rtw_security.c:1590:
+ if (pframe[hdrlen+8+plen-8+i] != message[hdrlen+8+plen-8+i])
--
CHECK: spaces preferred around that '+' (ctx:VxV)
770: FILE: drivers/staging/rtl8723bs/core/rtw_security.c:1590:
+ if (pframe[hdrlen+8+plen-8+i] != message[hdrlen+8+plen-8+i])
--
CHECK: spaces preferred around that '-' (ctx:VxV) 1001: FILE: drivers/staging/rtl8723bs/core/rtw_wlan_util.c:1849:
+ if (i > (NUM_STA-1))
--
CHECK: spaces preferred around that '&' (ctx:VxV) 1647: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:211:
+ if (mcs_rate&0x8000) /* MCS15 */

---
 drivers/staging/rtl8723bs/core/rtw_mlme.c      | 2 +-
 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c  | 4 ++--
 drivers/staging/rtl8723bs/core/rtw_security.c  | 2 +-
 drivers/staging/rtl8723bs/core/rtw_wlan_util.c | 2 +-
 drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 2 +-
 5 files changed, 6 insertions(+), 6 deletions(-)
drivers/staging/rtl8723bs/core/rtw_mlme.c +1 -1
index 585048c2520b..a7e40aaae2d9 100644
@@ -1656,7 +1656,7 @@ static void rtw_auto_scan_handler(struct adapter *padapter)
 		&& jiffies_to_msecs(jiffies - pmlmepriv->scan_start_time) > pmlmepriv->auto_scan_int_ms) {
 
 		if (!padapter->registrypriv.wifi_spec) {
-			if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY|_FW_UNDER_LINKING) == true)
+			if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY | _FW_UNDER_LINKING) == true)
 				goto exit;
 
 			if (pmlmepriv->LinkDetectInfo.bBusyTraffic)
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c +2 -2
index 93eb12130066..1ed43423f2de 100644
@@ -3019,8 +3019,8 @@ void issue_assocreq(struct adapter *padapter)
 		/*  Check if the AP's supported rates are also supported by STA. */
 		for (j = 0; j < sta_bssrate_len; j++) {
 			 /*  Avoid the proprietary data rate (22Mbps) of Handlink WSG-4000 AP */
-			if ((pmlmeinfo->network.SupportedRates[i]|IEEE80211_BASIC_RATE_MASK)
-					== (sta_bssrate[j]|IEEE80211_BASIC_RATE_MASK))
+			if ((pmlmeinfo->network.SupportedRates[i] | IEEE80211_BASIC_RATE_MASK)
+					== (sta_bssrate[j] | IEEE80211_BASIC_RATE_MASK))
 				break;
 		}
 
drivers/staging/rtl8723bs/core/rtw_security.c +1 -1
index 302479d9236b..bb15b5af744c 100644
@@ -1587,7 +1587,7 @@ static signed int aes_decipher(u8 *key, uint	hdrlen,
 
 	/* compare the mic */
 	for (i = 0; i < 8; i++) {
-		if (pframe[hdrlen+8+plen-8+i] != message[hdrlen+8+plen-8+i])
+		if (pframe[hdrlen + 8 + plen - 8 + i] != message[hdrlen + 8 + plen - 8 + i])
 			res = _FAIL;
 	}
 	return res;
drivers/staging/rtl8723bs/core/rtw_wlan_util.c +1 -1
index 7a73186de69d..8c516ed370f4 100644
@@ -1846,7 +1846,7 @@ void rtw_alloc_macid(struct adapter *padapter, struct sta_info *psta)
 	}
 	spin_unlock_bh(&pdvobj->lock);
 
-	if (i > (NUM_STA-1))
+	if (i > (NUM_STA - 1))
 		psta->mac_id = NUM_STA;
 	else
 		psta->mac_id = i;
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c +1 -1
index 21e85409edd1..40adecbb66d6 100644
@@ -208,7 +208,7 @@ static char *translate_scan(struct adapter *padapter,
 	if (vht_cap) {
 		max_rate = vht_data_rate;
 	} else if (ht_cap) {
-		if (mcs_rate&0x8000) /* MCS15 */
+		if (mcs_rate & 0x8000) /* MCS15 */
 			max_rate = (bw_40MHz) ? ((short_GI)?300:270):((short_GI)?144:130);
 		else /* default MCS7 */
 			max_rate = (bw_40MHz) ? ((short_GI)?150:135):((short_GI)?72:65);
Signature · 1 line
2.20.1
#22 lore raw

PATCH 15/19 staging: rtl8723bs: rewrite comparison to null

In reply to Fabio Aiuto

fi following post-commit checkpatch issues:

CHECK: Comparison to NULL could be written "!p"
290: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:978:
+ if (p == NULL)
--
CHECK: Comparison to NULL could be written "!pmgntframe"
328: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:2016:
+ if (pmgntframe == NULL)
--
CHECK: Comparison to NULL could be written "!pmgntframe"
361: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:2378:
+ if (pmgntframe == NULL)
--
CHECK: Comparison to NULL could be written "!pmgntframe"
391: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:3478:
+ if (pmgntframe == NULL)
--
CHECK: Comparison to NULL could be written "!p"
427: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:4071:
+ if (p == NULL)
--
CHECK: Comparison to NULL could be written "!BIP_AAD"
781: FILE: drivers/staging/rtl8723bs/core/rtw_security.c:1690:
+ if (BIP_AAD == NULL)
--
CHECK: Comparison to NULL could be written "!pwep"
1773: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:3062:
+ if (pwep == NULL)
--
CHECK: Comparison to NULL could be written "!pmlmepriv->wps_beacon_ie" 1784: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:3510:
+ if (pmlmepriv->wps_beacon_ie == NULL)
--
CHECK: Comparison to NULL could be written "!pmlmepriv->wps_probe_resp_ie" 1795: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:3544:
+ if (pmlmepriv->wps_probe_resp_ie == NULL)
--
CHECK: Comparison to NULL could be written "!pmlmepriv->wps_assoc_resp_ie" 1807: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:3574:
+ if (pmlmepriv->wps_assoc_resp_ie == NULL)
--
CHECK: Comparison to NULL could be written "!pbuf"
1818: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:3928:
+ if (pbuf == NULL)
--
CHECK: Comparison to NULL could be written "!if1"
1944: FILE: drivers/staging/rtl8723bs/os_dep/sdio_intf.c:392:
+ if (if1 == NULL)

CHECK: Using comparison to false is error prone
402: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:3890:
+ if (false == bxmitok)
--
CHECK: Using comparison to true is error prone
671: FILE: drivers/staging/rtl8723bs/core/rtw_recv.c:365:
+ if ((prxattrib->bdecrypted == true) && (brpt_micerror == true))
--
CHECK: Using comparison to true is error prone
1051: FILE: drivers/staging/rtl8723bs/core/rtw_xmit.c:1174:
+ if (padapter->securitypriv.binstallBIPkey != true)
--
CHECK: Using comparison to false is error prone
1632: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:2194:
+ if (false == bMatched)

---
 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c     | 12 ++++++------
 drivers/staging/rtl8723bs/core/rtw_recv.c         |  2 +-
 drivers/staging/rtl8723bs/core/rtw_security.c     |  2 +-
 drivers/staging/rtl8723bs/core/rtw_xmit.c         |  2 +-
 drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c |  2 +-
 drivers/staging/rtl8723bs/os_dep/ioctl_linux.c    | 10 +++++-----
 drivers/staging/rtl8723bs/os_dep/sdio_intf.c      |  2 +-
 7 files changed, 16 insertions(+), 16 deletions(-)
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c +6 -6
index 1ed43423f2de..7f998a2f8001 100644
@@ -975,7 +975,7 @@ unsigned int OnAuthClient(struct adapter *padapter, union recv_frame *precv_fram
 			p = rtw_get_ie(pframe + WLAN_HDR_A3_LEN + _AUTH_IE_OFFSET_, WLAN_EID_CHALLENGE, (int *)&len,
 				pkt_len - WLAN_HDR_A3_LEN - _AUTH_IE_OFFSET_);
 
-			if (p == NULL)
+			if (!p)
 				goto authclnt_fail;
 
 			memcpy((void *)(pmlmeinfo->chg_txt), (void *)(p + 2), len);
@@ -2013,7 +2013,7 @@ static struct xmit_frame *_alloc_mgtxmitframe(struct xmit_priv *pxmitpriv, bool
 	else
 		pmgntframe = rtw_alloc_xmitframe_ext(pxmitpriv);
 
-	if (pmgntframe == NULL)
+	if (!pmgntframe)
 		goto exit;
 
 	pxmitbuf = rtw_alloc_xmitbuf_ext(pxmitpriv);
@@ -2375,7 +2375,7 @@ void issue_probersp(struct adapter *padapter, unsigned char *da, u8 is_valid_p2p
 		return;
 
 	pmgntframe = alloc_mgtxmitframe(pxmitpriv);
-	if (pmgntframe == NULL)
+	if (!pmgntframe)
 		return;
 
 	/* update attribute */
@@ -3475,7 +3475,7 @@ void issue_action_SA_Query(struct adapter *padapter, unsigned char *raddr, unsig
 	__le16 le_tmp;
 
 	pmgntframe = alloc_mgtxmitframe(pxmitpriv);
-	if (pmgntframe == NULL)
+	if (!pmgntframe)
 		return;
 
 	/* update attribute */
@@ -3887,7 +3887,7 @@ unsigned int send_beacon(struct adapter *padapter)
 	}
 
 
-	if (false == bxmitok)
+	if (!bxmitok)
 		return _FAIL;
 	else
 		return _SUCCESS;
@@ -4068,7 +4068,7 @@ u8 collect_bss_info(struct adapter *padapter, union recv_frame *precv_frame, str
 
 	/*  checking SSID */
 	p = rtw_get_ie(bssid->IEs + ie_offset, WLAN_EID_SSID, &len, bssid->IELength - ie_offset);
-	if (p == NULL)
+	if (!p)
 		return _FAIL;
 
 	if (*(p + 1)) {
drivers/staging/rtl8723bs/core/rtw_recv.c +1 -1
index 866b8c540c0c..18ad719c9826 100644
@@ -362,7 +362,7 @@ static signed int recvframe_chkmic(struct adapter *adapter,  union recv_frame *p
 				if ((IS_MCAST(prxattrib->ra) == true)  && (prxattrib->key_index != pmlmeinfo->key_index))
 					brpt_micerror = false;
 
-				if ((prxattrib->bdecrypted == true) && (brpt_micerror == true))
+				if ((prxattrib->bdecrypted) && (brpt_micerror))
 					rtw_handle_tkip_mic_err(adapter, (u8)IS_MCAST(prxattrib->ra));
 
 				res = _FAIL;
drivers/staging/rtl8723bs/core/rtw_security.c +1 -1
index bb15b5af744c..9587d89a6b24 100644
@@ -1687,7 +1687,7 @@ u32 rtw_BIP_verify(struct adapter *padapter, u8 *precvframe)
 	ori_len = pattrib->pkt_len-WLAN_HDR_A3_LEN+BIP_AAD_SIZE;
 	BIP_AAD = rtw_zmalloc(ori_len);
 
-	if (BIP_AAD == NULL)
+	if (!BIP_AAD)
 		return _FAIL;
 
 	/* PKT start */
drivers/staging/rtl8723bs/core/rtw_xmit.c +1 -1
index af69f2da6ecd..77378f7d6b9e 100644
@@ -1171,7 +1171,7 @@ s32 rtw_mgmt_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, s
 		goto xmitframe_coalesce_success;
 
 	/* IGTK key is not install, it may not support 802.11w */
-	if (padapter->securitypriv.binstallBIPkey != true)
+	if (!padapter->securitypriv.binstallBIPkey)
 		goto xmitframe_coalesce_success;
 
 	/* station mode doesn't need TX BIP, just ready the code */
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c +1 -1
index ca58ea6c4fb8..f96322bdf510 100644
@@ -2191,7 +2191,7 @@ static int cfg80211_rtw_del_pmksa(struct wiphy *wiphy,
 		}
 	}
 
-	if (false == bMatched)
+	if (!bMatched)
 		return -EINVAL;
 
 	return 0;
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c +5 -5
index 40adecbb66d6..679deb781321 100644
@@ -3059,7 +3059,7 @@ static int rtw_set_encryption(struct net_device *dev, struct ieee_param *param,
 			wep_key_len = wep_key_len <= 5 ? 5 : 13;
 			wep_total_len = wep_key_len + FIELD_OFFSET(struct ndis_802_11_wep, KeyMaterial);
 			pwep = kzalloc(wep_total_len, GFP_KERNEL);
-			if (pwep == NULL)
+			if (!pwep)
 				goto exit;
 
 			pwep->KeyLength = wep_key_len;
@@ -3507,7 +3507,7 @@ static int rtw_set_wps_beacon(struct net_device *dev, struct ieee_param *param,
 	if (ie_len > 0) {
 		pmlmepriv->wps_beacon_ie = rtw_malloc(ie_len);
 		pmlmepriv->wps_beacon_ie_len = ie_len;
-		if (pmlmepriv->wps_beacon_ie == NULL)
+		if (!pmlmepriv->wps_beacon_ie)
 			return -EINVAL;
 
 		memcpy(pmlmepriv->wps_beacon_ie, param->u.bcn_ie.buf, ie_len);
@@ -3541,7 +3541,7 @@ static int rtw_set_wps_probe_resp(struct net_device *dev, struct ieee_param *par
 	if (ie_len > 0) {
 		pmlmepriv->wps_probe_resp_ie = rtw_malloc(ie_len);
 		pmlmepriv->wps_probe_resp_ie_len = ie_len;
-		if (pmlmepriv->wps_probe_resp_ie == NULL)
+		if (!pmlmepriv->wps_probe_resp_ie)
 			return -EINVAL;
 
 		memcpy(pmlmepriv->wps_probe_resp_ie, param->u.bcn_ie.buf, ie_len);
@@ -3571,7 +3571,7 @@ static int rtw_set_wps_assoc_resp(struct net_device *dev, struct ieee_param *par
 	if (ie_len > 0) {
 		pmlmepriv->wps_assoc_resp_ie = rtw_malloc(ie_len);
 		pmlmepriv->wps_assoc_resp_ie_len = ie_len;
-		if (pmlmepriv->wps_assoc_resp_ie == NULL)
+		if (!pmlmepriv->wps_assoc_resp_ie)
 			return -EINVAL;
 
 		memcpy(pmlmepriv->wps_assoc_resp_ie, param->u.bcn_ie.buf, ie_len);
@@ -3925,7 +3925,7 @@ static int rtw_test(
 	len = wrqu->data.length;
 
 	pbuf = rtw_zmalloc(len);
-	if (pbuf == NULL)
+	if (!pbuf)
 		return -ENOMEM;
 
 	if (copy_from_user(pbuf, wrqu->data.pointer, len)) {
drivers/staging/rtl8723bs/os_dep/sdio_intf.c +1 -1
index 7010bdd0e69d..5de4c70aab6a 100644
@@ -389,7 +389,7 @@ static int rtw_drv_init(
 		goto exit;
 
 	if1 = rtw_sdio_if1_init(dvobj, id);
-	if (if1 == NULL)
+	if (!if1)
 		goto free_dvobj;
 
 	/* dev_alloc_name && register_netdev */
Signature · 1 line
2.20.1
#23 lore raw

PATCH 16/19 staging: rtl8723bs: remove unnecessary parentheses

In reply to Fabio Aiuto

fix following post-commit checkpatch issue:

CHECK: Unnecessary parentheses around 'prxattrib->bdecrypted' 125: FILE: drivers/staging/rtl8723bs/core/rtw_recv.c:365:
+ if ((prxattrib->bdecrypted) && (brpt_micerror))

---
 drivers/staging/rtl8723bs/core/rtw_recv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8723bs/core/rtw_recv.c +1 -1
index 18ad719c9826..668a703dee7f 100644
@@ -362,7 +362,7 @@ static signed int recvframe_chkmic(struct adapter *adapter,  union recv_frame *p
 				if ((IS_MCAST(prxattrib->ra) == true)  && (prxattrib->key_index != pmlmeinfo->key_index))
 					brpt_micerror = false;
 
-				if ((prxattrib->bdecrypted) && (brpt_micerror))
+				if (prxattrib->bdecrypted && brpt_micerror)
 					rtw_handle_tkip_mic_err(adapter, (u8)IS_MCAST(prxattrib->ra));
 
 				res = _FAIL;
Signature · 1 line
2.20.1
#24 lore raw

PATCH 17/19 staging: rtl8723bs: fix comparison in if condition

In reply to Fabio Aiuto

fix following post-commit checkpatch issue:

WARNING: Comparisons should place the constant on the right side of the test 1833: FILE: drivers/staging/rtl8723bs/os_dep/mlme_linux.c:151:
+ if (NULL == buff)

---
 drivers/staging/rtl8723bs/os_dep/mlme_linux.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8723bs/os_dep/mlme_linux.c +1 -1
index f5c94509ad71..0a16752f805b 100644
@@ -148,7 +148,7 @@ void rtw_report_sec_ie(struct adapter *adapter, u8 authmode, u8 *sec_ie)
 	buff = NULL;
 	if (authmode == WLAN_EID_VENDOR_SPECIFIC) {
 		buff = rtw_zmalloc(IW_CUSTOM_MAX);
-		if (NULL == buff)
+		if (!buff)
 			return;
 
 		p = buff;
Signature · 1 line
2.20.1
#25 lore raw

PATCH 18/19 staging: rtl8723bs: split long lines

In reply to Fabio Aiuto

fix following post-commit checkpatch hooks:

WARNING: line length of 110 exceeds 100 columns
266: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:623:
+ pmlmepriv->cur_network.join_res) || check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE))
--
WARNING: line length of 102 exceeds 100 columns
468: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:5234:
+ if (tx_chk != _SUCCESS && pmlmeinfo->link_count++ == link_count_limit)
--
WARNING: line length of 124 exceeds 100 columns
543: FILE: drivers/staging/rtl8723bs/core/rtw_pwrctrl.c:335:
+ if ((padapter->securitypriv.dot11AuthAlgrthm == dot11AuthAlgrthm_8021X) && !(padapter->securitypriv.binstallGrpkey))
--
WARNING: line length of 112 exceeds 100 columns
828: FILE: drivers/staging/rtl8723bs/core/rtw_wlan_util.c:1061:
+ if (TEST_FLAG(phtpriv->stbc_cap, STBC_HT_ENABLE_TX) && GET_HT_CAPABILITY_ELE_TX_STBC(pIE->data))
--
WARNING: line length of 113 exceeds 100 columns
836: FILE: drivers/staging/rtl8723bs/core/rtw_wlan_util.c:1067:
+ if (TEST_FLAG(phtpriv->ldpc_cap, LDPC_HT_ENABLE_TX) && GET_HT_CAPABILITY_ELE_LDPC_CAP(pIE->data))
--
WARNING: line length of 112 exceeds 100 columns
844: FILE: drivers/staging/rtl8723bs/core/rtw_wlan_util.c:1073:
+ if (TEST_FLAG(phtpriv->stbc_cap, STBC_HT_ENABLE_TX) && GET_HT_CAPABILITY_ELE_RX_STBC(pIE->data))
--
WARNING: line length of 125 exceeds 100 columns
883: FILE: drivers/staging/rtl8723bs/core/rtw_wlan_util.c:1282:
+ rtw_get_ie(bssid->IEs + _FIXED_IE_LENGTH_, WLAN_EID_HT_OPERATION, &len, bssid->IELength - _FIXED_IE_LENGTH_);
--
WARNING: line length of 101 exceeds 100 columns
904: FILE: drivers/staging/rtl8723bs/core/rtw_wlan_util.c:1305:
+ if (bssid->Ssid.Ssid[0] != '\0' && bssid->Ssid.SsidLength != 0) /* not hidden ssid */
--
WARNING: line length of 129 exceeds 100 columns
953: FILE: drivers/staging/rtl8723bs/core/rtw_wlan_util.c:1345:
+ if (pairwise_cipher != cur_network->BcnInfo.pairwise_cipher || group_cipher != cur_network->BcnInfo.group_cipher)
--
WARNING: line length of 113 exceeds 100 columns
1712: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:2651:

---
 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c  |  8 +++++---
 drivers/staging/rtl8723bs/core/rtw_pwrctrl.c   |  3 ++-
 drivers/staging/rtl8723bs/core/rtw_wlan_util.c | 18 ++++++++++++------
 drivers/staging/rtl8723bs/os_dep/ioctl_linux.c |  3 ++-
 4 files changed, 21 insertions(+), 11 deletions(-)
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c +5 -3
index 7f998a2f8001..a1e27ba4707e 100644
@@ -619,8 +619,9 @@ unsigned int OnProbeReq(struct adapter *padapter, union recv_frame *precv_frame)
 			return _SUCCESS;
 
 _issue_probersp:
-		if ((check_fwstate(pmlmepriv, _FW_LINKED)  &&
-			pmlmepriv->cur_network.join_res) || check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE))
+		if ((check_fwstate(pmlmepriv, _FW_LINKED) &&
+		     pmlmepriv->cur_network.join_res) ||
+		     check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE))
 			issue_probersp(padapter, get_sa(pframe), is_valid_p2p_probereq);
 	}
 
@@ -5231,7 +5232,8 @@ void linked_status_chk(struct adapter *padapter)
 					}
 				}
 
-				if (tx_chk != _SUCCESS && pmlmeinfo->link_count++ == link_count_limit)
+				if (tx_chk != _SUCCESS &&
+				    pmlmeinfo->link_count++ == link_count_limit)
 					tx_chk = issue_nulldata_in_interrupt(padapter, NULL);
 			}
 
drivers/staging/rtl8723bs/core/rtw_pwrctrl.c +2 -1
index d43462d5e618..893c7a417587 100644
@@ -332,7 +332,8 @@ static u8 PS_RDY_CHECK(struct adapter *padapter)
 	)
 		return false;
 
-	if ((padapter->securitypriv.dot11AuthAlgrthm == dot11AuthAlgrthm_8021X) && !(padapter->securitypriv.binstallGrpkey))
+	if ((padapter->securitypriv.dot11AuthAlgrthm == dot11AuthAlgrthm_8021X) &&
+	    !(padapter->securitypriv.binstallGrpkey))
 		return false;
 
 	if (!rtw_cfg80211_pwr_mgmt(padapter))
drivers/staging/rtl8723bs/core/rtw_wlan_util.c +12 -6
index 8c516ed370f4..76c4105d1fe8 100644
@@ -1058,19 +1058,22 @@ void HT_caps_handler(struct adapter *padapter, struct ndis_80211_var_ie *pIE)
 
 	if (check_fwstate(pmlmepriv, WIFI_AP_STATE)) {
 		/*  Config STBC setting */
-		if (TEST_FLAG(phtpriv->stbc_cap, STBC_HT_ENABLE_TX) && GET_HT_CAPABILITY_ELE_TX_STBC(pIE->data))
+		if (TEST_FLAG(phtpriv->stbc_cap, STBC_HT_ENABLE_TX) &&
+		    GET_HT_CAPABILITY_ELE_TX_STBC(pIE->data))
 			SET_FLAG(cur_stbc_cap, STBC_HT_ENABLE_TX);
 
 		phtpriv->stbc_cap = cur_stbc_cap;
 	} else {
 		/*  Config LDPC Coding Capability */
-		if (TEST_FLAG(phtpriv->ldpc_cap, LDPC_HT_ENABLE_TX) && GET_HT_CAPABILITY_ELE_LDPC_CAP(pIE->data))
+		if (TEST_FLAG(phtpriv->ldpc_cap, LDPC_HT_ENABLE_TX) &&
+		    GET_HT_CAPABILITY_ELE_LDPC_CAP(pIE->data))
 			SET_FLAG(cur_ldpc_cap, (LDPC_HT_ENABLE_TX | LDPC_HT_CAP_TX));
 
 		phtpriv->ldpc_cap = cur_ldpc_cap;
 
 		/*  Config STBC setting */
-		if (TEST_FLAG(phtpriv->stbc_cap, STBC_HT_ENABLE_TX) && GET_HT_CAPABILITY_ELE_RX_STBC(pIE->data))
+		if (TEST_FLAG(phtpriv->stbc_cap, STBC_HT_ENABLE_TX) &&
+		    GET_HT_CAPABILITY_ELE_RX_STBC(pIE->data))
 			SET_FLAG(cur_stbc_cap, (STBC_HT_ENABLE_TX | STBC_HT_CAP_TX));
 
 		phtpriv->stbc_cap = cur_stbc_cap;
@@ -1279,7 +1282,8 @@ int rtw_check_bcn_info(struct adapter *Adapter, u8 *pframe, u32 packet_len)
 	if (p) {
 			bcn_channel = *(p + 2);
 	} else {/* In 5G, some ap do not have DSSET IE checking HT info for channel */
-		rtw_get_ie(bssid->IEs + _FIXED_IE_LENGTH_, WLAN_EID_HT_OPERATION, &len, bssid->IELength - _FIXED_IE_LENGTH_);
+		rtw_get_ie(bssid->IEs + _FIXED_IE_LENGTH_, WLAN_EID_HT_OPERATION,
+			   &len, bssid->IELength - _FIXED_IE_LENGTH_);
 		if (pht_info)
 			bcn_channel = pht_info->primary_channel;
 		else /* we don't find channel IE, so don't check it */
@@ -1302,7 +1306,8 @@ int rtw_check_bcn_info(struct adapter *Adapter, u8 *pframe, u32 packet_len)
 
 	if (memcmp(bssid->Ssid.Ssid, cur_network->network.Ssid.Ssid, 32) ||
 			bssid->Ssid.SsidLength != cur_network->network.Ssid.SsidLength)
-		if (bssid->Ssid.Ssid[0] != '\0' && bssid->Ssid.SsidLength != 0) /* not hidden ssid */
+		if (bssid->Ssid.Ssid[0] != '\0' &&
+		    bssid->Ssid.SsidLength != 0) /* not hidden ssid */
 			goto _mismatch;
 
 	/* check encryption info */
@@ -1342,7 +1347,8 @@ int rtw_check_bcn_info(struct adapter *Adapter, u8 *pframe, u32 packet_len)
 						  &pairwise_cipher, &is_8021x);
 		}
 
-		if (pairwise_cipher != cur_network->BcnInfo.pairwise_cipher || group_cipher != cur_network->BcnInfo.group_cipher)
+		if (pairwise_cipher != cur_network->BcnInfo.pairwise_cipher ||
+		    group_cipher != cur_network->BcnInfo.group_cipher)
 			goto _mismatch;
 
 		if (is_8021x != cur_network->BcnInfo.is_8021x)
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c +2 -1
index 679deb781321..a9820d813d8b 100644
@@ -2648,7 +2648,8 @@ static int rtw_dbg_port(struct net_device *dev,
 					struct registry_priv *pregpriv = &padapter->registrypriv;
 					/*  0: disable, bit(0):enable 2.4g, bit(1):enable 5g, 0x3: enable both 2.4g and 5g */
 					/* default is set to enable 2.4GHZ for IOT issue with bufflao's AP at 5GHZ */
-					if (extra_arg == 0 || extra_arg == 1 || extra_arg == 2 || extra_arg == 3)
+					if (extra_arg == 0 || extra_arg == 1 ||
+					    extra_arg == 2 || extra_arg == 3)
 						pregpriv->rx_stbc = extra_arg;
 				}
 				break;
Signature · 1 line
2.20.1
#28 lore raw

PATCH 19/19 staging: rtl8723bs: remove unnecessary parentheses

In reply to Fabio Aiuto

fix following post-commit checkpatch issue:

CHECK: Unnecessary parentheses around 'padapter->securitypriv.dot11AuthAlgrthm == dot11AuthAlgrthm_8021X' 84: FILE: drivers/staging/rtl8723bs/core/rtw_pwrctrl.c:335:
+ if ((padapter->securitypriv.dot11AuthAlgrthm

			== dot11AuthAlgrthm_8021X) &&

+ !(padapter->securitypriv.binstallGrpkey))

---
 drivers/staging/rtl8723bs/core/rtw_pwrctrl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8723bs/core/rtw_pwrctrl.c +2 -2
index 893c7a417587..f7465cf90c46 100644
@@ -332,8 +332,8 @@ static u8 PS_RDY_CHECK(struct adapter *padapter)
 	)
 		return false;
 
-	if ((padapter->securitypriv.dot11AuthAlgrthm == dot11AuthAlgrthm_8021X) &&
-	    !(padapter->securitypriv.binstallGrpkey))
+	if (padapter->securitypriv.dot11AuthAlgrthm == dot11AuthAlgrthm_8021X &&
+	    !padapter->securitypriv.binstallGrpkey)
 		return false;
 
 	if (!rtw_cfg80211_pwr_mgmt(padapter))
Signature · 1 line
2.20.1
maintainer
#9 lore raw

Re: [PATCH 07/19] drivers: rtl8723bs: rewrite comparison to null

In reply to Fabio Aiuto
Quoted 10 lines · Fabio Aiuto

fix following post-commit hook checkpatch warnings:

CHECK: Comparison to NULL could be written "!psta" 97: FILE: drivers/staging/rtl8723bs/core/rtw_ap.c:2115:

(quoted diff) +1 -0
+		if (psta == NULL)
---
 drivers/staging/rtl8723bs/core/rtw_ap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Nit, your subject line has "drivers:" not "staging:" here. Be a bit more careful next time please.

thanks,

greg k-h

maintainer
#29 lore raw
In reply to Fabio Aiuto
Quoted 105 lines · Fabio Aiuto

This patchset removes all DBG_871X usages and definitions.

The whole private tracing system is not tied to a configuration symbol and the default behaviour is _trace nothing_.

DBG_871X macros require the code to be modified by
hand in order to be turned on. This obviously has not happened since the code was merged, so just remove them as they are unused.

First patch fix a DBG_871X call. It has three args over only two placeholders in the first format string argument.
If I would not make this fix, the semantic patch
used to bulk remove all macro occurences would ignore the abnormal macro (the one with three args) and all subsequent occurrences in the same file (core/rtw_recv.c).

The second patch applies the cocci script.

This is the semantic patch:

@@
expression a, b, c, d, e, f, g, h, i, j, k;
constant B, C, D, E;
@@

(

(quoted diff) +0 -1
-	DBG_871X(a);

|

(quoted diff) +0 -1
-	DBG_871X(a, b);

|

(quoted diff) +0 -1
-	DBG_871X(a, B);

|

(quoted diff) +0 -1
-	DBG_871X(a, b, c);

|

(quoted diff) +0 -1
-	DBG_871X(a, B, c);

|

(quoted diff) +0 -1
-	DBG_871X(a, b, C);

|

(quoted diff) +0 -1
-	DBG_871X(a, B, C);

|

(quoted diff) +0 -1
-	DBG_871X(a, b, c, d);

|

(quoted diff) +0 -1
-	DBG_871X(a, B, c, d);

|

(quoted diff) +0 -1
-	DBG_871X(a, b, C, d);

|

(quoted diff) +0 -1
-	DBG_871X(a, b, c, D);

|

(quoted diff) +0 -1
-	DBG_871X(a, B, C, d);

|

(quoted diff) +0 -1
-	DBG_871X(a, B, c, D);

|

(quoted diff) +0 -1
-	DBG_871X(a, b, C, D);

|

(quoted diff) +0 -1
-	DBG_871X(a, B, C, D);

|

(quoted diff) +0 -1
-	DBG_871X(a, b, c, d, e);

|

(quoted diff) +0 -1
-	DBG_871X(a, B, c, d, e);

|

(quoted diff) +0 -1
-	DBG_871X(a, b, C, d, e);

|

(quoted diff) +0 -1
-	DBG_871X(a, b, c, D, e);

|

(quoted diff) +0 -1
-	DBG_871X(a, b, c, d, E);

|

(quoted diff) +0 -1
-	DBG_871X(a, B, C, d, e);

|

(quoted diff) +0 -1
-	DBG_871X(a, B, c, D, e);

|

(quoted diff) +0 -1
-	DBG_871X(a, B, c, d, E);

|

(quoted diff) +0 -1
-	DBG_871X(a, b, C, D, e);

|

(quoted diff) +0 -1
-	DBG_871X(a, b, C, d, E);

|

(quoted diff) +0 -1
-	DBG_871X(a, b, c, D, E);

|

(quoted diff) +0 -1
-	DBG_871X(a, B, C, D, e);

|

(quoted diff) +0 -1
-	DBG_871X(a, B, C, d, E);

|

(quoted diff) +0 -1
-	DBG_871X(a, B, c, D, E);

|

(quoted diff) +0 -1
-	DBG_871X(a, b, C, D, E);

|

(quoted diff) +0 -1
-	DBG_871X(a, B, C, D, E);

|

(quoted diff) +0 -1
-	DBG_871X(a, b, c, d, e, f);

|

(quoted diff) +0 -1
-	DBG_871X(a, b, c, d, e, f, g);

|

(quoted diff) +0 -1
-	DBG_871X(a, b, c, d, e, f, g, h);

|

(quoted diff) +0 -1
-	DBG_871X(a, b, c, d, e, f, g, h, i);

|

(quoted diff) +0 -1
-	DBG_871X(a, b, c, d, e, f, g, h, i, j);

|

(quoted diff) +0 -1
-	DBG_871X(a, b, c, d, e, f, g, h, i, j, k);

)

The third one removes an unmatched macro call, maybe due to the trailing \, because the occurrence is inside a macro expansion.

Quoted 7 lines

The fourth one deletes all commented out call spread all over the rtl8723bs code.

Fifth one removes definitions.

All remaining patches do some code cleaning on all places where DBG_871X has been removed.

Nice work, thanks for doing this, all now queued up!

greg k-h

#10 lore raw

Re: [PATCH 07/19] drivers: rtl8723bs: rewrite comparison to null

In reply to Greg KH
Quoted 15 lines · Greg KH
Quoted 10 lines · Fabio Aiuto

fix following post-commit hook checkpatch warnings:

CHECK: Comparison to NULL could be written "!psta" 97: FILE: drivers/staging/rtl8723bs/core/rtw_ap.c:2115:

(quoted diff) +1 -0
+		if (psta == NULL)
---
 drivers/staging/rtl8723bs/core/rtw_ap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Nit, your subject line has "drivers:" not "staging:" here. Be a bit more careful next time please.

Quoted 3 lines

thanks,

greg k-h

sorry, you can drop them off the staging-testing branch and I will resend you all if you want,

fabio

maintainer
#11 lore raw

Re: [PATCH 07/19] drivers: rtl8723bs: rewrite comparison to null

Quoted 16 lines · Fabio Aiuto
Quoted 15 lines · Greg KH
Quoted 10 lines · Fabio Aiuto

fix following post-commit hook checkpatch warnings:

CHECK: Comparison to NULL could be written "!psta" 97: FILE: drivers/staging/rtl8723bs/core/rtw_ap.c:2115:

(quoted diff) +1 -0
+		if (psta == NULL)
---
 drivers/staging/rtl8723bs/core/rtw_ap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Nit, your subject line has "drivers:" not "staging:" here. Be a bit more careful next time please.

Quoted 5 lines
Quoted 3 lines

thanks,

greg k-h

sorry, you can drop them off the staging-testing branch and I will resend you all if you want,

Nah, it's not worth it, I'll keep them for now :)

#12 lore raw

Re: [PATCH 07/19] drivers: rtl8723bs: rewrite comparison to null

Quoted 17 lines · Greg KH
Quoted 16 lines · Fabio Aiuto
Quoted 15 lines · Greg KH
Quoted 10 lines · Fabio Aiuto

fix following post-commit hook checkpatch warnings:

CHECK: Comparison to NULL could be written "!psta" 97: FILE: drivers/staging/rtl8723bs/core/rtw_ap.c:2115:

(quoted diff) +1 -0
+		if (psta == NULL)
---
 drivers/staging/rtl8723bs/core/rtw_ap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Nit, your subject line has "drivers:" not "staging:" here. Be a bit more careful next time please.

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

thanks,

greg k-h

sorry, you can drop them off the staging-testing branch and I will resend you all if you want,

Nah, it's not worth it, I'll keep them for now :)

:-D

#30 lore raw
In reply to Greg KH
Quoted 109 lines · Greg KH
Quoted 108 lines · Fabio Aiuto

This patchset removes all DBG_871X usages and definitions.

The whole private tracing system is not tied to a configuration symbol and the default behaviour is _trace nothing_.

DBG_871X macros require the code to be modified by
hand in order to be turned on. This obviously has not happened since the code was merged, so just remove them as they are unused.

First patch fix a DBG_871X call. It has three args over only two placeholders in the first format string argument.
If I would not make this fix, the semantic patch
used to bulk remove all macro occurences would ignore the abnormal macro (the one with three args) and all subsequent occurrences in the same file (core/rtw_recv.c).

The second patch applies the cocci script.

This is the semantic patch:

@@
expression a, b, c, d, e, f, g, h, i, j, k;
constant B, C, D, E;
@@

(

(quoted diff) +0 -1
-	DBG_871X(a);

|

(quoted diff) +0 -1
-	DBG_871X(a, b);

|

(quoted diff) +0 -1
-	DBG_871X(a, B);

|

(quoted diff) +0 -1
-	DBG_871X(a, b, c);

|

(quoted diff) +0 -1
-	DBG_871X(a, B, c);

|

(quoted diff) +0 -1
-	DBG_871X(a, b, C);

|

(quoted diff) +0 -1
-	DBG_871X(a, B, C);

|

(quoted diff) +0 -1
-	DBG_871X(a, b, c, d);

|

(quoted diff) +0 -1
-	DBG_871X(a, B, c, d);

|

(quoted diff) +0 -1
-	DBG_871X(a, b, C, d);

|

(quoted diff) +0 -1
-	DBG_871X(a, b, c, D);

|

(quoted diff) +0 -1
-	DBG_871X(a, B, C, d);

|

(quoted diff) +0 -1
-	DBG_871X(a, B, c, D);

|

(quoted diff) +0 -1
-	DBG_871X(a, b, C, D);

|

(quoted diff) +0 -1
-	DBG_871X(a, B, C, D);

|

(quoted diff) +0 -1
-	DBG_871X(a, b, c, d, e);

|

(quoted diff) +0 -1
-	DBG_871X(a, B, c, d, e);

|

(quoted diff) +0 -1
-	DBG_871X(a, b, C, d, e);

|

(quoted diff) +0 -1
-	DBG_871X(a, b, c, D, e);

|

(quoted diff) +0 -1
-	DBG_871X(a, b, c, d, E);

|

(quoted diff) +0 -1
-	DBG_871X(a, B, C, d, e);

|

(quoted diff) +0 -1
-	DBG_871X(a, B, c, D, e);

|

(quoted diff) +0 -1
-	DBG_871X(a, B, c, d, E);

|

(quoted diff) +0 -1
-	DBG_871X(a, b, C, D, e);

|

(quoted diff) +0 -1
-	DBG_871X(a, b, C, d, E);

|

(quoted diff) +0 -1
-	DBG_871X(a, b, c, D, E);

|

(quoted diff) +0 -1
-	DBG_871X(a, B, C, D, e);

|

(quoted diff) +0 -1
-	DBG_871X(a, B, C, d, E);

|

(quoted diff) +0 -1
-	DBG_871X(a, B, c, D, E);

|

(quoted diff) +0 -1
-	DBG_871X(a, b, C, D, E);

|

(quoted diff) +0 -1
-	DBG_871X(a, B, C, D, E);

|

(quoted diff) +0 -1
-	DBG_871X(a, b, c, d, e, f);

|

(quoted diff) +0 -1
-	DBG_871X(a, b, c, d, e, f, g);

|

(quoted diff) +0 -1
-	DBG_871X(a, b, c, d, e, f, g, h);

|

(quoted diff) +0 -1
-	DBG_871X(a, b, c, d, e, f, g, h, i);

|

(quoted diff) +0 -1
-	DBG_871X(a, b, c, d, e, f, g, h, i, j);

|

(quoted diff) +0 -1
-	DBG_871X(a, b, c, d, e, f, g, h, i, j, k);

)

The third one removes an unmatched macro call, maybe due to the trailing \, because the occurrence is inside a macro expansion.

The fourth one deletes all commented out call spread all over the rtl8723bs code.

Quoted 8 lines
Quoted 4 lines

Fifth one removes definitions.

All remaining patches do some code cleaning on all places where DBG_871X has been removed.

Nice work, thanks for doing this, all now queued up!

greg k-h

thank you,

fabio

#7 lore raw

Re: [PATCH 06/19] staging: rtl8723bs: remove all if-else empty blocks left by DBG_871X removal

In reply to Fabio Aiuto
Thank you for the patch! Perhaps something to improve:

Hi Fabio,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on staging/staging-testing]

url:    https://github.com/0day-ci/linux/commits/Fabio-Aiuto/staging-rtl8723bs-remove-DBG_871X-trace-macro/20210407-215248
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 52f8b696b7cdaeba932977ded59816113866e2ab
config: arc-allyesconfig (attached as .config)
compiler: arceb-elf-gcc (GCC) 9.3.0

reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/f3195b939e7a3415c0a73cedde5a12a7a34f3433
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Fabio-Aiuto/staging-rtl8723bs-remove-DBG_871X-trace-macro/20210407-215248 git checkout f3195b939e7a3415c0a73cedde5a12a7a34f3433
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arc

If you fix the issue, kindly add following tag as appropriate

All warnings (new ones prefixed by >>):

drivers/staging/rtl8723bs/core/rtw_cmd.c: In function 'rtw_cmd_thread':

>> drivers/staging/rtl8723bs/core/rtw_cmd.c:390:16: warning: variable 'cmd_start_time' set but not used [-Wunused-but-set-variable]
     390 |  unsigned long cmd_start_time;
         |                ^~~~~~~~~~~~~~
   In file included from drivers/staging/rtl8723bs/include/drv_types.h:33,
                    from drivers/staging/rtl8723bs/core/rtw_cmd.c:9:
   At top level:
   drivers/staging/rtl8723bs/include/rtw_security.h:336:28: warning: 'K' defined but not used [-Wunused-const-variable=]
     336 | static const unsigned long K[64] = {
         |                            ^
--
   drivers/staging/rtl8723bs/os_dep/ioctl_linux.c: In function 'rtw_wx_set_mlme':
   drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:1136:6: warning: variable 'reason' set but not used [-Wunused-but-set-variable]
    1136 |  u16 reason;
         |      ^~~~~~
   drivers/staging/rtl8723bs/os_dep/ioctl_linux.c: In function 'rtw_dbg_port':
>> drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:2575:33: warning: variable 'preorder_ctrl' set but not used [-Wunused-but-set-variable]
    2575 |       struct recv_reorder_ctrl *preorder_ctrl;
         |                                 ^~~~~~~~~~~~~
   drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:2601:33: warning: variable 'preorder_ctrl' set but not used [-Wunused-but-set-variable]
    2601 |       struct recv_reorder_ctrl *preorder_ctrl;
         |                                 ^~~~~~~~~~~~~
   At top level:
   drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:36:27: warning: 'iw_operation_mode' defined but not used [-Wunused-const-variable=]
      36 | static const char * const iw_operation_mode[] = {
         |                           ^~~~~~~~~~~~~~~~~
   In file included from drivers/staging/rtl8723bs/include/drv_types.h:33,
                    from drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:10:
   drivers/staging/rtl8723bs/include/rtw_security.h:336:28: warning: 'K' defined but not used [-Wunused-const-variable=]
     336 | static const unsigned long K[64] = {
         |                            ^

vim +/cmd_start_time +390 drivers/staging/rtl8723bs/core/rtw_cmd.c

554c0a3abf216c Hans de Goede     2017-03-29  384  
554c0a3abf216c Hans de Goede     2017-03-29  385  int rtw_cmd_thread(void *context)
554c0a3abf216c Hans de Goede     2017-03-29  386  {
554c0a3abf216c Hans de Goede     2017-03-29  387  	u8 ret;
554c0a3abf216c Hans de Goede     2017-03-29  388  	struct cmd_obj *pcmd;
d698b0a0965681 YueHaibing        2019-07-31  389  	u8 *pcmdbuf;
554c0a3abf216c Hans de Goede     2017-03-29 @390  	unsigned long cmd_start_time;
554c0a3abf216c Hans de Goede     2017-03-29  391  	u8 (*cmd_hdl)(struct adapter *padapter, u8 *pbuf);
554c0a3abf216c Hans de Goede     2017-03-29  392  	void (*pcmd_callback)(struct adapter *dev, struct cmd_obj *pcmd);
529d87b44da777 Himanshu Jha      2017-08-28  393  	struct adapter *padapter = context;
554c0a3abf216c Hans de Goede     2017-03-29  394  	struct cmd_priv *pcmdpriv = &(padapter->cmdpriv);
554c0a3abf216c Hans de Goede     2017-03-29  395  	struct drvextra_cmd_parm *extra_parm = NULL;
554c0a3abf216c Hans de Goede     2017-03-29  396  
554c0a3abf216c Hans de Goede     2017-03-29  397  	thread_enter("RTW_CMD_THREAD");
554c0a3abf216c Hans de Goede     2017-03-29  398  
554c0a3abf216c Hans de Goede     2017-03-29  399  	pcmdbuf = pcmdpriv->cmd_buf;
554c0a3abf216c Hans de Goede     2017-03-29  400  
554c0a3abf216c Hans de Goede     2017-03-29  401  	pcmdpriv->stop_req = 0;
554c0a3abf216c Hans de Goede     2017-03-29  402  	atomic_set(&(pcmdpriv->cmdthd_running), true);
09a8ea34cf431b Arnd Bergmann     2018-12-10  403  	complete(&pcmdpriv->terminate_cmdthread_comp);
554c0a3abf216c Hans de Goede     2017-03-29  404  
554c0a3abf216c Hans de Goede     2017-03-29  405  	while (1) {
09a8ea34cf431b Arnd Bergmann     2018-12-10  406  		if (wait_for_completion_interruptible(&pcmdpriv->cmd_queue_comp)) {
09a8ea34cf431b Arnd Bergmann     2018-12-10  407  			DBG_871X_LEVEL(_drv_always_, FUNC_ADPT_FMT" wait_for_completion_interruptible(&pcmdpriv->cmd_queue_comp) return != 0, break\n", FUNC_ADPT_ARG(padapter));
554c0a3abf216c Hans de Goede     2017-03-29  408  			break;
554c0a3abf216c Hans de Goede     2017-03-29  409  		}
554c0a3abf216c Hans de Goede     2017-03-29  410  
554c0a3abf216c Hans de Goede     2017-03-29  411  		if ((padapter->bDriverStopped == true) || (padapter->bSurpriseRemoved == true)) {
554c0a3abf216c Hans de Goede     2017-03-29  412  			DBG_871X_LEVEL(_drv_always_, "%s: DriverStopped(%d) SurpriseRemoved(%d) break at line %d\n",
554c0a3abf216c Hans de Goede     2017-03-29  413  				__func__, padapter->bDriverStopped, padapter->bSurpriseRemoved, __LINE__);
554c0a3abf216c Hans de Goede     2017-03-29  414  			break;
554c0a3abf216c Hans de Goede     2017-03-29  415  		}
554c0a3abf216c Hans de Goede     2017-03-29  416  
554c0a3abf216c Hans de Goede     2017-03-29  417  		if (pcmdpriv->stop_req) {
554c0a3abf216c Hans de Goede     2017-03-29  418  			DBG_871X_LEVEL(_drv_always_, FUNC_ADPT_FMT" stop_req:%u, break\n", FUNC_ADPT_ARG(padapter), pcmdpriv->stop_req);
554c0a3abf216c Hans de Goede     2017-03-29  419  			break;
554c0a3abf216c Hans de Goede     2017-03-29  420  		}
554c0a3abf216c Hans de Goede     2017-03-29  421  
554c0a3abf216c Hans de Goede     2017-03-29  422  		if (list_empty(&(pcmdpriv->cmd_queue.queue))) {
554c0a3abf216c Hans de Goede     2017-03-29  423  			continue;
554c0a3abf216c Hans de Goede     2017-03-29  424  		}
554c0a3abf216c Hans de Goede     2017-03-29  425  
13aefa65bc6a63 Fabio Aiuto       2021-04-04  426  		if (rtw_register_cmd_alive(padapter) != _SUCCESS)
554c0a3abf216c Hans de Goede     2017-03-29  427  			continue;
554c0a3abf216c Hans de Goede     2017-03-29  428  
554c0a3abf216c Hans de Goede     2017-03-29  429  _next:
554c0a3abf216c Hans de Goede     2017-03-29  430  		if ((padapter->bDriverStopped == true) || (padapter->bSurpriseRemoved == true)) {
554c0a3abf216c Hans de Goede     2017-03-29  431  			DBG_871X_LEVEL(_drv_always_, "%s: DriverStopped(%d) SurpriseRemoved(%d) break at line %d\n",
554c0a3abf216c Hans de Goede     2017-03-29  432  				__func__, padapter->bDriverStopped, padapter->bSurpriseRemoved, __LINE__);
554c0a3abf216c Hans de Goede     2017-03-29  433  			break;
554c0a3abf216c Hans de Goede     2017-03-29  434  		}
554c0a3abf216c Hans de Goede     2017-03-29  435  
554c0a3abf216c Hans de Goede     2017-03-29  436  		pcmd = rtw_dequeue_cmd(pcmdpriv);
554c0a3abf216c Hans de Goede     2017-03-29  437  		if (!pcmd) {
554c0a3abf216c Hans de Goede     2017-03-29  438  			rtw_unregister_cmd_alive(padapter);
554c0a3abf216c Hans de Goede     2017-03-29  439  			continue;
554c0a3abf216c Hans de Goede     2017-03-29  440  		}
554c0a3abf216c Hans de Goede     2017-03-29  441  
554c0a3abf216c Hans de Goede     2017-03-29  442  		cmd_start_time = jiffies;
554c0a3abf216c Hans de Goede     2017-03-29  443  
92576c84c8c608 Manuel Palenzuela 2020-10-29  444  		if (rtw_cmd_filter(pcmdpriv, pcmd) == _FAIL) {
554c0a3abf216c Hans de Goede     2017-03-29  445  			pcmd->res = H2C_DROPPED;
554c0a3abf216c Hans de Goede     2017-03-29  446  			goto post_process;
554c0a3abf216c Hans de Goede     2017-03-29  447  		}
554c0a3abf216c Hans de Goede     2017-03-29  448  
554c0a3abf216c Hans de Goede     2017-03-29  449  		pcmdpriv->cmd_issued_cnt++;
554c0a3abf216c Hans de Goede     2017-03-29  450  
046bd5c9c2833f Ross Schmidt      2020-10-03  451  		pcmd->cmdsz = round_up((pcmd->cmdsz), 4);
554c0a3abf216c Hans de Goede     2017-03-29  452  
554c0a3abf216c Hans de Goede     2017-03-29  453  		memcpy(pcmdbuf, pcmd->parmbuf, pcmd->cmdsz);
554c0a3abf216c Hans de Goede     2017-03-29  454  
554c0a3abf216c Hans de Goede     2017-03-29  455  		if (pcmd->cmdcode < ARRAY_SIZE(wlancmds)) {
554c0a3abf216c Hans de Goede     2017-03-29  456  			cmd_hdl = wlancmds[pcmd->cmdcode].h2cfuns;
554c0a3abf216c Hans de Goede     2017-03-29  457  
554c0a3abf216c Hans de Goede     2017-03-29  458  			if (cmd_hdl) {
554c0a3abf216c Hans de Goede     2017-03-29  459  				ret = cmd_hdl(pcmd->padapter, pcmdbuf);
554c0a3abf216c Hans de Goede     2017-03-29  460  				pcmd->res = ret;
554c0a3abf216c Hans de Goede     2017-03-29  461  			}
554c0a3abf216c Hans de Goede     2017-03-29  462  
554c0a3abf216c Hans de Goede     2017-03-29  463  			pcmdpriv->cmd_seq++;
554c0a3abf216c Hans de Goede     2017-03-29  464  		} else {
554c0a3abf216c Hans de Goede     2017-03-29  465  			pcmd->res = H2C_PARAMETERS_ERROR;
554c0a3abf216c Hans de Goede     2017-03-29  466  		}
554c0a3abf216c Hans de Goede     2017-03-29  467  
554c0a3abf216c Hans de Goede     2017-03-29  468  		cmd_hdl = NULL;
554c0a3abf216c Hans de Goede     2017-03-29  469  
554c0a3abf216c Hans de Goede     2017-03-29  470  post_process:
554c0a3abf216c Hans de Goede     2017-03-29  471  
554c0a3abf216c Hans de Goede     2017-03-29  472  		if (mutex_lock_interruptible(&(pcmd->padapter->cmdpriv.sctx_mutex)) == 0) {
554c0a3abf216c Hans de Goede     2017-03-29  473  			if (pcmd->sctx) {
554c0a3abf216c Hans de Goede     2017-03-29  474  				DBG_871X_LEVEL(_drv_always_, FUNC_ADPT_FMT" pcmd->sctx\n",
554c0a3abf216c Hans de Goede     2017-03-29  475  					       FUNC_ADPT_ARG(pcmd->padapter));
554c0a3abf216c Hans de Goede     2017-03-29  476  
554c0a3abf216c Hans de Goede     2017-03-29  477  				if (pcmd->res == H2C_SUCCESS)
554c0a3abf216c Hans de Goede     2017-03-29  478  					rtw_sctx_done(&pcmd->sctx);
554c0a3abf216c Hans de Goede     2017-03-29  479  				else
554c0a3abf216c Hans de Goede     2017-03-29  480  					rtw_sctx_done_err(&pcmd->sctx, RTW_SCTX_DONE_CMD_ERROR);
554c0a3abf216c Hans de Goede     2017-03-29  481  			}
554c0a3abf216c Hans de Goede     2017-03-29  482  			mutex_unlock(&(pcmd->padapter->cmdpriv.sctx_mutex));
554c0a3abf216c Hans de Goede     2017-03-29  483  		}
554c0a3abf216c Hans de Goede     2017-03-29  484  
554c0a3abf216c Hans de Goede     2017-03-29  485  		/* call callback function for post-processed */
554c0a3abf216c Hans de Goede     2017-03-29  486  		if (pcmd->cmdcode < ARRAY_SIZE(rtw_cmd_callback)) {
554c0a3abf216c Hans de Goede     2017-03-29  487  			pcmd_callback = rtw_cmd_callback[pcmd->cmdcode].callback;
554c0a3abf216c Hans de Goede     2017-03-29  488  			if (pcmd_callback == NULL) {
554c0a3abf216c Hans de Goede     2017-03-29  489  				rtw_free_cmd_obj(pcmd);
554c0a3abf216c Hans de Goede     2017-03-29  490  			} else {
554c0a3abf216c Hans de Goede     2017-03-29  491  				/* todo: !!! fill rsp_buf to pcmd->rsp if (pcmd->rsp!= NULL) */
858ea450ae5d18 R Veera Kumar     2020-03-26  492  				pcmd_callback(pcmd->padapter, pcmd);/* need consider that free cmd_obj in rtw_cmd_callback */
554c0a3abf216c Hans de Goede     2017-03-29  493  			}
554c0a3abf216c Hans de Goede     2017-03-29  494  		} else {
554c0a3abf216c Hans de Goede     2017-03-29  495  			rtw_free_cmd_obj(pcmd);
554c0a3abf216c Hans de Goede     2017-03-29  496  		}
554c0a3abf216c Hans de Goede     2017-03-29  497  
554c0a3abf216c Hans de Goede     2017-03-29  498  		flush_signals_thread();
554c0a3abf216c Hans de Goede     2017-03-29  499  
554c0a3abf216c Hans de Goede     2017-03-29  500  		goto _next;
554c0a3abf216c Hans de Goede     2017-03-29  501  
554c0a3abf216c Hans de Goede     2017-03-29  502  	}
554c0a3abf216c Hans de Goede     2017-03-29  503  
554c0a3abf216c Hans de Goede     2017-03-29  504  	/*  free all cmd_obj resources */
554c0a3abf216c Hans de Goede     2017-03-29  505  	do {
554c0a3abf216c Hans de Goede     2017-03-29  506  		pcmd = rtw_dequeue_cmd(pcmdpriv);
554c0a3abf216c Hans de Goede     2017-03-29  507  		if (pcmd == NULL) {
554c0a3abf216c Hans de Goede     2017-03-29  508  			rtw_unregister_cmd_alive(padapter);
554c0a3abf216c Hans de Goede     2017-03-29  509  			break;
554c0a3abf216c Hans de Goede     2017-03-29  510  		}
554c0a3abf216c Hans de Goede     2017-03-29  511  
554c0a3abf216c Hans de Goede     2017-03-29  512  		if (pcmd->cmdcode == GEN_CMD_CODE(_Set_Drv_Extra)) {
554c0a3abf216c Hans de Goede     2017-03-29  513  			extra_parm = (struct drvextra_cmd_parm *)pcmd->parmbuf;
8f870aab80b041 Manuel Palenzuela 2020-10-28  514  			if (extra_parm->pbuf && extra_parm->size > 0)
554c0a3abf216c Hans de Goede     2017-03-29  515  				kfree(extra_parm->pbuf);
554c0a3abf216c Hans de Goede     2017-03-29  516  		}
554c0a3abf216c Hans de Goede     2017-03-29  517  
554c0a3abf216c Hans de Goede     2017-03-29  518  		rtw_free_cmd_obj(pcmd);
554c0a3abf216c Hans de Goede     2017-03-29  519  	} while (1);
554c0a3abf216c Hans de Goede     2017-03-29  520  
09a8ea34cf431b Arnd Bergmann     2018-12-10  521  	complete(&pcmdpriv->terminate_cmdthread_comp);
554c0a3abf216c Hans de Goede     2017-03-29  522  	atomic_set(&(pcmdpriv->cmdthd_running), false);
554c0a3abf216c Hans de Goede     2017-03-29  523  
554c0a3abf216c Hans de Goede     2017-03-29  524  	thread_exit();
554c0a3abf216c Hans de Goede     2017-03-29  525  }
554c0a3abf216c Hans de Goede     2017-03-29  526  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

#18 lore raw

Re: [PATCH 12/19] staging: rtl8723bs: remove unnecessary bracks on DBG_871X removal sites

In reply to Fabio Aiuto

drivers/staging/rtl8723bs/os_dep/ioctl_linux.c static int rtw_dbg_port(struct net_device *dev, · line 2593

Quoted 11 lines · Fabio Aiuto
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c +2 -4
@@ -2586,11 +2583,9 @@ static int rtw_dbg_port(struct net_device *dev,
 
 								plist = get_next(plist);
 
-								if (extra_arg == psta->aid) {
-									for (j = 0; j < 16; j++) {
+								if (extra_arg == psta->aid)
+									for (j = 0; j < 16; j++)
 										preorder_ctrl = &psta->recvreorder_ctrl[j];
-									}
-								}

I think Greg already applied this so no stress (don't bother fixing), but you removed a bit too much on this one. Multi-line indents normally get curly braces for readability. In other words:

				if (extra_arg == psta->aid) {
					for (j = 0; j < 16; j++)
						preorder_ctrl = &psta->recvreorder_ctrl[j];
				}

regards,
dan carpenter

#26 lore raw

Re: [PATCH 18/19] staging: rtl8723bs: split long lines

In reply to Fabio Aiuto

drivers/staging/rtl8723bs/core/rtw_mlme_ext.c unsigned int OnProbeReq(struct adapter *padapter, union recv_frame *precv_frame) · line 624

Quoted 13 lines · Fabio Aiuto
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c +3 -2
index 7f998a2f8001..a1e27ba4707e 100644
@@ -619,8 +619,9 @@ unsigned int OnProbeReq(struct adapter *padapter, union recv_frame *precv_frame)
 			return _SUCCESS;
 
 _issue_probersp:
-		if ((check_fwstate(pmlmepriv, _FW_LINKED)  &&
-			pmlmepriv->cur_network.join_res) || check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE))
+		if ((check_fwstate(pmlmepriv, _FW_LINKED) &&
+		     pmlmepriv->cur_network.join_res) ||
+		     check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE))

The last line is indented one space character too much. It should be:

		if ((check_fwstate(pmlmepriv, _FW_LINKED) &&
		     pmlmepriv->cur_network.join_res) ||
		    check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE))

regards,
dan carpenter

#27 lore raw

PATCH 1/1 staging: rtl8723bs: fix indentation issue introduced by long line split

fix indentation of last line in if condition.

Fixes af6afdb63f17 (staging: rtl8723bs: split long lines)
---
 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c +1 -1
index f19a15a3924b..4cdc5802798d 100644
@@ -621,7 +621,7 @@ unsigned int OnProbeReq(struct adapter *padapter, union recv_frame *precv_frame)
 _issue_probersp:
 		if ((check_fwstate(pmlmepriv, _FW_LINKED) &&
 		     pmlmepriv->cur_network.join_res) ||
-		     check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE))
+		    check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE))
 			issue_probersp(padapter, get_sa(pframe), is_valid_p2p_probereq);
 	}
 
Signature · 1 line
2.20.1
#19 lore raw

Re: [PATCH 12/19] staging: rtl8723bs: remove unnecessary bracks on DBG_871X removal sites

In reply to Dan Carpenter
Quoted 27 lines · Dan Carpenter

Review

Quoted 13 lines · Fabio Aiuto
(quoted diff) +0 -0
@@ -2586,11 +2583,9 @@ static int rtw_dbg_port(struct net_device *dev,

  plist = get_next(plist);

drivers/staging/rtl8723bs/os_dep/ioctl_linux.c +2 -2
-								if (extra_arg == psta->aid) {
-									for (j = 0; j < 16; j++) {
+								if (extra_arg == psta->aid)
+									for (j = 0; j < 16; j++)

  preorder_ctrl = &psta->recvreorder_ctrl[j];

(quoted diff) +0 -2
-									}
-								}

I think Greg already applied this so no stress (don't bother fixing), but you removed a bit too much on this one. Multi-line indents normally get curly braces for readability. In other words:

				if (extra_arg == psta->aid) {
					for (j = 0; j < 16; j++)
						preorder_ctrl = &psta->recvreorder_ctrl[j];
				}

regards,
dan carpenter