Commit ada3334f 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 CONFIG_WOWLAN



remove conditional code blocks checked by unused CONFIG_WOWLAN

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/1d4e09852ff08e7121e9dd6d2d55d819d53ed702.1615744948.git.fabioaiuto83@gmail.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0bb8ece4
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -2098,9 +2098,6 @@ int rtw_select_and_join_from_scanned_queue(struct mlme_priv *pmlmepriv)

	if (!candidate) {
		DBG_871X("%s: return _FAIL(candidate == NULL)\n", __func__);
#ifdef CONFIG_WOWLAN
		_clr_fwstate_(pmlmepriv, _FW_LINKED|_FW_UNDER_LINKING);
#endif
		ret = _FAIL;
		goto exit;
	} else {
+3 −3
Original line number Diff line number Diff line
@@ -350,7 +350,7 @@ static u8 PS_RDY_CHECK(struct adapter *padapter)
	struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter);
	struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);

#if defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN)
#ifdef CONFIG_AP_WOWLAN
	if (pwrpriv->bInSuspend && pwrpriv->wowlan_mode)
		return true;
	else if (pwrpriv->bInSuspend && pwrpriv->wowlan_ap_mode)
@@ -391,7 +391,7 @@ static u8 PS_RDY_CHECK(struct adapter *padapter)
void rtw_set_ps_mode(struct adapter *padapter, u8 ps_mode, u8 smart_ps, u8 bcn_ant_mode, const char *msg)
{
	struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter);
#if defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN)
#ifdef CONFIG_AP_WOWLAN
	struct debug_priv *pdbgpriv = &padapter->dvobj->drv_dbg;
#endif

@@ -422,7 +422,7 @@ void rtw_set_ps_mode(struct adapter *padapter, u8 ps_mode, u8 smart_ps, u8 bcn_a
			pwrpriv->pwr_mode = ps_mode;
			rtw_set_rpwm(padapter, PS_STATE_S4);

#if defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN)
#ifdef CONFIG_AP_WOWLAN
			if (pwrpriv->wowlan_mode || pwrpriv->wowlan_ap_mode) {
				unsigned long start_time;
				u32 delay_ms;
+2 −51
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@
#include <rtw_debug.h>
#include <hal_com_h2c.h>

#if defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN)
#ifdef CONFIG_AP_WOWLAN
#include <linux/inetdevice.h>
#endif

@@ -2113,7 +2113,7 @@ int rtw_config_gpio(struct net_device *netdev, int gpio_num, bool isOutput)
EXPORT_SYMBOL(rtw_config_gpio);
#endif

#if defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN)
#ifdef CONFIG_AP_WOWLAN
void rtw_get_current_ip_address(struct adapter *padapter, u8 *pcurrentip)
{
	struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
@@ -2139,53 +2139,4 @@ void rtw_get_current_ip_address(struct adapter *padapter, u8 *pcurrentip)
	}
}
#endif
#ifdef CONFIG_WOWLAN
void rtw_get_sec_iv(struct adapter *padapter, u8 *pcur_dot11txpn, u8 *StaAddr)
{
	struct sta_info *psta;
	struct security_priv *psecpriv = &padapter->securitypriv;

	memset(pcur_dot11txpn, 0, 8);
	if (!StaAddr)
		return;
	psta = rtw_get_stainfo(&padapter->stapriv, StaAddr);
	DBG_871X("%s(): StaAddr: %02x %02x %02x %02x %02x %02x\n",
		__func__, StaAddr[0], StaAddr[1], StaAddr[2],
		StaAddr[3], StaAddr[4], StaAddr[5]);

	if (psta) {
		if (psecpriv->dot11PrivacyAlgrthm != _NO_PRIVACY_ && psta->dot11txpn.val > 0)
			psta->dot11txpn.val--;
		AES_IV(pcur_dot11txpn, psta->dot11txpn, 0);

		DBG_871X("%s(): CurrentIV: %02x %02x %02x %02x %02x %02x %02x %02x\n"
		, __func__, pcur_dot11txpn[0], pcur_dot11txpn[1],
		pcur_dot11txpn[2], pcur_dot11txpn[3], pcur_dot11txpn[4],
		pcur_dot11txpn[5], pcur_dot11txpn[6], pcur_dot11txpn[7]);
	}
}

void rtw_set_sec_pn(struct adapter *padapter)
{
		struct sta_info         *psta;
		struct mlme_ext_priv    *pmlmeext = &(padapter->mlmeextpriv);
		struct mlme_ext_info    *pmlmeinfo = &(pmlmeext->mlmext_info);
		struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter);
		struct security_priv *psecpriv = &padapter->securitypriv;

		psta = rtw_get_stainfo(&padapter->stapriv,
		get_my_bssid(&pmlmeinfo->network));

		if (psta) {
			if (pwrpriv->wowlan_fw_iv > psta->dot11txpn.val) {
				if (psecpriv->dot11PrivacyAlgrthm != _NO_PRIVACY_)
					psta->dot11txpn.val = pwrpriv->wowlan_fw_iv + 2;
			} else {
				DBG_871X("%s(): FW IV is smaller than driver\n", __func__);
				psta->dot11txpn.val += 2;
			}
			DBG_871X("%s: dot11txpn: 0x%016llx\n", __func__, psta->dot11txpn.val);
		}
}
#endif /* CONFIG_WOWLAN */
+6 −550

File changed.

Preview size limit exceeded, changes collapsed.

+3 −40

File changed.

Preview size limit exceeded, changes collapsed.

Loading