Commit bf5bff47 authored by Maxim Mikityanskiy's avatar Maxim Mikityanskiy Committed by Greg Kroah-Hartman
Browse files

staging: rtl8187se: Removed empty functions and one-iteration loop



Removed empty functions, their calls and 'do {} while (0)' loop
condition

Signed-off-by: default avatarMaxim Mikityanskiy <maxtram95@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 51150d27
Loading
Loading
Loading
Loading
+89 −121
Original line number Diff line number Diff line
@@ -217,7 +217,6 @@ static int HwHSSIThreeWire(struct net_device *dev,
	u8	TryCnt;
	u8	u1bTmp;

	do {
	/* Check if WE and RE are cleared. */
	for (TryCnt = 0; TryCnt < TC_3W_POLL_MAX_TRY_CNT; TryCnt++) {
		u1bTmp = read_nic_byte(dev, SW_3W_CMD1);
@@ -328,8 +327,6 @@ static int HwHSSIThreeWire(struct net_device *dev,
		*((u16 *)pDataBuf) &= 0x0FFF;
	}

	} while (0);

	return bResult;
}

@@ -1148,18 +1145,11 @@ void rtl8185b_irq_enable(struct net_device *dev)
	write_nic_dword(dev, IMR, priv->IntrMask);
}

void DrvIFIndicateDisassociation(struct net_device *dev, u16 reason)
{
		/* nothing is needed after disassociation request. */
}

void MgntDisconnectIBSS(struct net_device *dev)
{
	struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
	u8 i;

	DrvIFIndicateDisassociation(dev, unspec_reason);

	for (i = 0; i < 6 ; i++)
		priv->ieee80211->current_network.bssid[i] = 0x55;

@@ -1190,8 +1180,6 @@ void MlmeDisassociateRequest(struct net_device *dev, u8 *asSta, u8 asRsn)

	if (memcmp(priv->ieee80211->current_network.bssid, asSta, 6) == 0) {
		/* ShuChen TODO: change media status. */
		/* ShuChen TODO: What to do when disassociate. */
		DrvIFIndicateDisassociation(dev, unspec_reason);

		for (i = 0; i < 6; i++)
			priv->ieee80211->current_network.bssid[i] = 0x22;
@@ -1267,14 +1255,6 @@ bool SetRFPowerState(struct net_device *dev, RT_RF_POWER_STATE eRFPowerState)
	return bResult;
}

void HalEnableRx8185Dummy(struct net_device *dev)
{
}

void HalDisableRx8185Dummy(struct net_device *dev)
{
}

bool MgntActSet_RF_State(struct net_device *dev, RT_RF_POWER_STATE StateToSet, u32 ChangeSource)
{
	struct	r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
@@ -1359,18 +1339,6 @@ bool MgntActSet_RF_State(struct net_device *dev, RT_RF_POWER_STATE StateToSet, u
	if (bActionAllowed) {
		/* Config HW to the specified mode. */
		SetRFPowerState(dev, StateToSet);

		/* Turn on RF.	*/
		if (StateToSet == eRfOn) {
			HalEnableRx8185Dummy(dev);
			if (bConnectBySSID) {
				/* by amy not supported	*/
			}
		}
		/* Turn off RF.	*/
		else if (StateToSet == eRfOff)
			HalDisableRx8185Dummy(dev);

	}

	/* Release RF spinlock	*/