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);
}
}
*
*/
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);
*/
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 */
*/
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 */
*
*/
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 */
}
/* 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 */
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");
pr_debug("chester pbRadioOff\n");
return true; }
- BBvExitDeepSleep(pDevice->PortOffset, pDevice->byLocalID);
+ BBvExitDeepSleep(pDevice, pDevice->byLocalID);
MACvRegBitsOn(pDevice->PortOffset, MAC_REG_HOSTCR, HOSTCR_RXON);
unsigned char byOFDMPwrdBm = 0;
MACbShutdown(pDevice->PortOffset);
- BBvSoftwareReset(pDevice->PortOffset);
+ BBvSoftwareReset(pDevice);
/* Do MACbSoftwareReset in MACvInitialize */
MACbSoftwareReset(pDevice->PortOffset);
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. */