diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-18 18:50:36 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-18 18:50:36 +0000 |
commit | 50ba0232fd5312410f1b65247e774244f89a628e (patch) | |
tree | fd8f2fc78e9e548af0ff9590276602ee6125be00 /drivers/staging/vt6655 | |
parent | Releasing progress-linux version 6.7.12-1~progress7.99u1. (diff) | |
download | linux-50ba0232fd5312410f1b65247e774244f89a628e.tar.xz linux-50ba0232fd5312410f1b65247e774244f89a628e.zip |
Merging upstream version 6.8.9.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'drivers/staging/vt6655')
-rw-r--r-- | drivers/staging/vt6655/card.c | 90 | ||||
-rw-r--r-- | drivers/staging/vt6655/card.h | 18 | ||||
-rw-r--r-- | drivers/staging/vt6655/device.h | 4 | ||||
-rw-r--r-- | drivers/staging/vt6655/device_main.c | 18 | ||||
-rw-r--r-- | drivers/staging/vt6655/rxtx.c | 2 |
5 files changed, 66 insertions, 66 deletions
diff --git a/drivers/staging/vt6655/card.c b/drivers/staging/vt6655/card.c index 350ab8f377..36183f2a64 100644 --- a/drivers/staging/vt6655/card.c +++ b/drivers/staging/vt6655/card.c @@ -10,12 +10,12 @@ * CARDvUpdateBasicTopRate - Update BasicTopRate * CARDbAddBasicRate - Add to BasicRateSet * CARDbIsOFDMinBasicRate - Check if any OFDM rate is in BasicRateSet - * CARDqGetTSFOffset - Calculate TSFOffset + * card_get_tsf_offset - Calculate TSFOffset * vt6655_get_current_tsf - Read Current NIC TSF counter - * CARDqGetNextTBTT - Calculate Next Beacon TSF counter + * card_get_next_tbtt - Calculate Next Beacon TSF counter * CARDvSetFirstNextTBTT - Set NIC Beacon time * CARDvUpdateNextTBTT - Sync. NIC Beacon time - * CARDbRadioPowerOff - Turn Off NIC Radio Power + * card_radio_power_off - Turn Off NIC Radio Power * * Revision History: * 06-10-2003 Bryan YC Fan: Re-write codes to support VT3253 spec. @@ -280,7 +280,7 @@ bool card_set_phy_parameter(struct vnt_private *priv, u8 bb_type) * In: * priv - The adapter to be sync. * rx_rate - data rate of receive beacon - * qwBSSTimestamp - Rx BCN's TSF + * bss_timestamp - Rx BCN's TSF * qwLocalTSF - Local TSF * Out: * none @@ -288,20 +288,20 @@ bool card_set_phy_parameter(struct vnt_private *priv, u8 bb_type) * Return Value: none */ bool card_update_tsf(struct vnt_private *priv, unsigned char rx_rate, - u64 qwBSSTimestamp) + u64 bss_timestamp) { u64 local_tsf; - u64 qwTSFOffset = 0; + u64 tsf_offset = 0; local_tsf = vt6655_get_current_tsf(priv); - if (qwBSSTimestamp != local_tsf) { - qwTSFOffset = CARDqGetTSFOffset(rx_rate, qwBSSTimestamp, + if (bss_timestamp != local_tsf) { + tsf_offset = card_get_tsf_offset(rx_rate, bss_timestamp, local_tsf); /* adjust TSF, HW's TSF add TSF Offset reg */ - qwTSFOffset = le64_to_cpu(qwTSFOffset); - iowrite32((u32)qwTSFOffset, priv->port_offset + MAC_REG_TSFOFST); - iowrite32((u32)(qwTSFOffset >> 32), priv->port_offset + MAC_REG_TSFOFST + 4); + tsf_offset = le64_to_cpu(tsf_offset); + iowrite32((u32)tsf_offset, priv->port_offset + MAC_REG_TSFOFST); + iowrite32((u32)(tsf_offset >> 32), priv->port_offset + MAC_REG_TSFOFST + 4); vt6655_mac_reg_bits_on(priv->port_offset, MAC_REG_TFTCTL, TFTCTL_TSFSYNCEN); } return true; @@ -314,28 +314,28 @@ bool card_update_tsf(struct vnt_private *priv, unsigned char rx_rate, * Parameters: * In: * priv - The adapter to be set. - * wBeaconInterval - Beacon Interval + * beacon_interval - Beacon Interval * Out: * none * * Return Value: true if succeed; otherwise false */ -bool CARDbSetBeaconPeriod(struct vnt_private *priv, - unsigned short wBeaconInterval) +bool card_set_beacon_period(struct vnt_private *priv, + unsigned short beacon_interval) { - u64 qwNextTBTT; + u64 next_tbtt; - qwNextTBTT = vt6655_get_current_tsf(priv); /* Get Local TSF counter */ + next_tbtt = vt6655_get_current_tsf(priv); /* Get Local TSF counter */ - qwNextTBTT = CARDqGetNextTBTT(qwNextTBTT, wBeaconInterval); + next_tbtt = card_get_next_tbtt(next_tbtt, beacon_interval); /* set HW beacon interval */ - iowrite16(wBeaconInterval, priv->port_offset + MAC_REG_BI); - priv->wBeaconInterval = wBeaconInterval; + iowrite16(beacon_interval, priv->port_offset + MAC_REG_BI); + priv->beacon_interval = beacon_interval; /* Set NextTBTT */ - qwNextTBTT = le64_to_cpu(qwNextTBTT); - iowrite32((u32)qwNextTBTT, priv->port_offset + MAC_REG_NEXTTBTT); - iowrite32((u32)(qwNextTBTT >> 32), priv->port_offset + MAC_REG_NEXTTBTT + 4); + next_tbtt = le64_to_cpu(next_tbtt); + iowrite32((u32)next_tbtt, priv->port_offset + MAC_REG_NEXTTBTT); + iowrite32((u32)(next_tbtt >> 32), priv->port_offset + MAC_REG_NEXTTBTT + 4); vt6655_mac_reg_bits_on(priv->port_offset, MAC_REG_TFTCTL, TFTCTL_TBTTSYNCEN); return true; @@ -351,7 +351,7 @@ bool CARDbSetBeaconPeriod(struct vnt_private *priv, * none * */ -void CARDbRadioPowerOff(struct vnt_private *priv) +void card_radio_power_off(struct vnt_private *priv) { if (priv->radio_off) return; @@ -382,29 +382,29 @@ void CARDbRadioPowerOff(struct vnt_private *priv) vt6655_mac_reg_bits_on(priv->port_offset, MAC_REG_GPIOCTL0, LED_ACTSET); /* LED issue */ } -void CARDvSafeResetTx(struct vnt_private *priv) +void card_safe_reset_tx(struct vnt_private *priv) { unsigned int uu; - struct vnt_tx_desc *pCurrTD; + struct vnt_tx_desc *curr_td; /* initialize TD index */ - priv->apTailTD[0] = &priv->apTD0Rings[0]; + priv->tail_td[0] = &priv->apTD0Rings[0]; priv->apCurrTD[0] = &priv->apTD0Rings[0]; - priv->apTailTD[1] = &priv->apTD1Rings[0]; + priv->tail_td[1] = &priv->apTD1Rings[0]; priv->apCurrTD[1] = &priv->apTD1Rings[0]; for (uu = 0; uu < TYPE_MAXTD; uu++) priv->iTDUsed[uu] = 0; for (uu = 0; uu < priv->opts.tx_descs[0]; uu++) { - pCurrTD = &priv->apTD0Rings[uu]; - pCurrTD->td0.owner = OWNED_BY_HOST; + curr_td = &priv->apTD0Rings[uu]; + curr_td->td0.owner = OWNED_BY_HOST; /* init all Tx Packet pointer to NULL */ } for (uu = 0; uu < priv->opts.tx_descs[1]; uu++) { - pCurrTD = &priv->apTD1Rings[uu]; - pCurrTD->td0.owner = OWNED_BY_HOST; + curr_td = &priv->apTD1Rings[uu]; + curr_td->td0.owner = OWNED_BY_HOST; /* init all Tx Packet pointer to NULL */ } @@ -708,7 +708,7 @@ unsigned char card_get_pkt_type(struct vnt_private *priv) * * Return Value: TSF Offset value */ -u64 CARDqGetTSFOffset(unsigned char rx_rate, u64 qwTSF1, u64 qwTSF2) +u64 card_get_tsf_offset(unsigned char rx_rate, u64 qwTSF1, u64 qwTSF2) { unsigned short wRxBcnTSFOffst; @@ -764,11 +764,11 @@ u64 vt6655_get_current_tsf(struct vnt_private *priv) * * Return Value: TSF value of next Beacon */ -u64 CARDqGetNextTBTT(u64 qwTSF, unsigned short wBeaconInterval) +u64 card_get_next_tbtt(u64 qwTSF, unsigned short beacon_interval) { u32 beacon_int; - beacon_int = wBeaconInterval * 1024; + beacon_int = beacon_interval * 1024; if (beacon_int) { do_div(qwTSF, beacon_int); qwTSF += 1; @@ -785,25 +785,25 @@ u64 CARDqGetNextTBTT(u64 qwTSF, unsigned short wBeaconInterval) * Parameters: * In: * iobase - IO Base - * wBeaconInterval - Beacon Interval + * beacon_interval - Beacon Interval * Out: * none * * Return Value: none */ void CARDvSetFirstNextTBTT(struct vnt_private *priv, - unsigned short wBeaconInterval) + unsigned short beacon_interval) { void __iomem *iobase = priv->port_offset; - u64 qwNextTBTT; + u64 next_tbtt; - qwNextTBTT = vt6655_get_current_tsf(priv); /* Get Local TSF counter */ + next_tbtt = vt6655_get_current_tsf(priv); /* Get Local TSF counter */ - qwNextTBTT = CARDqGetNextTBTT(qwNextTBTT, wBeaconInterval); + next_tbtt = card_get_next_tbtt(next_tbtt, beacon_interval); /* Set NextTBTT */ - qwNextTBTT = le64_to_cpu(qwNextTBTT); - iowrite32((u32)qwNextTBTT, iobase + MAC_REG_NEXTTBTT); - iowrite32((u32)(qwNextTBTT >> 32), iobase + MAC_REG_NEXTTBTT + 4); + next_tbtt = le64_to_cpu(next_tbtt); + iowrite32((u32)next_tbtt, iobase + MAC_REG_NEXTTBTT); + iowrite32((u32)(next_tbtt >> 32), iobase + MAC_REG_NEXTTBTT + 4); vt6655_mac_reg_bits_on(iobase, MAC_REG_TFTCTL, TFTCTL_TBTTSYNCEN); } @@ -815,18 +815,18 @@ void CARDvSetFirstNextTBTT(struct vnt_private *priv, * In: * priv - The adapter to be set * qwTSF - Current TSF counter - * wBeaconInterval - Beacon Interval + * beacon_interval - Beacon Interval * Out: * none * * Return Value: none */ void CARDvUpdateNextTBTT(struct vnt_private *priv, u64 qwTSF, - unsigned short wBeaconInterval) + unsigned short beacon_interval) { void __iomem *iobase = priv->port_offset; - qwTSF = CARDqGetNextTBTT(qwTSF, wBeaconInterval); + qwTSF = card_get_next_tbtt(qwTSF, beacon_interval); /* Set NextTBTT */ qwTSF = le64_to_cpu(qwTSF); iowrite32((u32)qwTSF, iobase + MAC_REG_NEXTTBTT); diff --git a/drivers/staging/vt6655/card.h b/drivers/staging/vt6655/card.h index 19689a291f..f52e42564e 100644 --- a/drivers/staging/vt6655/card.h +++ b/drivers/staging/vt6655/card.h @@ -43,20 +43,20 @@ void card_set_rspinf(struct vnt_private *priv, u8 bb_type); void CARDvUpdateBasicTopRate(struct vnt_private *priv); bool CARDbIsOFDMinBasicRate(struct vnt_private *priv); void CARDvSetFirstNextTBTT(struct vnt_private *priv, - unsigned short wBeaconInterval); + unsigned short beacon_interval); void CARDvUpdateNextTBTT(struct vnt_private *priv, u64 qwTSF, - unsigned short wBeaconInterval); + unsigned short beacon_interval); u64 vt6655_get_current_tsf(struct vnt_private *priv); -u64 CARDqGetNextTBTT(u64 qwTSF, unsigned short wBeaconInterval); -u64 CARDqGetTSFOffset(unsigned char rx_rate, u64 qwTSF1, u64 qwTSF2); +u64 card_get_next_tbtt(u64 qwTSF, unsigned short beacon_interval); +u64 card_get_tsf_offset(unsigned char rx_rate, u64 qwTSF1, u64 qwTSF2); unsigned char card_get_pkt_type(struct vnt_private *priv); -void CARDvSafeResetTx(struct vnt_private *priv); +void card_safe_reset_tx(struct vnt_private *priv); void CARDvSafeResetRx(struct vnt_private *priv); -void CARDbRadioPowerOff(struct vnt_private *priv); +void card_radio_power_off(struct vnt_private *priv); bool card_set_phy_parameter(struct vnt_private *priv, u8 bb_type); bool card_update_tsf(struct vnt_private *priv, unsigned char rx_rate, - u64 qwBSSTimestamp); -bool CARDbSetBeaconPeriod(struct vnt_private *priv, - unsigned short wBeaconInterval); + u64 bss_timestamp); +bool card_set_beacon_period(struct vnt_private *priv, + unsigned short beacon_interval); #endif /* __CARD_H__ */ diff --git a/drivers/staging/vt6655/device.h b/drivers/staging/vt6655/device.h index d9ee0b7401..0212240ba2 100644 --- a/drivers/staging/vt6655/device.h +++ b/drivers/staging/vt6655/device.h @@ -133,7 +133,7 @@ struct vnt_private { volatile int iTDUsed[TYPE_MAXTD]; struct vnt_tx_desc *apCurrTD[TYPE_MAXTD]; - struct vnt_tx_desc *apTailTD[TYPE_MAXTD]; + struct vnt_tx_desc *tail_td[TYPE_MAXTD]; struct vnt_tx_desc *apTD0Rings; struct vnt_tx_desc *apTD1Rings; @@ -281,7 +281,7 @@ struct vnt_private { unsigned char abyEEPROM[EEP_MAX_CONTEXT_SIZE]; /* unsigned long alignment */ - unsigned short wBeaconInterval; + unsigned short beacon_interval; u16 wake_up_count; struct work_struct interrupt_work; diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c index 7d297526e6..b0b262de64 100644 --- a/drivers/staging/vt6655/device_main.c +++ b/drivers/staging/vt6655/device_main.c @@ -454,7 +454,7 @@ static void device_init_registers(struct vnt_private *priv) } if (priv->hw_radio_off || priv->bRadioControlOff) - CARDbRadioPowerOff(priv); + card_radio_power_off(priv); /* get Permanent network address */ SROMvReadEtherAddress(priv->port_offset, priv->abyCurrentNetAddr); @@ -463,7 +463,7 @@ static void device_init_registers(struct vnt_private *priv) /* reset Tx pointer */ CARDvSafeResetRx(priv); /* reset Rx pointer */ - CARDvSafeResetTx(priv); + card_safe_reset_tx(priv); if (priv->local_id <= REV_ID_VT3253_A1) vt6655_mac_reg_bits_on(priv->port_offset, MAC_REG_RCR, RCR_WPAERR); @@ -737,7 +737,7 @@ static int device_init_td0_ring(struct vnt_private *priv) if (i > 0) priv->apTD0Rings[i - 1].next_desc = cpu_to_le32(priv->td0_pool_dma); - priv->apTailTD[0] = priv->apCurrTD[0] = &priv->apTD0Rings[0]; + priv->tail_td[0] = priv->apCurrTD[0] = &priv->apTD0Rings[0]; return 0; @@ -777,7 +777,7 @@ static int device_init_td1_ring(struct vnt_private *priv) if (i > 0) priv->apTD1Rings[i - 1].next_desc = cpu_to_le32(priv->td1_pool_dma); - priv->apTailTD[1] = priv->apCurrTD[1] = &priv->apTD1Rings[0]; + priv->tail_td[1] = priv->apCurrTD[1] = &priv->apTD1Rings[0]; return 0; @@ -969,7 +969,7 @@ static int device_tx_srv(struct vnt_private *priv, unsigned int idx) unsigned char byTsr0; unsigned char byTsr1; - for (desc = priv->apTailTD[idx]; priv->iTDUsed[idx] > 0; desc = desc->next) { + for (desc = priv->tail_td[idx]; priv->iTDUsed[idx] > 0; desc = desc->next) { if (desc->td0.owner == OWNED_BY_NIC) break; if (works++ > 15) @@ -1007,7 +1007,7 @@ static int device_tx_srv(struct vnt_private *priv, unsigned int idx) } } - priv->apTailTD[idx] = desc; + priv->tail_td[idx] = desc; return works; } @@ -1349,7 +1349,7 @@ static void vnt_stop(struct ieee80211_hw *hw) MACbShutdown(priv); MACbSoftwareReset(priv); - CARDbRadioPowerOff(priv); + card_radio_power_off(priv); device_free_td0_ring(priv); device_free_td1_ring(priv); @@ -1537,7 +1537,7 @@ static void vnt_bss_info_changed(struct ieee80211_hw *hw, card_update_tsf(priv, conf->beacon_rate->hw_value, conf->sync_tsf); - CARDbSetBeaconPeriod(priv, conf->beacon_int); + card_set_beacon_period(priv, conf->beacon_int); CARDvSetFirstNextTBTT(priv, conf->beacon_int); } else { @@ -1712,7 +1712,7 @@ static int vnt_init(struct vnt_private *priv) priv->mac_hw = true; - CARDbRadioPowerOff(priv); + card_radio_power_off(priv); return 0; } diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c index 522d34ca9b..5e5ed582c3 100644 --- a/drivers/staging/vt6655/rxtx.c +++ b/drivers/staging/vt6655/rxtx.c @@ -1456,7 +1456,7 @@ int vnt_beacon_enable(struct vnt_private *priv, struct ieee80211_vif *vif, CARDvSetFirstNextTBTT(priv, conf->beacon_int); - CARDbSetBeaconPeriod(priv, conf->beacon_int); + card_set_beacon_period(priv, conf->beacon_int); return vnt_beacon_make(priv, vif); } |