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

staging: rtl8723bs: remove unused code blocks conditioned by never set...


staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_INTERRUPT_BASED_TXBCN*

remove conditional code blocks checked by unused
CONFIG_INTERRUPT_BASED_TXBCN family defines

cleaning required in TODO file:

find and remove code blocks guarded by never set CONFIG_FOO defines

Signed-off-by: default avatarFabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/9157000821fd6febf25566b8c712fad1995c7c78.1615907632.git.fabioaiuto83@gmail.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b7743b82
Loading
Loading
Loading
Loading
+3 −27
Original line number Diff line number Diff line
@@ -920,12 +920,10 @@ void start_bss_network(struct adapter *padapter, u8 *pbuf)
	if (pmlmeext->bstart_bss) {
		update_beacon(padapter, WLAN_EID_TIM, NULL, true);

#ifndef CONFIG_INTERRUPT_BASED_TXBCN /* other case will  tx beacon when bcn interrupt coming in. */
	/* issue beacon frame */
	if (send_beacon(padapter) == _FAIL)
		DBG_871X("issue_beacon, fail!\n");

#endif /* CONFIG_INTERRUPT_BASED_TXBCN */
	}

	/* update bc/mc sta_info */
@@ -1685,26 +1683,6 @@ static void update_bcn_wps_ie(struct adapter *padapter)
	}

	kfree(pbackup_remainder_ie);

	/*  deal with the case without set_tx_beacon_cmd() in update_beacon() */
#if defined(CONFIG_INTERRUPT_BASED_TXBCN)
	if ((pmlmeinfo->state & 0x03) == WIFI_FW_AP_STATE) {
		u8 sr = 0;

		rtw_get_wps_attr_content(
			pwps_ie_src,
			wps_ielen,
			WPS_ATTR_SELECTED_REGISTRAR,
			(u8 *)(&sr),
			NULL
		);

		if (sr) {
			set_fwstate(pmlmepriv, WIFI_UNDER_WPS);
			DBG_871X("%s, set WIFI_UNDER_WPS\n", __func__);
		}
	}
#endif
}

static void update_bcn_p2p_ie(struct adapter *padapter)
@@ -1802,12 +1780,10 @@ void update_beacon(struct adapter *padapter, u8 ie_id, u8 *oui, u8 tx)

	spin_unlock_bh(&pmlmepriv->bcn_update_lock);

#ifndef CONFIG_INTERRUPT_BASED_TXBCN
	if (tx) {
		/* send_beacon(padapter);//send_beacon must execute on TSR level */
		set_tx_beacon_cmd(padapter);
	}
#endif /* CONFIG_INTERRUPT_BASED_TXBCN */
}

/*
+0 −21
Original line number Diff line number Diff line
@@ -3272,17 +3272,6 @@ static void hw_var_set_opmode(struct adapter *padapter, u8 variable, u8 *val)
		if ((mode == _HW_STATE_STATION_) || (mode == _HW_STATE_NOLINK_)) {
			{
				StopTxBeacon(padapter);
#ifdef CONFIG_INTERRUPT_BASED_TXBCN
#ifdef CONFIG_INTERRUPT_BASED_TXBCN_EARLY_INT
				rtw_write8(padapter, REG_DRVERLYINT, 0x05); /*  restore early int time to 5ms */
				UpdateInterruptMask8812AU(padapter, true, 0, IMR_BCNDMAINT0_8723B);
#endif /*  CONFIG_INTERRUPT_BASED_TXBCN_EARLY_INT */

#ifdef CONFIG_INTERRUPT_BASED_TXBCN_BCN_OK_ERR
				UpdateInterruptMask8812AU(padapter, true, 0, (IMR_TXBCN0ERR_8723B|IMR_TXBCN0OK_8723B));
#endif /*  CONFIG_INTERRUPT_BASED_TXBCN_BCN_OK_ERR */

#endif /*  CONFIG_INTERRUPT_BASED_TXBCN */
			}

			/*  disable atim wnd */
@@ -3292,16 +3281,6 @@ static void hw_var_set_opmode(struct adapter *padapter, u8 variable, u8 *val)
			ResumeTxBeacon(padapter);
			rtw_write8(padapter, REG_BCN_CTRL, DIS_TSF_UDT|EN_BCN_FUNCTION|DIS_BCNQ_SUB);
		} else if (mode == _HW_STATE_AP_) {
#ifdef CONFIG_INTERRUPT_BASED_TXBCN
#ifdef CONFIG_INTERRUPT_BASED_TXBCN_EARLY_INT
			UpdateInterruptMask8723BU(padapter, true, IMR_BCNDMAINT0_8723B, 0);
#endif /*  CONFIG_INTERRUPT_BASED_TXBCN_EARLY_INT */

#ifdef CONFIG_INTERRUPT_BASED_TXBCN_BCN_OK_ERR
			UpdateInterruptMask8723BU(padapter, true, (IMR_TXBCN0ERR_8723B|IMR_TXBCN0OK_8723B), 0);
#endif /*  CONFIG_INTERRUPT_BASED_TXBCN_BCN_OK_ERR */

#endif /*  CONFIG_INTERRUPT_BASED_TXBCN */

			ResumeTxBeacon(padapter);