mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
Staging: rtl8187se: r8185b_init.c: Fix function declarations
Reformated the function declarations Signed-off-by: Andrew Miller <amiller@amilx.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
9af7e27dd7
commit
3d2ec48ee4
@ -117,24 +117,14 @@ static u8 OFDM_CONFIG[] = {
|
|||||||
* the code is ported from Windows source code
|
* the code is ported from Windows source code
|
||||||
----------------------------------------------------------------*/
|
----------------------------------------------------------------*/
|
||||||
|
|
||||||
void
|
void PlatformIOWrite1Byte(struct net_device *dev, u32 offset, u8 data)
|
||||||
PlatformIOWrite1Byte(
|
|
||||||
struct net_device *dev,
|
|
||||||
u32 offset,
|
|
||||||
u8 data
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
write_nic_byte(dev, offset, data);
|
write_nic_byte(dev, offset, data);
|
||||||
read_nic_byte(dev, offset); /* To make sure write operation is completed, 2005.11.09, by rcnjko. */
|
read_nic_byte(dev, offset); /* To make sure write operation is completed, 2005.11.09, by rcnjko. */
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void PlatformIOWrite2Byte(struct net_device *dev, u32 offset, u16 data)
|
||||||
PlatformIOWrite2Byte(
|
|
||||||
struct net_device *dev,
|
|
||||||
u32 offset,
|
|
||||||
u16 data
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
write_nic_word(dev, offset, data);
|
write_nic_word(dev, offset, data);
|
||||||
read_nic_word(dev, offset); /* To make sure write operation is completed, 2005.11.09, by rcnjko. */
|
read_nic_word(dev, offset); /* To make sure write operation is completed, 2005.11.09, by rcnjko. */
|
||||||
@ -143,12 +133,7 @@ PlatformIOWrite2Byte(
|
|||||||
}
|
}
|
||||||
u8 PlatformIORead1Byte(struct net_device *dev, u32 offset);
|
u8 PlatformIORead1Byte(struct net_device *dev, u32 offset);
|
||||||
|
|
||||||
void
|
void PlatformIOWrite4Byte(struct net_device *dev, u32 offset, u32 data)
|
||||||
PlatformIOWrite4Byte(
|
|
||||||
struct net_device *dev,
|
|
||||||
u32 offset,
|
|
||||||
u32 data
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
/* {by amy 080312 */
|
/* {by amy 080312 */
|
||||||
if (offset == PhyAddr) {
|
if (offset == PhyAddr) {
|
||||||
@ -194,11 +179,7 @@ PlatformIOWrite4Byte(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
u8
|
u8 PlatformIORead1Byte(struct net_device *dev, u32 offset)
|
||||||
PlatformIORead1Byte(
|
|
||||||
struct net_device *dev,
|
|
||||||
u32 offset
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
u8 data = 0;
|
u8 data = 0;
|
||||||
|
|
||||||
@ -208,11 +189,7 @@ PlatformIORead1Byte(
|
|||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
u16
|
u16 PlatformIORead2Byte(struct net_device *dev, u32 offset)
|
||||||
PlatformIORead2Byte(
|
|
||||||
struct net_device *dev,
|
|
||||||
u32 offset
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
u16 data = 0;
|
u16 data = 0;
|
||||||
|
|
||||||
@ -222,11 +199,7 @@ PlatformIORead2Byte(
|
|||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
u32
|
u32 PlatformIORead4Byte(struct net_device *dev, u32 offset)
|
||||||
PlatformIORead4Byte(
|
|
||||||
struct net_device *dev,
|
|
||||||
u32 offset
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
u32 data = 0;
|
u32 data = 0;
|
||||||
|
|
||||||
@ -241,14 +214,11 @@ void SetOutputEnableOfRfPins(struct net_device *dev)
|
|||||||
write_nic_word(dev, RFPinsEnable, 0x1bff);
|
write_nic_word(dev, RFPinsEnable, 0x1bff);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int HwHSSIThreeWire(struct net_device *dev,
|
||||||
HwHSSIThreeWire(
|
|
||||||
struct net_device *dev,
|
|
||||||
u8 *pDataBuf,
|
u8 *pDataBuf,
|
||||||
u8 nDataBufBitCnt,
|
u8 nDataBufBitCnt,
|
||||||
int bSI,
|
int bSI,
|
||||||
int bWrite
|
int bWrite)
|
||||||
)
|
|
||||||
{
|
{
|
||||||
int bResult = 1;
|
int bResult = 1;
|
||||||
u8 TryCnt;
|
u8 TryCnt;
|
||||||
@ -370,8 +340,7 @@ HwHSSIThreeWire(
|
|||||||
return bResult;
|
return bResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void RF_WriteReg(struct net_device *dev, u8 offset, u32 data)
|
||||||
RF_WriteReg(struct net_device *dev, u8 offset, u32 data)
|
|
||||||
{
|
{
|
||||||
u32 data2Write;
|
u32 data2Write;
|
||||||
u8 len;
|
u8 len;
|
||||||
@ -399,11 +368,7 @@ u32 RF_ReadReg(struct net_device *dev, u8 offset)
|
|||||||
|
|
||||||
|
|
||||||
/* by Owen on 04/07/14 for writing BB register successfully */
|
/* by Owen on 04/07/14 for writing BB register successfully */
|
||||||
void
|
void WriteBBPortUchar(struct net_device *dev, u32 Data)
|
||||||
WriteBBPortUchar(
|
|
||||||
struct net_device *dev,
|
|
||||||
u32 Data
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
/* u8 TimeoutCounter; */
|
/* u8 TimeoutCounter; */
|
||||||
u8 RegisterContent;
|
u8 RegisterContent;
|
||||||
@ -420,11 +385,7 @@ WriteBBPortUchar(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
u8
|
u8 ReadBBPortUchar(struct net_device *dev, u32 addr)
|
||||||
ReadBBPortUchar(
|
|
||||||
struct net_device *dev,
|
|
||||||
u32 addr
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
/*u8 TimeoutCounter; */
|
/*u8 TimeoutCounter; */
|
||||||
u8 RegisterContent;
|
u8 RegisterContent;
|
||||||
@ -440,12 +401,9 @@ ReadBBPortUchar(
|
|||||||
Perform Antenna settings with antenna diversity on 87SE.
|
Perform Antenna settings with antenna diversity on 87SE.
|
||||||
Created by Roger, 2008.01.25.
|
Created by Roger, 2008.01.25.
|
||||||
*/
|
*/
|
||||||
bool
|
bool SetAntennaConfig87SE(struct net_device *dev,
|
||||||
SetAntennaConfig87SE(
|
|
||||||
struct net_device *dev,
|
|
||||||
u8 DefaultAnt, /* 0: Main, 1: Aux. */
|
u8 DefaultAnt, /* 0: Main, 1: Aux. */
|
||||||
bool bAntDiversity /* 1:Enable, 0: Disable. */
|
bool bAntDiversity) /* 1:Enable, 0: Disable. */
|
||||||
)
|
|
||||||
{
|
{
|
||||||
struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
|
struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
|
||||||
bool bAntennaSwitched = true;
|
bool bAntennaSwitched = true;
|
||||||
@ -516,10 +474,7 @@ SetAntennaConfig87SE(
|
|||||||
* the code is ported from Windows source code
|
* the code is ported from Windows source code
|
||||||
----------------------------------------------------------------*/
|
----------------------------------------------------------------*/
|
||||||
|
|
||||||
void
|
void ZEBRA_Config_85BASIC_HardCode(struct net_device *dev)
|
||||||
ZEBRA_Config_85BASIC_HardCode(
|
|
||||||
struct net_device *dev
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
|
|
||||||
struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
|
struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
|
||||||
@ -747,10 +702,7 @@ ZEBRA_Config_85BASIC_HardCode(
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void UpdateInitialGain(struct net_device *dev)
|
||||||
UpdateInitialGain(
|
|
||||||
struct net_device *dev
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
|
struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
|
||||||
|
|
||||||
@ -825,10 +777,7 @@ UpdateInitialGain(
|
|||||||
Tx Power tracking mechanism routine on 87SE.
|
Tx Power tracking mechanism routine on 87SE.
|
||||||
Created by Roger, 2007.12.11.
|
Created by Roger, 2007.12.11.
|
||||||
*/
|
*/
|
||||||
void
|
void InitTxPwrTracking87SE(struct net_device *dev)
|
||||||
InitTxPwrTracking87SE(
|
|
||||||
struct net_device *dev
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
u32 u4bRfReg;
|
u32 u4bRfReg;
|
||||||
|
|
||||||
@ -838,10 +787,7 @@ InitTxPwrTracking87SE(
|
|||||||
RF_WriteReg(dev, 0x02, u4bRfReg|PWR_METER_EN); mdelay(1);
|
RF_WriteReg(dev, 0x02, u4bRfReg|PWR_METER_EN); mdelay(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void PhyConfig8185(struct net_device *dev)
|
||||||
PhyConfig8185(
|
|
||||||
struct net_device *dev
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
|
struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
|
||||||
write_nic_dword(dev, RCR, priv->ReceiveConfig);
|
write_nic_dword(dev, RCR, priv->ReceiveConfig);
|
||||||
@ -870,10 +816,7 @@ PhyConfig8185(
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void HwConfigureRTL8185(struct net_device *dev)
|
||||||
HwConfigureRTL8185(
|
|
||||||
struct net_device *dev
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
/* RTL8185_TODO: Determine Retrylimit, TxAGC, AutoRateFallback control. */
|
/* RTL8185_TODO: Determine Retrylimit, TxAGC, AutoRateFallback control. */
|
||||||
u8 bUNIVERSAL_CONTROL_RL = 0;
|
u8 bUNIVERSAL_CONTROL_RL = 0;
|
||||||
@ -929,9 +872,7 @@ HwConfigureRTL8185(
|
|||||||
write_nic_byte(dev, RATE_FALLBACK, val8);
|
write_nic_byte(dev, RATE_FALLBACK, val8);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void MacConfig_85BASIC_HardCode(struct net_device *dev)
|
||||||
MacConfig_85BASIC_HardCode(
|
|
||||||
struct net_device *dev)
|
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
============================================================================
|
============================================================================
|
||||||
@ -958,9 +899,7 @@ MacConfig_85BASIC_HardCode(
|
|||||||
/* ============================================================================ */
|
/* ============================================================================ */
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void MacConfig_85BASIC(struct net_device *dev)
|
||||||
MacConfig_85BASIC(
|
|
||||||
struct net_device *dev)
|
|
||||||
{
|
{
|
||||||
|
|
||||||
u8 u1DA;
|
u8 u1DA;
|
||||||
@ -1002,10 +941,7 @@ MacConfig_85BASIC(
|
|||||||
write_nic_byte(dev, 0x24E, 0x01);
|
write_nic_byte(dev, 0x24E, 0x01);
|
||||||
}
|
}
|
||||||
|
|
||||||
u8
|
u8 GetSupportedWirelessMode8185(struct net_device *dev)
|
||||||
GetSupportedWirelessMode8185(
|
|
||||||
struct net_device *dev
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
u8 btSupportedWirelessMode = 0;
|
u8 btSupportedWirelessMode = 0;
|
||||||
|
|
||||||
@ -1013,12 +949,9 @@ GetSupportedWirelessMode8185(
|
|||||||
return btSupportedWirelessMode;
|
return btSupportedWirelessMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void ActUpdateChannelAccessSetting(struct net_device *dev,
|
||||||
ActUpdateChannelAccessSetting(
|
|
||||||
struct net_device *dev,
|
|
||||||
WIRELESS_MODE WirelessMode,
|
WIRELESS_MODE WirelessMode,
|
||||||
PCHANNEL_ACCESS_SETTING ChnlAccessSetting
|
PCHANNEL_ACCESS_SETTING ChnlAccessSetting)
|
||||||
)
|
|
||||||
{
|
{
|
||||||
struct r8180_priv *priv = ieee80211_priv(dev);
|
struct r8180_priv *priv = ieee80211_priv(dev);
|
||||||
struct ieee80211_device *ieee = priv->ieee80211;
|
struct ieee80211_device *ieee = priv->ieee80211;
|
||||||
@ -1172,11 +1105,7 @@ ActUpdateChannelAccessSetting(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void ActSetWirelessMode8185(struct net_device *dev, u8 btWirelessMode)
|
||||||
ActSetWirelessMode8185(
|
|
||||||
struct net_device *dev,
|
|
||||||
u8 btWirelessMode
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
|
struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
|
||||||
struct ieee80211_device *ieee = priv->ieee80211;
|
struct ieee80211_device *ieee = priv->ieee80211;
|
||||||
@ -1230,19 +1159,14 @@ void rtl8185b_irq_enable(struct net_device *dev)
|
|||||||
priv->irq_enabled = 1;
|
priv->irq_enabled = 1;
|
||||||
write_nic_dword(dev, IMR, priv->IntrMask);
|
write_nic_dword(dev, IMR, priv->IntrMask);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* by amy for power save */
|
/* by amy for power save */
|
||||||
void
|
void DrvIFIndicateDisassociation(struct net_device *dev, u16 reason)
|
||||||
DrvIFIndicateDisassociation(
|
|
||||||
struct net_device *dev,
|
|
||||||
u16 reason
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
/* nothing is needed after disassociation request. */
|
/* nothing is needed after disassociation request. */
|
||||||
}
|
}
|
||||||
void
|
|
||||||
MgntDisconnectIBSS(
|
void MgntDisconnectIBSS(struct net_device *dev)
|
||||||
struct net_device *dev
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
|
struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
|
||||||
u8 i;
|
u8 i;
|
||||||
@ -1268,12 +1192,8 @@ MgntDisconnectIBSS(
|
|||||||
priv->ieee80211->link_change(dev);
|
priv->ieee80211->link_change(dev);
|
||||||
notify_wx_assoc_event(priv->ieee80211);
|
notify_wx_assoc_event(priv->ieee80211);
|
||||||
}
|
}
|
||||||
void
|
|
||||||
MlmeDisassociateRequest(
|
void MlmeDisassociateRequest(struct net_device *dev, u8 *asSta, u8 asRsn)
|
||||||
struct net_device *dev,
|
|
||||||
u8 *asSta,
|
|
||||||
u8 asRsn
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
|
struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
|
||||||
u8 i;
|
u8 i;
|
||||||
@ -1292,11 +1212,7 @@ MlmeDisassociateRequest(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void MgntDisconnectAP(struct net_device *dev, u8 asRsn)
|
||||||
MgntDisconnectAP(
|
|
||||||
struct net_device *dev,
|
|
||||||
u8 asRsn
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
|
struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
|
||||||
|
|
||||||
@ -1312,11 +1228,8 @@ MgntDisconnectAP(
|
|||||||
|
|
||||||
priv->ieee80211->state = IEEE80211_NOLINK;
|
priv->ieee80211->state = IEEE80211_NOLINK;
|
||||||
}
|
}
|
||||||
bool
|
|
||||||
MgntDisconnect(
|
bool MgntDisconnect(struct net_device *dev, u8 asRsn)
|
||||||
struct net_device *dev,
|
|
||||||
u8 asRsn
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
|
struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
|
||||||
/*
|
/*
|
||||||
@ -1350,11 +1263,7 @@ MgntDisconnect(
|
|||||||
Assumption:
|
Assumption:
|
||||||
PASSIVE LEVEL.
|
PASSIVE LEVEL.
|
||||||
*/
|
*/
|
||||||
bool
|
bool SetRFPowerState(struct net_device *dev, RT_RF_POWER_STATE eRFPowerState)
|
||||||
SetRFPowerState(
|
|
||||||
struct net_device *dev,
|
|
||||||
RT_RF_POWER_STATE eRFPowerState
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
|
struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
|
||||||
bool bResult = false;
|
bool bResult = false;
|
||||||
@ -1366,25 +1275,16 @@ SetRFPowerState(
|
|||||||
|
|
||||||
return bResult;
|
return bResult;
|
||||||
}
|
}
|
||||||
void
|
|
||||||
HalEnableRx8185Dummy(
|
void HalEnableRx8185Dummy(struct net_device *dev)
|
||||||
struct net_device *dev
|
|
||||||
)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
void
|
|
||||||
HalDisableRx8185Dummy(
|
|
||||||
struct net_device *dev
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
void HalDisableRx8185Dummy(struct net_device *dev)
|
||||||
MgntActSet_RF_State(
|
{
|
||||||
struct net_device *dev,
|
}
|
||||||
RT_RF_POWER_STATE StateToSet,
|
|
||||||
u32 ChangeSource
|
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);
|
struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
|
||||||
bool bActionAllowed = false;
|
bool bActionAllowed = false;
|
||||||
@ -1488,10 +1388,8 @@ MgntActSet_RF_State(
|
|||||||
spin_unlock_irqrestore(&priv->rf_ps_lock, flag);
|
spin_unlock_irqrestore(&priv->rf_ps_lock, flag);
|
||||||
return bActionAllowed;
|
return bActionAllowed;
|
||||||
}
|
}
|
||||||
void
|
|
||||||
InactivePowerSave(
|
void InactivePowerSave(struct net_device *dev)
|
||||||
struct net_device *dev
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
|
struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
|
||||||
/*
|
/*
|
||||||
@ -1516,10 +1414,7 @@ InactivePowerSave(
|
|||||||
Description:
|
Description:
|
||||||
Enter the inactive power save mode. RF will be off
|
Enter the inactive power save mode. RF will be off
|
||||||
*/
|
*/
|
||||||
void
|
void IPSEnter(struct net_device *dev)
|
||||||
IPSEnter(
|
|
||||||
struct net_device *dev
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
|
struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
|
||||||
RT_RF_POWER_STATE rtState;
|
RT_RF_POWER_STATE rtState;
|
||||||
@ -1541,10 +1436,7 @@ IPSEnter(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void
|
void IPSLeave(struct net_device *dev)
|
||||||
IPSLeave(
|
|
||||||
struct net_device *dev
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
|
struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
|
||||||
RT_RF_POWER_STATE rtState;
|
RT_RF_POWER_STATE rtState;
|
||||||
|
Loading…
Reference in New Issue
Block a user