Commit 33028eea authored by Philipp Hortmann's avatar Philipp Hortmann Committed by Greg Kroah-Hartman

staging: vt6655: Replace VNSvOutPortW with iowrite16

Replace macro VNSvOutPortW with iowrite16 because it replaces
just one line.
The name of macro and the arguments use CamelCase which
is not accepted by checkpatch.pl
Signed-off-by: default avatarPhilipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/ded437e27cffb040865d4afe47e447c2d0d6f0b8.1653203927.git.philipp.g.hortmann@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4cb07b36
...@@ -326,7 +326,7 @@ bool CARDbSetBeaconPeriod(struct vnt_private *priv, ...@@ -326,7 +326,7 @@ bool CARDbSetBeaconPeriod(struct vnt_private *priv,
qwNextTBTT = CARDqGetNextTBTT(qwNextTBTT, wBeaconInterval); qwNextTBTT = CARDqGetNextTBTT(qwNextTBTT, wBeaconInterval);
/* set HW beacon interval */ /* set HW beacon interval */
VNSvOutPortW(priv->port_offset + MAC_REG_BI, wBeaconInterval); iowrite16(wBeaconInterval, priv->port_offset + MAC_REG_BI);
priv->wBeaconInterval = wBeaconInterval; priv->wBeaconInterval = wBeaconInterval;
/* Set NextTBTT */ /* Set NextTBTT */
VNSvOutPortD(priv->port_offset + MAC_REG_NEXTTBTT, (u32)qwNextTBTT); VNSvOutPortD(priv->port_offset + MAC_REG_NEXTTBTT, (u32)qwNextTBTT);
...@@ -587,68 +587,59 @@ void CARDvSetRSPINF(struct vnt_private *priv, u8 bb_type) ...@@ -587,68 +587,59 @@ void CARDvSetRSPINF(struct vnt_private *priv, u8 bb_type)
bb_type, bb_type,
&byTxRate, &byTxRate,
&byRsvTime); &byRsvTime);
VNSvOutPortW(priv->port_offset + MAC_REG_RSPINF_A_6, iowrite16(MAKEWORD(byTxRate, byRsvTime), priv->port_offset + MAC_REG_RSPINF_A_6);
MAKEWORD(byTxRate, byRsvTime));
/* RSPINF_a_9 */ /* RSPINF_a_9 */
s_vCalculateOFDMRParameter(RATE_9M, s_vCalculateOFDMRParameter(RATE_9M,
bb_type, bb_type,
&byTxRate, &byTxRate,
&byRsvTime); &byRsvTime);
VNSvOutPortW(priv->port_offset + MAC_REG_RSPINF_A_9, iowrite16(MAKEWORD(byTxRate, byRsvTime), priv->port_offset + MAC_REG_RSPINF_A_9);
MAKEWORD(byTxRate, byRsvTime));
/* RSPINF_a_12 */ /* RSPINF_a_12 */
s_vCalculateOFDMRParameter(RATE_12M, s_vCalculateOFDMRParameter(RATE_12M,
bb_type, bb_type,
&byTxRate, &byTxRate,
&byRsvTime); &byRsvTime);
VNSvOutPortW(priv->port_offset + MAC_REG_RSPINF_A_12, iowrite16(MAKEWORD(byTxRate, byRsvTime), priv->port_offset + MAC_REG_RSPINF_A_12);
MAKEWORD(byTxRate, byRsvTime));
/* RSPINF_a_18 */ /* RSPINF_a_18 */
s_vCalculateOFDMRParameter(RATE_18M, s_vCalculateOFDMRParameter(RATE_18M,
bb_type, bb_type,
&byTxRate, &byTxRate,
&byRsvTime); &byRsvTime);
VNSvOutPortW(priv->port_offset + MAC_REG_RSPINF_A_18, iowrite16(MAKEWORD(byTxRate, byRsvTime), priv->port_offset + MAC_REG_RSPINF_A_18);
MAKEWORD(byTxRate, byRsvTime));
/* RSPINF_a_24 */ /* RSPINF_a_24 */
s_vCalculateOFDMRParameter(RATE_24M, s_vCalculateOFDMRParameter(RATE_24M,
bb_type, bb_type,
&byTxRate, &byTxRate,
&byRsvTime); &byRsvTime);
VNSvOutPortW(priv->port_offset + MAC_REG_RSPINF_A_24, iowrite16(MAKEWORD(byTxRate, byRsvTime), priv->port_offset + MAC_REG_RSPINF_A_24);
MAKEWORD(byTxRate, byRsvTime));
/* RSPINF_a_36 */ /* RSPINF_a_36 */
s_vCalculateOFDMRParameter(CARDwGetOFDMControlRate((void *)priv, s_vCalculateOFDMRParameter(CARDwGetOFDMControlRate((void *)priv,
RATE_36M), RATE_36M),
bb_type, bb_type,
&byTxRate, &byTxRate,
&byRsvTime); &byRsvTime);
VNSvOutPortW(priv->port_offset + MAC_REG_RSPINF_A_36, iowrite16(MAKEWORD(byTxRate, byRsvTime), priv->port_offset + MAC_REG_RSPINF_A_36);
MAKEWORD(byTxRate, byRsvTime));
/* RSPINF_a_48 */ /* RSPINF_a_48 */
s_vCalculateOFDMRParameter(CARDwGetOFDMControlRate((void *)priv, s_vCalculateOFDMRParameter(CARDwGetOFDMControlRate((void *)priv,
RATE_48M), RATE_48M),
bb_type, bb_type,
&byTxRate, &byTxRate,
&byRsvTime); &byRsvTime);
VNSvOutPortW(priv->port_offset + MAC_REG_RSPINF_A_48, iowrite16(MAKEWORD(byTxRate, byRsvTime), priv->port_offset + MAC_REG_RSPINF_A_48);
MAKEWORD(byTxRate, byRsvTime));
/* RSPINF_a_54 */ /* RSPINF_a_54 */
s_vCalculateOFDMRParameter(CARDwGetOFDMControlRate((void *)priv, s_vCalculateOFDMRParameter(CARDwGetOFDMControlRate((void *)priv,
RATE_54M), RATE_54M),
bb_type, bb_type,
&byTxRate, &byTxRate,
&byRsvTime); &byRsvTime);
VNSvOutPortW(priv->port_offset + MAC_REG_RSPINF_A_54, iowrite16(MAKEWORD(byTxRate, byRsvTime), priv->port_offset + MAC_REG_RSPINF_A_54);
MAKEWORD(byTxRate, byRsvTime));
/* RSPINF_a_72 */ /* RSPINF_a_72 */
s_vCalculateOFDMRParameter(CARDwGetOFDMControlRate((void *)priv, s_vCalculateOFDMRParameter(CARDwGetOFDMControlRate((void *)priv,
RATE_54M), RATE_54M),
bb_type, bb_type,
&byTxRate, &byTxRate,
&byRsvTime); &byRsvTime);
VNSvOutPortW(priv->port_offset + MAC_REG_RSPINF_A_72, iowrite16(MAKEWORD(byTxRate, byRsvTime), priv->port_offset + MAC_REG_RSPINF_A_72);
MAKEWORD(byTxRate, byRsvTime));
/* Set to Page0 */ /* Set to Page0 */
MACvSelectPage0(priv->port_offset); MACvSelectPage0(priv->port_offset);
......
...@@ -1060,8 +1060,7 @@ static void vnt_interrupt_process(struct vnt_private *priv) ...@@ -1060,8 +1060,7 @@ static void vnt_interrupt_process(struct vnt_private *priv)
if (isr & ISR_FETALERR) { if (isr & ISR_FETALERR) {
pr_debug(" ISR_FETALERR\n"); pr_debug(" ISR_FETALERR\n");
iowrite8(0, priv->port_offset + MAC_REG_SOFTPWRCTL); iowrite8(0, priv->port_offset + MAC_REG_SOFTPWRCTL);
VNSvOutPortW(priv->port_offset + iowrite16(SOFTPWRCTL_SWPECTI, priv->port_offset + MAC_REG_SOFTPWRCTL);
MAC_REG_SOFTPWRCTL, SOFTPWRCTL_SWPECTI);
device_error(priv, isr); device_error(priv, isr);
} }
......
...@@ -548,7 +548,7 @@ do { \ ...@@ -548,7 +548,7 @@ do { \
do { \ do { \
unsigned short wData; \ unsigned short wData; \
wData = ioread16(iobase + byRegOfs); \ wData = ioread16(iobase + byRegOfs); \
VNSvOutPortW(iobase + byRegOfs, wData | (wBits)); \ iowrite16(wData | (wBits), iobase + byRegOfs); \
} while (0) } while (0)
#define MACvRegBitsOff(iobase, byRegOfs, byBits) \ #define MACvRegBitsOff(iobase, byRegOfs, byBits) \
...@@ -562,7 +562,7 @@ do { \ ...@@ -562,7 +562,7 @@ do { \
do { \ do { \
unsigned short wData; \ unsigned short wData; \
wData = ioread16(iobase + byRegOfs); \ wData = ioread16(iobase + byRegOfs); \
VNSvOutPortW(iobase + byRegOfs, wData & ~(wBits)); \ iowrite16(wData & ~(wBits), iobase + byRegOfs); \
} while (0) } while (0)
/* set the chip with current BCN tx descriptor address */ /* set the chip with current BCN tx descriptor address */
......
...@@ -52,10 +52,10 @@ void PSvEnablePowerSaving(struct vnt_private *priv, ...@@ -52,10 +52,10 @@ void PSvEnablePowerSaving(struct vnt_private *priv,
u16 wAID = priv->current_aid | BIT(14) | BIT(15); u16 wAID = priv->current_aid | BIT(14) | BIT(15);
/* set period of power up before TBTT */ /* set period of power up before TBTT */
VNSvOutPortW(priv->port_offset + MAC_REG_PWBT, C_PWBT); iowrite16(C_PWBT, priv->port_offset + MAC_REG_PWBT);
if (priv->op_mode != NL80211_IFTYPE_ADHOC) { if (priv->op_mode != NL80211_IFTYPE_ADHOC) {
/* set AID */ /* set AID */
VNSvOutPortW(priv->port_offset + MAC_REG_AIDATIM, wAID); iowrite16(wAID, priv->port_offset + MAC_REG_AIDATIM);
} }
/* Set AutoSleep */ /* Set AutoSleep */
......
...@@ -350,7 +350,7 @@ bool rf_write_wake_prog_syn(struct vnt_private *priv, unsigned char rf_type, ...@@ -350,7 +350,7 @@ bool rf_write_wake_prog_syn(struct vnt_private *priv, unsigned char rf_type,
unsigned char sleep_count = 0; unsigned char sleep_count = 0;
unsigned short idx = MISCFIFO_SYNDATA_IDX; unsigned short idx = MISCFIFO_SYNDATA_IDX;
VNSvOutPortW(iobase + MAC_REG_MISCFFNDEX, 0); iowrite16(0, iobase + MAC_REG_MISCFFNDEX);
switch (rf_type) { switch (rf_type) {
case RF_AIROHA: case RF_AIROHA:
case RF_AL2230S: case RF_AL2230S:
......
...@@ -1422,7 +1422,7 @@ static int vnt_beacon_xmit(struct vnt_private *priv, ...@@ -1422,7 +1422,7 @@ static int vnt_beacon_xmit(struct vnt_private *priv,
MACvSetCurrBCNTxDescAddr(priv->port_offset, priv->tx_beacon_dma); MACvSetCurrBCNTxDescAddr(priv->port_offset, priv->tx_beacon_dma);
VNSvOutPortW(priv->port_offset + MAC_REG_BCNDMACTL + 2, priv->wBCNBufLen); iowrite16(priv->wBCNBufLen, priv->port_offset + MAC_REG_BCNDMACTL + 2);
/* Set auto Transmit on */ /* Set auto Transmit on */
MACvRegBitsOn(priv->port_offset, MAC_REG_TCR, TCR_AUTOBCNTX); MACvRegBitsOn(priv->port_offset, MAC_REG_TCR, TCR_AUTOBCNTX);
/* Poll Transmit the adapter */ /* Poll Transmit the adapter */
......
...@@ -20,9 +20,6 @@ ...@@ -20,9 +20,6 @@
/* For memory mapped IO */ /* For memory mapped IO */
#define VNSvOutPortW(dwIOAddress, wData) \
iowrite16((u16)(wData), dwIOAddress)
#define VNSvOutPortD(dwIOAddress, dwData) \ #define VNSvOutPortD(dwIOAddress, dwData) \
iowrite32((u32)(dwData), dwIOAddress) iowrite32((u32)(dwData), dwIOAddress)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment