mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-14 12:37:32 +00:00
staging: vt6655: baseband replace __iomem where caller is priv dereferenced.
Replace with stucture vnt_private *priv in functions BBvSoftwareReset BBvSetTxAntennaMode BBvSetRxAntennaMode BBvSetDeepSleep BBvExitDeepSleep __iomem *dwIoBase will be moved into BBbWriteEmbedded and BBbReadEmbedded later. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
314e5caa4b
commit
a5f0eef38b
5 changed files with 30 additions and 22 deletions
|
@ -1719,22 +1719,22 @@ s_vChangeAntenna(
|
|||
if (priv->dwRxAntennaSel == 0) {
|
||||
priv->dwRxAntennaSel = 1;
|
||||
if (priv->bTxRxAntInv == true)
|
||||
BBvSetRxAntennaMode(priv->PortOffset, ANT_A);
|
||||
BBvSetRxAntennaMode(priv, ANT_A);
|
||||
else
|
||||
BBvSetRxAntennaMode(priv->PortOffset, ANT_B);
|
||||
BBvSetRxAntennaMode(priv, ANT_B);
|
||||
} else {
|
||||
priv->dwRxAntennaSel = 0;
|
||||
if (priv->bTxRxAntInv == true)
|
||||
BBvSetRxAntennaMode(priv->PortOffset, ANT_B);
|
||||
BBvSetRxAntennaMode(priv, ANT_B);
|
||||
else
|
||||
BBvSetRxAntennaMode(priv->PortOffset, ANT_A);
|
||||
BBvSetRxAntennaMode(priv, ANT_A);
|
||||
}
|
||||
if (priv->dwTxAntennaSel == 0) {
|
||||
priv->dwTxAntennaSel = 1;
|
||||
BBvSetTxAntennaMode(priv->PortOffset, ANT_B);
|
||||
BBvSetTxAntennaMode(priv, ANT_B);
|
||||
} else {
|
||||
priv->dwTxAntennaSel = 0;
|
||||
BBvSetTxAntennaMode(priv->PortOffset, ANT_A);
|
||||
BBvSetTxAntennaMode(priv, ANT_A);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2266,8 +2266,10 @@ void BBvSetVGAGainOffset(struct vnt_private *priv, unsigned char byData)
|
|||
*
|
||||
*/
|
||||
void
|
||||
BBvSoftwareReset(void __iomem *dwIoBase)
|
||||
BBvSoftwareReset(struct vnt_private *priv)
|
||||
{
|
||||
void __iomem *dwIoBase = priv->PortOffset;
|
||||
|
||||
BBbWriteEmbedded(dwIoBase, 0x50, 0x40);
|
||||
BBbWriteEmbedded(dwIoBase, 0x50, 0);
|
||||
BBbWriteEmbedded(dwIoBase, 0x9C, 0x01);
|
||||
|
@ -2333,8 +2335,9 @@ BBvPowerSaveModeOFF(void __iomem *dwIoBase)
|
|||
*/
|
||||
|
||||
void
|
||||
BBvSetTxAntennaMode(void __iomem *dwIoBase, unsigned char byAntennaMode)
|
||||
BBvSetTxAntennaMode(struct vnt_private *priv, unsigned char byAntennaMode)
|
||||
{
|
||||
void __iomem *dwIoBase = priv->PortOffset;
|
||||
unsigned char byBBTxConf;
|
||||
|
||||
BBbReadEmbedded(dwIoBase, 0x09, &byBBTxConf); /* CR09 */
|
||||
|
@ -2366,8 +2369,9 @@ BBvSetTxAntennaMode(void __iomem *dwIoBase, unsigned char byAntennaMode)
|
|||
*/
|
||||
|
||||
void
|
||||
BBvSetRxAntennaMode(void __iomem *dwIoBase, unsigned char byAntennaMode)
|
||||
BBvSetRxAntennaMode(struct vnt_private *priv, unsigned char byAntennaMode)
|
||||
{
|
||||
void __iomem *dwIoBase = priv->PortOffset;
|
||||
unsigned char byBBRxConf;
|
||||
|
||||
BBbReadEmbedded(dwIoBase, 0x0A, &byBBRxConf); /* CR10 */
|
||||
|
@ -2396,15 +2400,19 @@ BBvSetRxAntennaMode(void __iomem *dwIoBase, unsigned char byAntennaMode)
|
|||
*
|
||||
*/
|
||||
void
|
||||
BBvSetDeepSleep(void __iomem *dwIoBase, unsigned char byLocalID)
|
||||
BBvSetDeepSleep(struct vnt_private *priv, unsigned char byLocalID)
|
||||
{
|
||||
void __iomem *dwIoBase = priv->PortOffset;
|
||||
|
||||
BBbWriteEmbedded(dwIoBase, 0x0C, 0x17); /* CR12 */
|
||||
BBbWriteEmbedded(dwIoBase, 0x0D, 0xB9); /* CR13 */
|
||||
}
|
||||
|
||||
void
|
||||
BBvExitDeepSleep(void __iomem *dwIoBase, unsigned char byLocalID)
|
||||
BBvExitDeepSleep(struct vnt_private *priv, unsigned char byLocalID)
|
||||
{
|
||||
void __iomem *dwIoBase = priv->PortOffset;
|
||||
|
||||
BBbWriteEmbedded(dwIoBase, 0x0C, 0x00); /* CR12 */
|
||||
BBbWriteEmbedded(dwIoBase, 0x0D, 0x01); /* CR13 */
|
||||
}
|
||||
|
|
|
@ -85,13 +85,13 @@ void BBvSetVGAGainOffset(struct vnt_private *, unsigned char byData);
|
|||
|
||||
/* VT3253 Baseband */
|
||||
bool BBbVT3253Init(struct vnt_private *);
|
||||
void BBvSoftwareReset(void __iomem *dwIoBase);
|
||||
void BBvSoftwareReset(struct vnt_private *);
|
||||
void BBvPowerSaveModeON(void __iomem *dwIoBase);
|
||||
void BBvPowerSaveModeOFF(void __iomem *dwIoBase);
|
||||
void BBvSetTxAntennaMode(void __iomem *dwIoBase, unsigned char byAntennaMode);
|
||||
void BBvSetRxAntennaMode(void __iomem *dwIoBase, unsigned char byAntennaMode);
|
||||
void BBvSetDeepSleep(void __iomem *dwIoBase, unsigned char byLocalID);
|
||||
void BBvExitDeepSleep(void __iomem *dwIoBase, unsigned char byLocalID);
|
||||
void BBvSetTxAntennaMode(struct vnt_private *, unsigned char byAntennaMode);
|
||||
void BBvSetRxAntennaMode(struct vnt_private *, unsigned char byAntennaMode);
|
||||
void BBvSetDeepSleep(struct vnt_private *, unsigned char byLocalID);
|
||||
void BBvExitDeepSleep(struct vnt_private *, unsigned char byLocalID);
|
||||
|
||||
/* timer for antenna diversity */
|
||||
|
||||
|
|
|
@ -445,7 +445,7 @@ bool CARDbRadioPowerOff(struct vnt_private *pDevice)
|
|||
|
||||
MACvRegBitsOff(pDevice->PortOffset, MAC_REG_HOSTCR, HOSTCR_RXON);
|
||||
|
||||
BBvSetDeepSleep(pDevice->PortOffset, pDevice->byLocalID);
|
||||
BBvSetDeepSleep(pDevice, pDevice->byLocalID);
|
||||
|
||||
pDevice->bRadioOff = true;
|
||||
pr_debug("chester power off\n");
|
||||
|
@ -480,7 +480,7 @@ bool CARDbRadioPowerOn(struct vnt_private *pDevice)
|
|||
pr_debug("chester pbRadioOff\n");
|
||||
return true; }
|
||||
|
||||
BBvExitDeepSleep(pDevice->PortOffset, pDevice->byLocalID);
|
||||
BBvExitDeepSleep(pDevice, pDevice->byLocalID);
|
||||
|
||||
MACvRegBitsOn(pDevice->PortOffset, MAC_REG_HOSTCR, HOSTCR_RXON);
|
||||
|
||||
|
|
|
@ -197,7 +197,7 @@ bool set_channel(void *pDeviceHandler, unsigned int uConnectionChannel)
|
|||
if (pDevice->bEnablePSMode)
|
||||
RFvWriteWakeProgSyn(pDevice->PortOffset, pDevice->byRFType, uConnectionChannel);
|
||||
|
||||
BBvSoftwareReset(pDevice->PortOffset);
|
||||
BBvSoftwareReset(pDevice);
|
||||
|
||||
if (pDevice->byLocalID > REV_ID_VT3253_B1) {
|
||||
/* set HW default power register */
|
||||
|
|
|
@ -254,7 +254,7 @@ static void device_init_registers(struct vnt_private *pDevice)
|
|||
unsigned char byOFDMPwrdBm = 0;
|
||||
|
||||
MACbShutdown(pDevice->PortOffset);
|
||||
BBvSoftwareReset(pDevice->PortOffset);
|
||||
BBvSoftwareReset(pDevice);
|
||||
|
||||
/* Do MACbSoftwareReset in MACvInitialize */
|
||||
MACbSoftwareReset(pDevice->PortOffset);
|
||||
|
@ -446,8 +446,8 @@ static void device_init_registers(struct vnt_private *pDevice)
|
|||
BBvSetVGAGainOffset(pDevice, pDevice->abyBBVGA[0]);
|
||||
}
|
||||
|
||||
BBvSetRxAntennaMode(pDevice->PortOffset, pDevice->byRxAntennaMode);
|
||||
BBvSetTxAntennaMode(pDevice->PortOffset, pDevice->byTxAntennaMode);
|
||||
BBvSetRxAntennaMode(pDevice, pDevice->byRxAntennaMode);
|
||||
BBvSetTxAntennaMode(pDevice, pDevice->byTxAntennaMode);
|
||||
|
||||
/* Set BB and packet type at the same time. */
|
||||
/* Set Short Slot Time, xIFS, and RSPINF. */
|
||||
|
|
Loading…
Reference in a new issue