diff options
author | Tommaso Merciai <tomm.merciai@gmail.com> | 2021-10-05 23:56:59 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-10-10 15:52:07 +0300 |
commit | 1977dcf07bddf7a2843b179c5af42ebc08072170 (patch) | |
tree | aeb8f4001c2ef293159db77e592f40ddf0a9e160 /drivers/staging/vt6655/device_main.c | |
parent | aeec304c2e47bd0e8d73e9d120a1ad16361f7473 (diff) | |
download | linux-1977dcf07bddf7a2843b179c5af42ebc08072170.tar.xz |
staging: vt6655: fix camelcase in PortOffset
Replace camel case variable PortOffset with snake case
variable port_offset.
Signed-off-by: Tommaso Merciai <tomm.merciai@gmail.com>
Link: https://lore.kernel.org/r/20211005205702.14029-4-tomm.merciai@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vt6655/device_main.c')
-rw-r--r-- | drivers/staging/vt6655/device_main.c | 144 |
1 files changed, 72 insertions, 72 deletions
diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c index ff6c59e198a4..3683a9d65017 100644 --- a/drivers/staging/vt6655/device_main.c +++ b/drivers/staging/vt6655/device_main.c @@ -219,11 +219,11 @@ static void device_init_registers(struct vnt_private *priv) MACvInitialize(priv); /* Get Local ID */ - VNSvInPortB(priv->PortOffset + MAC_REG_LOCALID, &priv->byLocalID); + VNSvInPortB(priv->port_offset + MAC_REG_LOCALID, &priv->byLocalID); spin_lock_irqsave(&priv->lock, flags); - SROMvReadAllContents(priv->PortOffset, priv->abyEEPROM); + SROMvReadAllContents(priv->port_offset, priv->abyEEPROM); spin_unlock_irqrestore(&priv->lock, flags); @@ -232,7 +232,7 @@ static void device_init_registers(struct vnt_private *priv) priv->byMaxChannel = CB_MAX_CHANNEL; /* Get Antena */ - byValue = SROMbyReadEmbedded(priv->PortOffset, EEP_OFS_ANTENNA); + byValue = SROMbyReadEmbedded(priv->port_offset, EEP_OFS_ANTENNA); if (byValue & EEP_ANTINV) priv->bTxRxAntInv = true; else @@ -292,20 +292,20 @@ static void device_init_registers(struct vnt_private *priv) /* Get Desire Power Value */ priv->byCurPwr = 0xFF; - priv->byCCKPwr = SROMbyReadEmbedded(priv->PortOffset, EEP_OFS_PWR_CCK); - priv->byOFDMPwrG = SROMbyReadEmbedded(priv->PortOffset, + priv->byCCKPwr = SROMbyReadEmbedded(priv->port_offset, EEP_OFS_PWR_CCK); + priv->byOFDMPwrG = SROMbyReadEmbedded(priv->port_offset, EEP_OFS_PWR_OFDMG); /* Load power Table */ for (ii = 0; ii < CB_MAX_CHANNEL_24G; ii++) { priv->abyCCKPwrTbl[ii + 1] = - SROMbyReadEmbedded(priv->PortOffset, + SROMbyReadEmbedded(priv->port_offset, (unsigned char)(ii + EEP_OFS_CCK_PWR_TBL)); if (priv->abyCCKPwrTbl[ii + 1] == 0) priv->abyCCKPwrTbl[ii + 1] = priv->byCCKPwr; priv->abyOFDMPwrTbl[ii + 1] = - SROMbyReadEmbedded(priv->PortOffset, + SROMbyReadEmbedded(priv->port_offset, (unsigned char)(ii + EEP_OFS_OFDM_PWR_TBL)); if (priv->abyOFDMPwrTbl[ii + 1] == 0) priv->abyOFDMPwrTbl[ii + 1] = priv->byOFDMPwrG; @@ -323,25 +323,25 @@ static void device_init_registers(struct vnt_private *priv) /* Load OFDM A Power Table */ for (ii = 0; ii < CB_MAX_CHANNEL_5G; ii++) { priv->abyOFDMPwrTbl[ii + CB_MAX_CHANNEL_24G + 1] = - SROMbyReadEmbedded(priv->PortOffset, + SROMbyReadEmbedded(priv->port_offset, (unsigned char)(ii + EEP_OFS_OFDMA_PWR_TBL)); priv->abyOFDMDefaultPwr[ii + CB_MAX_CHANNEL_24G + 1] = - SROMbyReadEmbedded(priv->PortOffset, + SROMbyReadEmbedded(priv->port_offset, (unsigned char)(ii + EEP_OFS_OFDMA_PWR_dBm)); } if (priv->byLocalID > REV_ID_VT3253_B1) { - MACvSelectPage1(priv->PortOffset); + MACvSelectPage1(priv->port_offset); - VNSvOutPortB(priv->PortOffset + MAC_REG_MSRCTL + 1, + VNSvOutPortB(priv->port_offset + MAC_REG_MSRCTL + 1, (MSRCTL1_TXPWR | MSRCTL1_CSAPAREN)); - MACvSelectPage0(priv->PortOffset); + MACvSelectPage0(priv->port_offset); } /* use relative tx timeout and 802.11i D4 */ - MACvWordRegBitsOn(priv->PortOffset, + MACvWordRegBitsOn(priv->port_offset, MAC_REG_CFG, (CFG_TKIPOPT | CFG_NOTXTIMEOUT)); /* set performance parameter by registry */ @@ -349,9 +349,9 @@ static void device_init_registers(struct vnt_private *priv) MACvSetLongRetryLimit(priv, priv->byLongRetryLimit); /* reset TSF counter */ - VNSvOutPortB(priv->PortOffset + MAC_REG_TFTCTL, TFTCTL_TSFCNTRST); + VNSvOutPortB(priv->port_offset + MAC_REG_TFTCTL, TFTCTL_TSFCNTRST); /* enable TSF counter */ - VNSvOutPortB(priv->PortOffset + MAC_REG_TFTCTL, TFTCTL_TSFCNTREN); + VNSvOutPortB(priv->port_offset + MAC_REG_TFTCTL, TFTCTL_TSFCNTREN); /* initialize BBP registers */ bb_vt3253_init(priv); @@ -371,13 +371,13 @@ static void device_init_registers(struct vnt_private *priv) priv->bRadioOff = false; - priv->byRadioCtl = SROMbyReadEmbedded(priv->PortOffset, + priv->byRadioCtl = SROMbyReadEmbedded(priv->port_offset, EEP_OFS_RADIOCTL); priv->bHWRadioOff = false; if (priv->byRadioCtl & EEP_RADIOCTL_ENABLE) { /* Get GPIO */ - MACvGPIOIn(priv->PortOffset, &priv->byGPIO); + MACvGPIOIn(priv->port_offset, &priv->byGPIO); if (((priv->byGPIO & GPIO0_DATA) && !(priv->byRadioCtl & EEP_RADIOCTL_INV)) || @@ -390,7 +390,7 @@ static void device_init_registers(struct vnt_private *priv) CARDbRadioPowerOff(priv); /* get Permanent network address */ - SROMvReadEtherAddress(priv->PortOffset, priv->abyCurrentNetAddr); + SROMvReadEtherAddress(priv->port_offset, priv->abyCurrentNetAddr); pr_debug("Network address = %pM\n", priv->abyCurrentNetAddr); /* reset Tx pointer */ @@ -399,21 +399,21 @@ static void device_init_registers(struct vnt_private *priv) CARDvSafeResetTx(priv); if (priv->byLocalID <= REV_ID_VT3253_A1) - MACvRegBitsOn(priv->PortOffset, MAC_REG_RCR, RCR_WPAERR); + MACvRegBitsOn(priv->port_offset, MAC_REG_RCR, RCR_WPAERR); /* Turn On Rx DMA */ - MACvReceive0(priv->PortOffset); - MACvReceive1(priv->PortOffset); + MACvReceive0(priv->port_offset); + MACvReceive1(priv->port_offset); /* start the adapter */ - MACvStart(priv->PortOffset); + MACvStart(priv->port_offset); } static void device_print_info(struct vnt_private *priv) { dev_info(&priv->pcid->dev, "MAC=%pM IO=0x%lx Mem=0x%lx IRQ=%d\n", priv->abyCurrentNetAddr, (unsigned long)priv->ioaddr, - (unsigned long)priv->PortOffset, priv->pcid->irq); + (unsigned long)priv->port_offset, priv->pcid->irq); } static void device_free_info(struct vnt_private *priv) @@ -424,8 +424,8 @@ static void device_free_info(struct vnt_private *priv) if (priv->mac_hw) ieee80211_unregister_hw(priv->hw); - if (priv->PortOffset) - iounmap(priv->PortOffset); + if (priv->port_offset) + iounmap(priv->port_offset); if (priv->pcid) pci_release_regions(priv->pcid); @@ -1029,7 +1029,7 @@ static void vnt_interrupt_process(struct vnt_private *priv) u32 isr; unsigned long flags; - MACvReadISR(priv->PortOffset, &isr); + MACvReadISR(priv->port_offset, &isr); if (isr == 0) return; @@ -1042,7 +1042,7 @@ static void vnt_interrupt_process(struct vnt_private *priv) spin_lock_irqsave(&priv->lock, flags); /* Read low level stats */ - MACvReadMIBCounter(priv->PortOffset, &mib_counter); + MACvReadMIBCounter(priv->port_offset, &mib_counter); low_stats->dot11RTSSuccessCount += mib_counter & 0xff; low_stats->dot11RTSFailureCount += (mib_counter >> 8) & 0xff; @@ -1056,12 +1056,12 @@ static void vnt_interrupt_process(struct vnt_private *priv) * update ISR counter */ while (isr && priv->vif) { - MACvWriteISR(priv->PortOffset, isr); + MACvWriteISR(priv->port_offset, isr); if (isr & ISR_FETALERR) { pr_debug(" ISR_FETALERR\n"); - VNSvOutPortB(priv->PortOffset + MAC_REG_SOFTPWRCTL, 0); - VNSvOutPortW(priv->PortOffset + + VNSvOutPortB(priv->port_offset + MAC_REG_SOFTPWRCTL, 0); + VNSvOutPortW(priv->port_offset + MAC_REG_SOFTPWRCTL, SOFTPWRCTL_SWPECTI); device_error(priv, isr); } @@ -1116,10 +1116,10 @@ static void vnt_interrupt_process(struct vnt_private *priv) ieee80211_queue_stopped(priv->hw, 0)) ieee80211_wake_queues(priv->hw); - MACvReadISR(priv->PortOffset, &isr); + MACvReadISR(priv->port_offset, &isr); - MACvReceive0(priv->PortOffset); - MACvReceive1(priv->PortOffset); + MACvReceive0(priv->port_offset); + MACvReceive1(priv->port_offset); if (max_count > priv->opts.int_works) break; @@ -1136,7 +1136,7 @@ static void vnt_interrupt_work(struct work_struct *work) if (priv->vif) vnt_interrupt_process(priv); - MACvIntEnable(priv->PortOffset, IMR_MASK_VALUE); + MACvIntEnable(priv->port_offset, IMR_MASK_VALUE); } static irqreturn_t vnt_interrupt(int irq, void *arg) @@ -1145,7 +1145,7 @@ static irqreturn_t vnt_interrupt(int irq, void *arg) schedule_work(&priv->interrupt_work); - MACvIntDisable(priv->PortOffset); + MACvIntDisable(priv->port_offset); return IRQ_HANDLED; } @@ -1201,9 +1201,9 @@ static int vnt_tx_packet(struct vnt_private *priv, struct sk_buff *skb) wmb(); /* second memory barrier */ if (head_td->td_info->flags & TD_FLAGS_NETIF_SKB) - MACvTransmitAC0(priv->PortOffset); + MACvTransmitAC0(priv->port_offset); else - MACvTransmit0(priv->PortOffset); + MACvTransmit0(priv->port_offset); priv->iTDUsed[dma_idx]++; @@ -1255,7 +1255,7 @@ static int vnt_start(struct ieee80211_hw *hw) device_init_registers(priv); dev_dbg(&priv->pcid->dev, "call MACvIntEnable\n"); - MACvIntEnable(priv->PortOffset, IMR_MASK_VALUE); + MACvIntEnable(priv->port_offset, IMR_MASK_VALUE); ieee80211_wake_queues(hw); @@ -1305,15 +1305,15 @@ static int vnt_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif) case NL80211_IFTYPE_STATION: break; case NL80211_IFTYPE_ADHOC: - MACvRegBitsOff(priv->PortOffset, MAC_REG_RCR, RCR_UNICAST); + MACvRegBitsOff(priv->port_offset, MAC_REG_RCR, RCR_UNICAST); - MACvRegBitsOn(priv->PortOffset, MAC_REG_HOSTCR, HOSTCR_ADHOC); + MACvRegBitsOn(priv->port_offset, MAC_REG_HOSTCR, HOSTCR_ADHOC); break; case NL80211_IFTYPE_AP: - MACvRegBitsOff(priv->PortOffset, MAC_REG_RCR, RCR_UNICAST); + MACvRegBitsOff(priv->port_offset, MAC_REG_RCR, RCR_UNICAST); - MACvRegBitsOn(priv->PortOffset, MAC_REG_HOSTCR, HOSTCR_AP); + MACvRegBitsOn(priv->port_offset, MAC_REG_HOSTCR, HOSTCR_AP); break; default: @@ -1334,16 +1334,16 @@ static void vnt_remove_interface(struct ieee80211_hw *hw, case NL80211_IFTYPE_STATION: break; case NL80211_IFTYPE_ADHOC: - MACvRegBitsOff(priv->PortOffset, MAC_REG_TCR, TCR_AUTOBCNTX); - MACvRegBitsOff(priv->PortOffset, + MACvRegBitsOff(priv->port_offset, MAC_REG_TCR, TCR_AUTOBCNTX); + MACvRegBitsOff(priv->port_offset, MAC_REG_TFTCTL, TFTCTL_TSFCNTREN); - MACvRegBitsOff(priv->PortOffset, MAC_REG_HOSTCR, HOSTCR_ADHOC); + MACvRegBitsOff(priv->port_offset, MAC_REG_HOSTCR, HOSTCR_ADHOC); break; case NL80211_IFTYPE_AP: - MACvRegBitsOff(priv->PortOffset, MAC_REG_TCR, TCR_AUTOBCNTX); - MACvRegBitsOff(priv->PortOffset, + MACvRegBitsOff(priv->port_offset, MAC_REG_TCR, TCR_AUTOBCNTX); + MACvRegBitsOff(priv->port_offset, MAC_REG_TFTCTL, TFTCTL_TSFCNTREN); - MACvRegBitsOff(priv->PortOffset, MAC_REG_HOSTCR, HOSTCR_AP); + MACvRegBitsOff(priv->port_offset, MAC_REG_HOSTCR, HOSTCR_AP); break; default: break; @@ -1407,7 +1407,7 @@ static void vnt_bss_info_changed(struct ieee80211_hw *hw, spin_lock_irqsave(&priv->lock, flags); - MACvWriteBSSIDAddress(priv->PortOffset, (u8 *)conf->bssid); + MACvWriteBSSIDAddress(priv->port_offset, (u8 *)conf->bssid); spin_unlock_irqrestore(&priv->lock, flags); } @@ -1423,19 +1423,19 @@ static void vnt_bss_info_changed(struct ieee80211_hw *hw, if (changed & BSS_CHANGED_ERP_PREAMBLE) { if (conf->use_short_preamble) { - MACvEnableBarkerPreambleMd(priv->PortOffset); + MACvEnableBarkerPreambleMd(priv->port_offset); priv->byPreambleType = true; } else { - MACvDisableBarkerPreambleMd(priv->PortOffset); + MACvDisableBarkerPreambleMd(priv->port_offset); priv->byPreambleType = false; } } if (changed & BSS_CHANGED_ERP_CTS_PROT) { if (conf->use_cts_prot) - MACvEnableProtectMD(priv->PortOffset); + MACvEnableProtectMD(priv->port_offset); else - MACvDisableProtectMD(priv->PortOffset); + MACvDisableProtectMD(priv->port_offset); } if (changed & BSS_CHANGED_ERP_SLOT) { @@ -1459,10 +1459,10 @@ static void vnt_bss_info_changed(struct ieee80211_hw *hw, if (conf->enable_beacon) { vnt_beacon_enable(priv, vif, conf); - MACvRegBitsOn(priv->PortOffset, MAC_REG_TCR, + MACvRegBitsOn(priv->port_offset, MAC_REG_TCR, TCR_AUTOBCNTX); } else { - MACvRegBitsOff(priv->PortOffset, MAC_REG_TCR, + MACvRegBitsOff(priv->port_offset, MAC_REG_TCR, TCR_AUTOBCNTX); } } @@ -1477,9 +1477,9 @@ static void vnt_bss_info_changed(struct ieee80211_hw *hw, CARDvSetFirstNextTBTT(priv, conf->beacon_int); } else { - VNSvOutPortB(priv->PortOffset + MAC_REG_TFTCTL, + VNSvOutPortB(priv->port_offset + MAC_REG_TFTCTL, TFTCTL_TSFCNTRST); - VNSvOutPortB(priv->PortOffset + MAC_REG_TFTCTL, + VNSvOutPortB(priv->port_offset + MAC_REG_TFTCTL, TFTCTL_TSFCNTREN); } } @@ -1513,7 +1513,7 @@ static void vnt_configure(struct ieee80211_hw *hw, *total_flags &= FIF_ALLMULTI | FIF_OTHER_BSS | FIF_BCN_PRBRESP_PROMISC; - VNSvInPortB(priv->PortOffset + MAC_REG_RCR, &rx_mode); + VNSvInPortB(priv->port_offset + MAC_REG_RCR, &rx_mode); dev_dbg(&priv->pcid->dev, "rx mode in = %x\n", rx_mode); @@ -1524,24 +1524,24 @@ static void vnt_configure(struct ieee80211_hw *hw, spin_lock_irqsave(&priv->lock, flags); if (priv->mc_list_count > 2) { - MACvSelectPage1(priv->PortOffset); + MACvSelectPage1(priv->port_offset); - VNSvOutPortD(priv->PortOffset + + VNSvOutPortD(priv->port_offset + MAC_REG_MAR0, 0xffffffff); - VNSvOutPortD(priv->PortOffset + + VNSvOutPortD(priv->port_offset + MAC_REG_MAR0 + 4, 0xffffffff); - MACvSelectPage0(priv->PortOffset); + MACvSelectPage0(priv->port_offset); } else { - MACvSelectPage1(priv->PortOffset); + MACvSelectPage1(priv->port_offset); - VNSvOutPortD(priv->PortOffset + + VNSvOutPortD(priv->port_offset + MAC_REG_MAR0, (u32)multicast); - VNSvOutPortD(priv->PortOffset + + VNSvOutPortD(priv->port_offset + MAC_REG_MAR0 + 4, (u32)(multicast >> 32)); - MACvSelectPage0(priv->PortOffset); + MACvSelectPage0(priv->port_offset); } spin_unlock_irqrestore(&priv->lock, flags); @@ -1561,7 +1561,7 @@ static void vnt_configure(struct ieee80211_hw *hw, rx_mode |= RCR_BSSID; } - VNSvOutPortB(priv->PortOffset + MAC_REG_RCR, rx_mode); + VNSvOutPortB(priv->port_offset + MAC_REG_RCR, rx_mode); dev_dbg(&priv->pcid->dev, "rx mode out= %x\n", rx_mode); } @@ -1621,7 +1621,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->PortOffset + MAC_REG_TFTCTL, TFTCTL_TSFCNTRST); + VNSvOutPortB(priv->port_offset + MAC_REG_TFTCTL, TFTCTL_TSFCNTRST); } static const struct ieee80211_ops vnt_mac_ops = { @@ -1698,9 +1698,9 @@ vt6655_probe(struct pci_dev *pcid, const struct pci_device_id *ent) priv->memaddr = pci_resource_start(pcid, 0); priv->ioaddr = pci_resource_start(pcid, 1); - priv->PortOffset = ioremap(priv->memaddr & PCI_BASE_ADDRESS_MEM_MASK, + priv->port_offset = ioremap(priv->memaddr & PCI_BASE_ADDRESS_MEM_MASK, 256); - if (!priv->PortOffset) { + if (!priv->port_offset) { dev_err(&pcid->dev, ": Failed to IO remapping ..\n"); device_free_info(priv); return -ENODEV; @@ -1729,10 +1729,10 @@ vt6655_probe(struct pci_dev *pcid, const struct pci_device_id *ent) } /* initial to reload eeprom */ MACvInitialize(priv); - MACvReadEtherAddress(priv->PortOffset, priv->abyCurrentNetAddr); + MACvReadEtherAddress(priv->port_offset, priv->abyCurrentNetAddr); /* Get RFType */ - priv->byRFType = SROMbyReadEmbedded(priv->PortOffset, EEP_OFS_RFTYPE); + priv->byRFType = SROMbyReadEmbedded(priv->port_offset, EEP_OFS_RFTYPE); priv->byRFType &= RF_MASK; dev_dbg(&pcid->dev, "RF Type = %x\n", priv->byRFType); |