Commit 817c985b authored by Malcolm Priestley's avatar Malcolm Priestley Committed by Greg Kroah-Hartman

staging: vt6655: rf remove __iomem *dwIoBase from functions

replacing with vnt_private and removing dereferencing from callers
Signed-off-by: default avatarMalcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 738487ff
...@@ -188,14 +188,16 @@ bool set_channel(void *pDeviceHandler, unsigned int uConnectionChannel) ...@@ -188,14 +188,16 @@ bool set_channel(void *pDeviceHandler, unsigned int uConnectionChannel)
/* TX_PE will reserve 3 us for MAX2829 A mode only, it is for better TX throughput */ /* TX_PE will reserve 3 us for MAX2829 A mode only, it is for better TX throughput */
if (pDevice->byRFType == RF_AIROHA7230) if (pDevice->byRFType == RF_AIROHA7230)
RFbAL7230SelectChannelPostProcess(pDevice->PortOffset, pDevice->byCurrentCh, (unsigned char)uConnectionChannel); RFbAL7230SelectChannelPostProcess(pDevice, pDevice->byCurrentCh,
(unsigned char)uConnectionChannel);
pDevice->byCurrentCh = (unsigned char)uConnectionChannel; pDevice->byCurrentCh = (unsigned char)uConnectionChannel;
bResult &= RFbSelectChannel(pDevice->PortOffset, pDevice->byRFType, (unsigned char)uConnectionChannel); bResult &= RFbSelectChannel(pDevice, pDevice->byRFType,
(unsigned char)uConnectionChannel);
/* Init Synthesizer Table */ /* Init Synthesizer Table */
if (pDevice->bEnablePSMode) if (pDevice->bEnablePSMode)
RFvWriteWakeProgSyn(pDevice->PortOffset, pDevice->byRFType, uConnectionChannel); RFvWriteWakeProgSyn(pDevice, pDevice->byRFType, uConnectionChannel);
BBvSoftwareReset(pDevice); BBvSoftwareReset(pDevice);
......
...@@ -468,8 +468,9 @@ static bool s_bAL7230Init(struct vnt_private *priv) ...@@ -468,8 +468,9 @@ static bool s_bAL7230Init(struct vnt_private *priv)
} }
// Need to Pull PLLON low when writing channel registers through 3-wire interface // Need to Pull PLLON low when writing channel registers through 3-wire interface
static bool s_bAL7230SelectChannel(void __iomem *dwIoBase, unsigned char byChannel) static bool s_bAL7230SelectChannel(struct vnt_private *priv, unsigned char byChannel)
{ {
void __iomem *dwIoBase = priv->PortOffset;
bool bResult; bool bResult;
bResult = true; bResult = true;
...@@ -627,8 +628,9 @@ bool IFRFbWriteEmbedded(void __iomem *dwIoBase, unsigned long dwData) ...@@ -627,8 +628,9 @@ bool IFRFbWriteEmbedded(void __iomem *dwIoBase, unsigned long dwData)
* Return Value: true if succeeded; false if failed. * Return Value: true if succeeded; false if failed.
* *
*/ */
static bool RFbAL2230Init(void __iomem *dwIoBase) static bool RFbAL2230Init(struct vnt_private *priv)
{ {
void __iomem *dwIoBase = priv->PortOffset;
int ii; int ii;
bool bResult; bool bResult;
...@@ -674,8 +676,9 @@ static bool RFbAL2230Init(void __iomem *dwIoBase) ...@@ -674,8 +676,9 @@ static bool RFbAL2230Init(void __iomem *dwIoBase)
return bResult; return bResult;
} }
static bool RFbAL2230SelectChannel(void __iomem *dwIoBase, unsigned char byChannel) static bool RFbAL2230SelectChannel(struct vnt_private *priv, unsigned char byChannel)
{ {
void __iomem *dwIoBase = priv->PortOffset;
bool bResult; bool bResult;
bResult = true; bResult = true;
...@@ -756,7 +759,7 @@ bool RFbInit( ...@@ -756,7 +759,7 @@ bool RFbInit(
case RF_AIROHA: case RF_AIROHA:
case RF_AL2230S: case RF_AL2230S:
pDevice->byMaxPwrLevel = AL2230_PWR_IDX_LEN; pDevice->byMaxPwrLevel = AL2230_PWR_IDX_LEN;
bResult = RFbAL2230Init(pDevice->PortOffset); bResult = RFbAL2230Init(pDevice);
break; break;
case RF_AIROHA7230: case RF_AIROHA7230:
pDevice->byMaxPwrLevel = AL7230_PWR_IDX_LEN; pDevice->byMaxPwrLevel = AL7230_PWR_IDX_LEN;
...@@ -785,18 +788,18 @@ bool RFbInit( ...@@ -785,18 +788,18 @@ bool RFbInit(
* Return Value: true if succeeded; false if failed. * Return Value: true if succeeded; false if failed.
* *
*/ */
bool RFbSelectChannel(void __iomem *dwIoBase, unsigned char byRFType, unsigned char byChannel) bool RFbSelectChannel(struct vnt_private *priv, unsigned char byRFType, unsigned char byChannel)
{ {
bool bResult = true; bool bResult = true;
switch (byRFType) { switch (byRFType) {
case RF_AIROHA: case RF_AIROHA:
case RF_AL2230S: case RF_AL2230S:
bResult = RFbAL2230SelectChannel(dwIoBase, byChannel); bResult = RFbAL2230SelectChannel(priv, byChannel);
break; break;
//{{ RobertYu: 20050104 //{{ RobertYu: 20050104
case RF_AIROHA7230: case RF_AIROHA7230:
bResult = s_bAL7230SelectChannel(dwIoBase, byChannel); bResult = s_bAL7230SelectChannel(priv, byChannel);
break; break;
//}} RobertYu //}} RobertYu
case RF_NOTHING: case RF_NOTHING:
...@@ -821,8 +824,9 @@ bool RFbSelectChannel(void __iomem *dwIoBase, unsigned char byRFType, unsigned c ...@@ -821,8 +824,9 @@ bool RFbSelectChannel(void __iomem *dwIoBase, unsigned char byRFType, unsigned c
* Return Value: None. * Return Value: None.
* *
*/ */
bool RFvWriteWakeProgSyn(void __iomem *dwIoBase, unsigned char byRFType, unsigned int uChannel) bool RFvWriteWakeProgSyn(struct vnt_private *priv, unsigned char byRFType, unsigned int uChannel)
{ {
void __iomem *dwIoBase = priv->PortOffset;
int ii; int ii;
unsigned char byInitCount = 0; unsigned char byInitCount = 0;
unsigned char bySleepCount = 0; unsigned char bySleepCount = 0;
...@@ -1071,8 +1075,11 @@ RFvRSSITodBm( ...@@ -1071,8 +1075,11 @@ RFvRSSITodBm(
// Post processing for the 11b/g and 11a. // Post processing for the 11b/g and 11a.
// for save time on changing Reg2,3,5,7,10,12,15 // for save time on changing Reg2,3,5,7,10,12,15
bool RFbAL7230SelectChannelPostProcess(void __iomem *dwIoBase, unsigned char byOldChannel, unsigned char byNewChannel) bool RFbAL7230SelectChannelPostProcess(struct vnt_private *priv,
unsigned char byOldChannel,
unsigned char byNewChannel)
{ {
void __iomem *dwIoBase = priv->PortOffset;
bool bResult; bool bResult;
bResult = true; bResult = true;
......
...@@ -74,11 +74,11 @@ ...@@ -74,11 +74,11 @@
/*--------------------- Export Functions --------------------------*/ /*--------------------- Export Functions --------------------------*/
bool IFRFbWriteEmbedded(void __iomem *dwIoBase, unsigned long dwData); bool IFRFbWriteEmbedded(void __iomem *dwIoBase, unsigned long dwData);
bool RFbSelectChannel(void __iomem *dwIoBase, unsigned char byRFType, unsigned char byChannel); bool RFbSelectChannel(struct vnt_private *, unsigned char byRFType, unsigned char byChannel);
bool RFbInit( bool RFbInit(
struct vnt_private * struct vnt_private *
); );
bool RFvWriteWakeProgSyn(void __iomem *dwIoBase, unsigned char byRFType, unsigned int uChannel); bool RFvWriteWakeProgSyn(struct vnt_private *, unsigned char byRFType, unsigned int uChannel);
bool RFbSetPower(struct vnt_private *, unsigned int uRATE, unsigned int uCH); bool RFbSetPower(struct vnt_private *, unsigned int uRATE, unsigned int uCH);
bool RFbRawSetPower( bool RFbRawSetPower(
struct vnt_private *, struct vnt_private *,
...@@ -94,7 +94,7 @@ RFvRSSITodBm( ...@@ -94,7 +94,7 @@ RFvRSSITodBm(
); );
//{{ RobertYu: 20050104 //{{ RobertYu: 20050104
bool RFbAL7230SelectChannelPostProcess(void __iomem *dwIoBase, unsigned char byOldChannel, unsigned char byNewChannel); bool RFbAL7230SelectChannelPostProcess(struct vnt_private *, unsigned char byOldChannel, unsigned char byNewChannel);
//}} RobertYu //}} RobertYu
#endif // __RF_H__ #endif // __RF_H__
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment