Commit e59314b6 authored by Gilbert Adikankwu's avatar Gilbert Adikankwu Committed by Greg Kroah-Hartman

staging: vt6655: Rename variable bySlot

Remove byte Type encoding "by" from variable name and replace camelcase
with snakecase.

Fix checkpatch.pl error:
	CHECK: Avoid CamelCase: <bySlot>
Signed-off-by: default avatarGilbert Adikankwu <gilbertadikankwu@gmail.com>
Tested-by: default avatarPhilipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/57a1a08fba23d8da8ed1411d84f31f074f510444.1697927812.git.gilbertadikankwu@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 25b8c77e
...@@ -185,7 +185,7 @@ static void s_vCalculateOFDMRParameter(unsigned char rate, ...@@ -185,7 +185,7 @@ static void s_vCalculateOFDMRParameter(unsigned char rate,
bool CARDbSetPhyParameter(struct vnt_private *priv, u8 bb_type) bool CARDbSetPhyParameter(struct vnt_private *priv, u8 bb_type)
{ {
unsigned char cw_max_min = 0; unsigned char cw_max_min = 0;
unsigned char bySlot = 0; unsigned char slot = 0;
unsigned char bySIFS = 0; unsigned char bySIFS = 0;
unsigned char byDIFS = 0; unsigned char byDIFS = 0;
int i; int i;
...@@ -194,14 +194,14 @@ bool CARDbSetPhyParameter(struct vnt_private *priv, u8 bb_type) ...@@ -194,14 +194,14 @@ bool CARDbSetPhyParameter(struct vnt_private *priv, u8 bb_type)
if (bb_type == BB_TYPE_11A) { if (bb_type == BB_TYPE_11A) {
vt6655_mac_set_bb_type(priv->port_offset, BB_TYPE_11A); vt6655_mac_set_bb_type(priv->port_offset, BB_TYPE_11A);
bb_write_embedded(priv, 0x88, 0x03); bb_write_embedded(priv, 0x88, 0x03);
bySlot = C_SLOT_SHORT; slot = C_SLOT_SHORT;
bySIFS = C_SIFS_A; bySIFS = C_SIFS_A;
byDIFS = C_SIFS_A + 2 * C_SLOT_SHORT; byDIFS = C_SIFS_A + 2 * C_SLOT_SHORT;
cw_max_min = 0xA4; cw_max_min = 0xA4;
} else if (bb_type == BB_TYPE_11B) { } else if (bb_type == BB_TYPE_11B) {
vt6655_mac_set_bb_type(priv->port_offset, BB_TYPE_11B); vt6655_mac_set_bb_type(priv->port_offset, BB_TYPE_11B);
bb_write_embedded(priv, 0x88, 0x02); bb_write_embedded(priv, 0x88, 0x02);
bySlot = C_SLOT_LONG; slot = C_SLOT_LONG;
bySIFS = C_SIFS_BG; bySIFS = C_SIFS_BG;
byDIFS = C_SIFS_BG + 2 * C_SLOT_LONG; byDIFS = C_SIFS_BG + 2 * C_SLOT_LONG;
cw_max_min = 0xA5; cw_max_min = 0xA5;
...@@ -211,10 +211,10 @@ bool CARDbSetPhyParameter(struct vnt_private *priv, u8 bb_type) ...@@ -211,10 +211,10 @@ bool CARDbSetPhyParameter(struct vnt_private *priv, u8 bb_type)
bySIFS = C_SIFS_BG; bySIFS = C_SIFS_BG;
if (priv->short_slot_time) { if (priv->short_slot_time) {
bySlot = C_SLOT_SHORT; slot = C_SLOT_SHORT;
byDIFS = C_SIFS_BG + 2 * C_SLOT_SHORT; byDIFS = C_SIFS_BG + 2 * C_SLOT_SHORT;
} else { } else {
bySlot = C_SLOT_LONG; slot = C_SLOT_LONG;
byDIFS = C_SIFS_BG + 2 * C_SLOT_LONG; byDIFS = C_SIFS_BG + 2 * C_SLOT_LONG;
} }
...@@ -254,9 +254,9 @@ bool CARDbSetPhyParameter(struct vnt_private *priv, u8 bb_type) ...@@ -254,9 +254,9 @@ bool CARDbSetPhyParameter(struct vnt_private *priv, u8 bb_type)
priv->byEIFS = C_EIFS; priv->byEIFS = C_EIFS;
iowrite8(priv->byEIFS, priv->port_offset + MAC_REG_EIFS); iowrite8(priv->byEIFS, priv->port_offset + MAC_REG_EIFS);
} }
if (priv->bySlot != bySlot) { if (priv->slot != slot) {
priv->bySlot = bySlot; priv->slot = slot;
iowrite8(priv->bySlot, priv->port_offset + MAC_REG_SLOT); iowrite8(priv->slot, priv->port_offset + MAC_REG_SLOT);
bb_set_short_slot_time(priv); bb_set_short_slot_time(priv);
} }
......
...@@ -184,7 +184,7 @@ struct vnt_private { ...@@ -184,7 +184,7 @@ struct vnt_private {
unsigned char bySIFS; unsigned char bySIFS;
unsigned char byDIFS; unsigned char byDIFS;
unsigned char byEIFS; unsigned char byEIFS;
unsigned char bySlot; unsigned char slot;
unsigned char cw_max_min; unsigned char cw_max_min;
u8 byBBType; /* 0:11A, 1:11B, 2:11G */ u8 byBBType; /* 0:11A, 1:11B, 2:11G */
......
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