summaryrefslogtreecommitdiff
path: root/drivers/staging/vt6655
diff options
context:
space:
mode:
authorGilbert Adikankwu <gilbertadikankwu@gmail.com>2023-10-22 00:12:30 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-10-22 12:23:31 +0200
commit30af3e57580d93bab1929e3b7cbed9177a8a6cef (patch)
tree64e491b5e90b367bbc727b66322fa2f18376058f /drivers/staging/vt6655
parentd988a485f5940e119d6de4f2b17ea0a1dfc7db4f (diff)
downloadlwn-30af3e57580d93bab1929e3b7cbed9177a8a6cef.tar.gz
lwn-30af3e57580d93bab1929e3b7cbed9177a8a6cef.zip
staging: vt6655: Rename variable byDIFS
Remove byte Type encoding "by" from variable name and replace camelcase with snakecase Fix checkpatch.pl error: CHECK: Avoid CamelCase: <byDIFS> Signed-off-by: Gilbert Adikankwu <gilbertadikankwu@gmail.com> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/f10775da0decdbbec33d38236cdf89bcd8ab591e.1697927812.git.gilbertadikankwu@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vt6655')
-rw-r--r--drivers/staging/vt6655/card.c18
-rw-r--r--drivers/staging/vt6655/device.h2
2 files changed, 10 insertions, 10 deletions
diff --git a/drivers/staging/vt6655/card.c b/drivers/staging/vt6655/card.c
index 48e571badfb1..9c8648ea96be 100644
--- a/drivers/staging/vt6655/card.c
+++ b/drivers/staging/vt6655/card.c
@@ -187,7 +187,7 @@ bool CARDbSetPhyParameter(struct vnt_private *priv, u8 bb_type)
unsigned char cw_max_min = 0;
unsigned char slot = 0;
unsigned char sifs = 0;
- unsigned char byDIFS = 0;
+ unsigned char difs = 0;
int i;
/* Set SIFS, DIFS, EIFS, SlotTime, CwMin */
@@ -196,14 +196,14 @@ bool CARDbSetPhyParameter(struct vnt_private *priv, u8 bb_type)
bb_write_embedded(priv, 0x88, 0x03);
slot = C_SLOT_SHORT;
sifs = C_SIFS_A;
- byDIFS = C_SIFS_A + 2 * C_SLOT_SHORT;
+ difs = C_SIFS_A + 2 * C_SLOT_SHORT;
cw_max_min = 0xA4;
} else if (bb_type == BB_TYPE_11B) {
vt6655_mac_set_bb_type(priv->port_offset, BB_TYPE_11B);
bb_write_embedded(priv, 0x88, 0x02);
slot = C_SLOT_LONG;
sifs = C_SIFS_BG;
- byDIFS = C_SIFS_BG + 2 * C_SLOT_LONG;
+ difs = C_SIFS_BG + 2 * C_SLOT_LONG;
cw_max_min = 0xA5;
} else { /* PK_TYPE_11GA & PK_TYPE_11GB */
vt6655_mac_set_bb_type(priv->port_offset, BB_TYPE_11G);
@@ -212,10 +212,10 @@ bool CARDbSetPhyParameter(struct vnt_private *priv, u8 bb_type)
if (priv->short_slot_time) {
slot = C_SLOT_SHORT;
- byDIFS = C_SIFS_BG + 2 * C_SLOT_SHORT;
+ difs = C_SIFS_BG + 2 * C_SLOT_SHORT;
} else {
slot = C_SLOT_LONG;
- byDIFS = C_SIFS_BG + 2 * C_SLOT_LONG;
+ difs = C_SIFS_BG + 2 * C_SLOT_LONG;
}
cw_max_min = 0xa4;
@@ -234,7 +234,7 @@ bool CARDbSetPhyParameter(struct vnt_private *priv, u8 bb_type)
* time here is 2 us.
*/
sifs -= 3;
- byDIFS -= 3;
+ difs -= 3;
/*
* TX_PE will reserve 3 us for MAX2829 A mode only, it is for
* better TX throughput; MAC will need 2 us to process, so the
@@ -246,9 +246,9 @@ bool CARDbSetPhyParameter(struct vnt_private *priv, u8 bb_type)
priv->sifs = sifs;
iowrite8(priv->sifs, priv->port_offset + MAC_REG_SIFS);
}
- if (priv->byDIFS != byDIFS) {
- priv->byDIFS = byDIFS;
- iowrite8(priv->byDIFS, priv->port_offset + MAC_REG_DIFS);
+ if (priv->difs != difs) {
+ priv->difs = difs;
+ iowrite8(priv->difs, priv->port_offset + MAC_REG_DIFS);
}
if (priv->byEIFS != C_EIFS) {
priv->byEIFS = C_EIFS;
diff --git a/drivers/staging/vt6655/device.h b/drivers/staging/vt6655/device.h
index e6669c5f0b8b..264bb056c80c 100644
--- a/drivers/staging/vt6655/device.h
+++ b/drivers/staging/vt6655/device.h
@@ -182,7 +182,7 @@ struct vnt_private {
unsigned int uCwMax; /* CwMax is fixed on 1023. */
/* PHY parameter */
unsigned char sifs;
- unsigned char byDIFS;
+ unsigned char difs;
unsigned char byEIFS;
unsigned char slot;
unsigned char cw_max_min;