Commit b4f27a06 authored by Fabio Aiuto's avatar Fabio Aiuto Committed by Greg Kroah-Hartman
Browse files

staging: rtl8723bs: remove empty #ifdef blocks after DBG_871X removal



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

Signed-off-by: default avatarFabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/4e19eb1c71bc1d43d30c1b0a04851ab7ce528f36.1617802415.git.fabioaiuto83@gmail.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ae31f4ed
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -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);
+0 −14
Original line number Diff line number Diff line
@@ -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);

+0 −18
Original line number Diff line number Diff line
@@ -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);
				}
			}
+0 −76
Original line number Diff line number Diff line
@@ -416,9 +416,6 @@ static union recv_frame *decryptor(struct adapter *padapter, union recv_frame *p
	if ((prxattrib->encrypt > 0) && ((prxattrib->bdecrypted == 0) || (psecuritypriv->sw_decrypt == true))) {
		psecuritypriv->hw_decrypted = false;

		#ifdef DBG_RX_DECRYPTOR
		#endif

		switch (prxattrib->encrypt) {
		case _WEP40_:
		case _WEP104_:
@@ -437,12 +434,7 @@ static union recv_frame *decryptor(struct adapter *padapter, union recv_frame *p
		   (psecuritypriv->busetkipkey == 1 || prxattrib->encrypt != _TKIP_)
		) {
		psecuritypriv->hw_decrypted = true;
		#ifdef DBG_RX_DECRYPTOR

		#endif
	} else {
		#ifdef DBG_RX_DECRYPTOR
		#endif
	}

	if (res == _FAIL) {
@@ -765,16 +757,12 @@ static signed int ap2sta_data_frame(struct adapter *adapter, union recv_frame *p

		/*  filter packets that SA is myself or multicast or broadcast */
		if (!memcmp(myhwaddr, pattrib->src, ETH_ALEN)) {
			#ifdef DBG_RX_DROP_FRAME
			#endif
			ret = _FAIL;
			goto exit;
		}

		/*  da should be for me */
		if ((memcmp(myhwaddr, pattrib->dst, ETH_ALEN)) && (!bmcast)) {
			#ifdef DBG_RX_DROP_FRAME
			#endif
			ret = _FAIL;
			goto exit;
		}
@@ -784,8 +772,6 @@ static signed int ap2sta_data_frame(struct adapter *adapter, union recv_frame *p
		if (!memcmp(pattrib->bssid, "\x0\x0\x0\x0\x0\x0", ETH_ALEN) ||
		     !memcmp(mybssid, "\x0\x0\x0\x0\x0\x0", ETH_ALEN) ||
		     (memcmp(pattrib->bssid, mybssid, ETH_ALEN))) {
			#ifdef DBG_RX_DROP_FRAME
			#endif

			if (!bmcast) {
				issue_deauth(adapter, pattrib->bssid, WLAN_REASON_CLASS3_FRAME_FROM_NONASSOC_STA);
@@ -801,8 +787,6 @@ static signed int ap2sta_data_frame(struct adapter *adapter, union recv_frame *p
			*psta = rtw_get_stainfo(pstapriv, pattrib->bssid); /*  get ap_info */

		if (!*psta) {
			#ifdef DBG_RX_DROP_FRAME
			#endif
			ret = _FAIL;
			goto exit;
		}
@@ -828,8 +812,6 @@ static signed int ap2sta_data_frame(struct adapter *adapter, union recv_frame *p

		*psta = rtw_get_stainfo(pstapriv, pattrib->bssid); /*  get sta_info */
		if (!*psta) {
			#ifdef DBG_RX_DROP_FRAME
			#endif
			ret = _FAIL;
			goto exit;
		}
@@ -856,8 +838,6 @@ static signed int ap2sta_data_frame(struct adapter *adapter, union recv_frame *p
		}

		ret = _FAIL;
		#ifdef DBG_RX_DROP_FRAME
		#endif
	}

exit:
@@ -1267,8 +1247,6 @@ static signed int validate_recv_data_frame(struct adapter *adapter, union recv_f
	pbssid = get_hdr_bssid(ptr);

	if (!pbssid) {
		#ifdef DBG_RX_DROP_FRAME
		#endif
		ret = _FAIL;
		goto exit;
	}
@@ -1310,8 +1288,6 @@ static signed int validate_recv_data_frame(struct adapter *adapter, union recv_f
	}

	if (ret == _FAIL) {
		#ifdef DBG_RX_DROP_FRAME
		#endif
		goto exit;
	} else if (ret == RTW_RX_HANDLED) {
		goto exit;
@@ -1319,8 +1295,6 @@ static signed int validate_recv_data_frame(struct adapter *adapter, union recv_f


	if (!psta) {
		#ifdef DBG_RX_DROP_FRAME
		#endif
		ret = _FAIL;
		goto exit;
	}
@@ -1355,8 +1329,6 @@ static signed int validate_recv_data_frame(struct adapter *adapter, union recv_f

	/*  decache, drop duplicate recv packets */
	if (recv_decache(precv_frame, bretry, &psta->sta_recvpriv.rxcache) == _FAIL) {
		#ifdef DBG_RX_DROP_FRAME
		#endif
		ret = _FAIL;
		goto exit;
	}
@@ -1523,8 +1495,6 @@ static signed int validate_recv_frame(struct adapter *adapter, union recv_frame
		}
		break;
	default:
		#ifdef DBG_RX_DROP_FRAME
		#endif
		retval = _FAIL;
		break;
	}
@@ -1681,8 +1651,6 @@ static int check_indicate_seq(struct recv_reorder_ctrl *preorder_ctrl, u16 seq_n
	/*  Rx Reorder initialize condition. */
	if (preorder_ctrl->indicate_seq == 0xFFFF) {
		preorder_ctrl->indicate_seq = seq_num;
		#ifdef DBG_RX_SEQ
		#endif

		/* DbgPrint("check_indicate_seq, 1st->indicate_seq =%d\n", precvpriv->indicate_seq); */
	}
@@ -1693,10 +1661,6 @@ static int check_indicate_seq(struct recv_reorder_ctrl *preorder_ctrl, u16 seq_n
	if (SN_LESS(seq_num, preorder_ctrl->indicate_seq)) {
		/* DbgPrint("CheckRxTsIndicateSeq(): Packet Drop! IndicateSeq: %d, NewSeq: %d\n", precvpriv->indicate_seq, seq_num); */

		#ifdef DBG_RX_DROP_FRAME
		#endif


		return false;
	}

@@ -1708,8 +1672,6 @@ static int check_indicate_seq(struct recv_reorder_ctrl *preorder_ctrl, u16 seq_n
	if (SN_EQUAL(seq_num, preorder_ctrl->indicate_seq)) {
		preorder_ctrl->indicate_seq = (preorder_ctrl->indicate_seq + 1) & 0xFFF;

		#ifdef DBG_RX_SEQ
		#endif
	} else if (SN_LESS(wend, seq_num)) {
		/* DbgPrint("CheckRxTsIndicateSeq(): Window Shift! IndicateSeq: %d, NewSeq: %d\n", precvpriv->indicate_seq, seq_num); */

@@ -1719,8 +1681,6 @@ static int check_indicate_seq(struct recv_reorder_ctrl *preorder_ctrl, u16 seq_n
		else
			preorder_ctrl->indicate_seq = 0xFFF - (wsize - (seq_num + 1)) + 1;
		pdbgpriv->dbg_rx_ampdu_window_shift_cnt++;
		#ifdef DBG_RX_SEQ
		#endif
	}

	/* DbgPrint("exit->check_indicate_seq(): IndicateSeq: %d, NewSeq: %d\n", precvpriv->indicate_seq, seq_num); */
@@ -1818,8 +1778,6 @@ static int recv_indicatepkts_in_order(struct adapter *padapter, struct recv_reor
		prframe = (union recv_frame *)plist;
		pattrib = &prframe->u.hdr.attrib;

		#ifdef DBG_RX_SEQ
		#endif
		recv_indicatepkts_pkt_loss_cnt(pdbgpriv, preorder_ctrl->indicate_seq, pattrib->seq_num);
		preorder_ctrl->indicate_seq = pattrib->seq_num;

@@ -1838,8 +1796,6 @@ static int recv_indicatepkts_in_order(struct adapter *padapter, struct recv_reor

			if (SN_EQUAL(preorder_ctrl->indicate_seq, pattrib->seq_num)) {
				preorder_ctrl->indicate_seq = (preorder_ctrl->indicate_seq + 1) & 0xFFF;
				#ifdef DBG_RX_SEQ
				#endif
			}

			/* Set this as a lock to make sure that only one thread is indicating packet. */
@@ -1904,9 +1860,6 @@ static int recv_indicatepkt_reorder(struct adapter *padapter, union recv_frame *

			}

			#ifdef DBG_RX_DROP_FRAME
			#endif

			return _FAIL;

		}
@@ -1914,32 +1867,22 @@ static int recv_indicatepkt_reorder(struct adapter *padapter, union recv_frame *
		if (preorder_ctrl->enable == false) {
			/* indicate this recv_frame */
			preorder_ctrl->indicate_seq = pattrib->seq_num;
			#ifdef DBG_RX_SEQ
			#endif

			rtw_recv_indicatepkt(padapter, prframe);

			preorder_ctrl->indicate_seq = (preorder_ctrl->indicate_seq + 1)%4096;
			#ifdef DBG_RX_SEQ
			#endif

			return _SUCCESS;
		}
	} else if (pattrib->amsdu == 1) { /* temp filter -> means didn't support A-MSDUs in a A-MPDU */
		if (preorder_ctrl->enable == false) {
			preorder_ctrl->indicate_seq = pattrib->seq_num;
			#ifdef DBG_RX_SEQ
			#endif

			retval = amsdu_to_msdu(padapter, prframe);

			preorder_ctrl->indicate_seq = (preorder_ctrl->indicate_seq + 1)%4096;
			#ifdef DBG_RX_SEQ
			#endif

			if (retval != _SUCCESS) {
				#ifdef DBG_RX_DROP_FRAME
				#endif
			}

			return retval;
@@ -1951,8 +1894,6 @@ static int recv_indicatepkt_reorder(struct adapter *padapter, union recv_frame *
	/* s2. check if winstart_b(indicate_seq) needs to been updated */
	if (!check_indicate_seq(preorder_ctrl, pattrib->seq_num)) {
		pdbgpriv->dbg_rx_ampdu_drop_count++;
		#ifdef DBG_RX_DROP_FRAME
		#endif
		goto _err_exit;
	}

@@ -1962,8 +1903,6 @@ static int recv_indicatepkt_reorder(struct adapter *padapter, union recv_frame *
		/* DbgPrint("recv_indicatepkt_reorder, enqueue_reorder_recvframe fail!\n"); */
		/* spin_unlock_irqrestore(&ppending_recvframe_queue->lock, irql); */
		/* return _FAIL; */
		#ifdef DBG_RX_DROP_FRAME
		#endif
		goto _err_exit;
	}

@@ -2028,8 +1967,6 @@ static int process_recv_indicatepkts(struct adapter *padapter, union recv_frame
		/* prframe->u.hdr.preorder_ctrl = &precvpriv->recvreorder_ctrl[pattrib->priority]; */

		if (recv_indicatepkt_reorder(padapter, prframe) != _SUCCESS) { /*  including perform A-MPDU Rx Ordering Buffer Control */
			#ifdef DBG_RX_DROP_FRAME
			#endif

			if ((padapter->bDriverStopped == false) &&
			    (padapter->bSurpriseRemoved == false)) {
@@ -2040,8 +1977,6 @@ static int process_recv_indicatepkts(struct adapter *padapter, union recv_frame
	} else { /* B/G mode */
		retval = wlanhdr_to_ethhdr(prframe);
		if (retval != _SUCCESS) {
			#ifdef DBG_RX_DROP_FRAME
			#endif
			return retval;
		}

@@ -2084,23 +2019,17 @@ static int recv_func_posthandle(struct adapter *padapter, union recv_frame *prfr

	prframe = decryptor(padapter, prframe);
	if (!prframe) {
		#ifdef DBG_RX_DROP_FRAME
		#endif
		ret = _FAIL;
		goto _recv_data_drop;
	}

	prframe = recvframe_chk_defrag(padapter, prframe);
	if (!prframe)	{
		#ifdef DBG_RX_DROP_FRAME
		#endif
		goto _recv_data_drop;
	}

	prframe = portctrl(padapter, prframe);
	if (!prframe) {
		#ifdef DBG_RX_DROP_FRAME
		#endif
		ret = _FAIL;
		goto _recv_data_drop;
	}
@@ -2109,8 +2038,6 @@ static int recv_func_posthandle(struct adapter *padapter, union recv_frame *prfr

	ret = process_recv_indicatepkts(padapter, prframe);
	if (ret != _SUCCESS) {
		#ifdef DBG_RX_DROP_FRAME
		#endif
		rtw_free_recvframe(orig_prframe, pfree_recv_queue);/* free this recv_frame */
		goto _recv_data_drop;
	}
@@ -2261,9 +2188,6 @@ static void rtw_signal_stat_timer_hdl(struct timer_list *t)
		recvpriv->signal_strength = tmp_s;
		recvpriv->rssi = (s8)translate_percentage_to_dbm(tmp_s);
		recvpriv->signal_qual = tmp_q;

		#if defined(DBG_RX_SIGNAL_DISPLAY_PROCESSING) && 1
		#endif
	}

set_timer:
+0 −2
Original line number Diff line number Diff line
@@ -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; */
Loading