diff options
Diffstat (limited to 'drivers/staging/vt6655/device_main.c')
-rw-r--r-- | drivers/staging/vt6655/device_main.c | 37 |
1 files changed, 17 insertions, 20 deletions
diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c index 897d70cf32b8..afaf331fe125 100644 --- a/drivers/staging/vt6655/device_main.c +++ b/drivers/staging/vt6655/device_main.c @@ -219,7 +219,7 @@ static void device_init_registers(struct vnt_private *priv) MACvInitialize(priv); /* Get Local ID */ - VNSvInPortB(priv->port_offset + MAC_REG_LOCALID, &priv->local_id); + priv->local_id = ioread8(priv->port_offset + MAC_REG_LOCALID); spin_lock_irqsave(&priv->lock, flags); @@ -334,8 +334,7 @@ static void device_init_registers(struct vnt_private *priv) if (priv->local_id > REV_ID_VT3253_B1) { MACvSelectPage1(priv->port_offset); - VNSvOutPortB(priv->port_offset + MAC_REG_MSRCTL + 1, - (MSRCTL1_TXPWR | MSRCTL1_CSAPAREN)); + iowrite8(MSRCTL1_TXPWR | MSRCTL1_CSAPAREN, priv->port_offset + MAC_REG_MSRCTL + 1); MACvSelectPage0(priv->port_offset); } @@ -349,9 +348,9 @@ static void device_init_registers(struct vnt_private *priv) MACvSetLongRetryLimit(priv, priv->byLongRetryLimit); /* reset TSF counter */ - VNSvOutPortB(priv->port_offset + MAC_REG_TFTCTL, TFTCTL_TSFCNTRST); + iowrite8(TFTCTL_TSFCNTRST, priv->port_offset + MAC_REG_TFTCTL); /* enable TSF counter */ - VNSvOutPortB(priv->port_offset + MAC_REG_TFTCTL, TFTCTL_TSFCNTREN); + iowrite8(TFTCTL_TSFCNTREN, priv->port_offset + MAC_REG_TFTCTL); /* initialize BBP registers */ bb_vt3253_init(priv); @@ -377,7 +376,7 @@ static void device_init_registers(struct vnt_private *priv) if (priv->byRadioCtl & EEP_RADIOCTL_ENABLE) { /* Get GPIO */ - MACvGPIOIn(priv->port_offset, &priv->byGPIO); + priv->byGPIO = ioread8(priv->port_offset + MAC_REG_GPIOCTL1); if (((priv->byGPIO & GPIO0_DATA) && !(priv->byRadioCtl & EEP_RADIOCTL_INV)) || @@ -406,7 +405,7 @@ static void device_init_registers(struct vnt_private *priv) MACvReceive1(priv->port_offset); /* start the adapter */ - MACvStart(priv->port_offset); + iowrite8(HOSTCR_MACEN | HOSTCR_RXON | HOSTCR_TXON, priv->port_offset + MAC_REG_HOSTCR); } static void device_print_info(struct vnt_private *priv) @@ -1029,7 +1028,7 @@ static void vnt_interrupt_process(struct vnt_private *priv) u32 isr; unsigned long flags; - MACvReadISR(priv->port_offset, &isr); + isr = ioread32(priv->port_offset + MAC_REG_ISR); if (isr == 0) return; @@ -1042,7 +1041,7 @@ static void vnt_interrupt_process(struct vnt_private *priv) spin_lock_irqsave(&priv->lock, flags); /* Read low level stats */ - MACvReadMIBCounter(priv->port_offset, &mib_counter); + mib_counter = ioread32(priv->port_offset + MAC_REG_MIBCNTR); low_stats->dot11RTSSuccessCount += mib_counter & 0xff; low_stats->dot11RTSFailureCount += (mib_counter >> 8) & 0xff; @@ -1060,7 +1059,7 @@ static void vnt_interrupt_process(struct vnt_private *priv) if (isr & ISR_FETALERR) { pr_debug(" ISR_FETALERR\n"); - VNSvOutPortB(priv->port_offset + MAC_REG_SOFTPWRCTL, 0); + iowrite8(0, priv->port_offset + MAC_REG_SOFTPWRCTL); VNSvOutPortW(priv->port_offset + MAC_REG_SOFTPWRCTL, SOFTPWRCTL_SWPECTI); device_error(priv, isr); @@ -1116,7 +1115,7 @@ static void vnt_interrupt_process(struct vnt_private *priv) ieee80211_queue_stopped(priv->hw, 0)) ieee80211_wake_queues(priv->hw); - MACvReadISR(priv->port_offset, &isr); + isr = ioread32(priv->port_offset + MAC_REG_ISR); MACvReceive0(priv->port_offset); MACvReceive1(priv->port_offset); @@ -1407,7 +1406,7 @@ static void vnt_bss_info_changed(struct ieee80211_hw *hw, spin_lock_irqsave(&priv->lock, flags); - MACvWriteBSSIDAddress(priv->port_offset, (u8 *)conf->bssid); + MACvWriteBSSIDAddress(priv->port_offset, conf->bssid); spin_unlock_irqrestore(&priv->lock, flags); } @@ -1477,10 +1476,8 @@ static void vnt_bss_info_changed(struct ieee80211_hw *hw, CARDvSetFirstNextTBTT(priv, conf->beacon_int); } else { - VNSvOutPortB(priv->port_offset + MAC_REG_TFTCTL, - TFTCTL_TSFCNTRST); - VNSvOutPortB(priv->port_offset + MAC_REG_TFTCTL, - TFTCTL_TSFCNTREN); + iowrite8(TFTCTL_TSFCNTRST, priv->port_offset + MAC_REG_TFTCTL); + iowrite8(TFTCTL_TSFCNTREN, priv->port_offset + MAC_REG_TFTCTL); } } } @@ -1513,7 +1510,7 @@ static void vnt_configure(struct ieee80211_hw *hw, *total_flags &= FIF_ALLMULTI | FIF_OTHER_BSS | FIF_BCN_PRBRESP_PROMISC; - VNSvInPortB(priv->port_offset + MAC_REG_RCR, &rx_mode); + rx_mode = ioread8(priv->port_offset + MAC_REG_RCR); dev_dbg(&priv->pcid->dev, "rx mode in = %x\n", rx_mode); @@ -1561,7 +1558,7 @@ static void vnt_configure(struct ieee80211_hw *hw, rx_mode |= RCR_BSSID; } - VNSvOutPortB(priv->port_offset + MAC_REG_RCR, rx_mode); + iowrite8(rx_mode, priv->port_offset + MAC_REG_RCR); dev_dbg(&priv->pcid->dev, "rx mode out= %x\n", rx_mode); } @@ -1603,7 +1600,7 @@ static u64 vnt_get_tsf(struct ieee80211_hw *hw, struct ieee80211_vif *vif) struct vnt_private *priv = hw->priv; u64 tsf; - CARDbGetCurrentTSF(priv, &tsf); + tsf = vt6655_get_current_tsf(priv); return tsf; } @@ -1621,7 +1618,7 @@ static void vnt_reset_tsf(struct ieee80211_hw *hw, struct ieee80211_vif *vif) struct vnt_private *priv = hw->priv; /* reset TSF counter */ - VNSvOutPortB(priv->port_offset + MAC_REG_TFTCTL, TFTCTL_TSFCNTRST); + iowrite8(TFTCTL_TSFCNTRST, priv->port_offset + MAC_REG_TFTCTL); } static const struct ieee80211_ops vnt_mac_ops = { |