Commit 0e7997c1 authored by Malcolm Priestley's avatar Malcolm Priestley Committed by Greg Kroah-Hartman

staging: vt6655: mac.c replace wOffset with offset.

Removing camel case and type prefix.
Signed-off-by: default avatarMalcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ebc9bd83
...@@ -747,14 +747,14 @@ void MACvOneShotTimer1MicroSec(struct vnt_private *priv, unsigned int uDelayTime ...@@ -747,14 +747,14 @@ void MACvOneShotTimer1MicroSec(struct vnt_private *priv, unsigned int uDelayTime
iowrite8((TMCTL_TMD | TMCTL_TE), io_base + MAC_REG_TMCTL1); iowrite8((TMCTL_TMD | TMCTL_TE), io_base + MAC_REG_TMCTL1);
} }
void MACvSetMISCFifo(struct vnt_private *priv, unsigned short wOffset, void MACvSetMISCFifo(struct vnt_private *priv, unsigned short offset,
u32 dwData) u32 dwData)
{ {
void __iomem *io_base = priv->PortOffset; void __iomem *io_base = priv->PortOffset;
if (wOffset > 273) if (offset > 273)
return; return;
iowrite16(wOffset, io_base + MAC_REG_MISCFFNDEX); iowrite16(offset, io_base + MAC_REG_MISCFFNDEX);
iowrite32(dwData, io_base + MAC_REG_MISCFFDATA); iowrite32(dwData, io_base + MAC_REG_MISCFFDATA);
iowrite16(MISCFFCTL_WRITE, io_base + MAC_REG_MISCFFCTL); iowrite16(MISCFFCTL_WRITE, io_base + MAC_REG_MISCFFCTL);
} }
...@@ -803,7 +803,7 @@ void MACvSetKeyEntry(struct vnt_private *priv, unsigned short wKeyCtl, ...@@ -803,7 +803,7 @@ void MACvSetKeyEntry(struct vnt_private *priv, unsigned short wKeyCtl,
unsigned char byLocalID) unsigned char byLocalID)
{ {
void __iomem *io_base = priv->PortOffset; void __iomem *io_base = priv->PortOffset;
unsigned short wOffset; unsigned short offset;
u32 dwData; u32 dwData;
int ii; int ii;
...@@ -811,20 +811,20 @@ void MACvSetKeyEntry(struct vnt_private *priv, unsigned short wKeyCtl, ...@@ -811,20 +811,20 @@ void MACvSetKeyEntry(struct vnt_private *priv, unsigned short wKeyCtl,
return; return;
pr_debug("MACvSetKeyEntry\n"); pr_debug("MACvSetKeyEntry\n");
wOffset = MISCFIFO_KEYETRY0; offset = MISCFIFO_KEYETRY0;
wOffset += (uEntryIdx * MISCFIFO_KEYENTRYSIZE); offset += (uEntryIdx * MISCFIFO_KEYENTRYSIZE);
dwData = 0; dwData = 0;
dwData |= wKeyCtl; dwData |= wKeyCtl;
dwData <<= 16; dwData <<= 16;
dwData |= MAKEWORD(*(pbyAddr+4), *(pbyAddr+5)); dwData |= MAKEWORD(*(pbyAddr+4), *(pbyAddr+5));
pr_debug("1. wOffset: %d, Data: %X, KeyCtl:%X\n", pr_debug("1. offset: %d, Data: %X, KeyCtl:%X\n",
wOffset, dwData, wKeyCtl); offset, dwData, wKeyCtl);
iowrite16(wOffset, io_base + MAC_REG_MISCFFNDEX); iowrite16(offset, io_base + MAC_REG_MISCFFNDEX);
iowrite32(dwData, io_base + MAC_REG_MISCFFDATA); iowrite32(dwData, io_base + MAC_REG_MISCFFDATA);
iowrite16(MISCFFCTL_WRITE, io_base + MAC_REG_MISCFFCTL); iowrite16(MISCFFCTL_WRITE, io_base + MAC_REG_MISCFFCTL);
wOffset++; offset++;
dwData = 0; dwData = 0;
dwData |= *(pbyAddr+3); dwData |= *(pbyAddr+3);
...@@ -834,19 +834,19 @@ void MACvSetKeyEntry(struct vnt_private *priv, unsigned short wKeyCtl, ...@@ -834,19 +834,19 @@ void MACvSetKeyEntry(struct vnt_private *priv, unsigned short wKeyCtl,
dwData |= *(pbyAddr+1); dwData |= *(pbyAddr+1);
dwData <<= 8; dwData <<= 8;
dwData |= *(pbyAddr+0); dwData |= *(pbyAddr+0);
pr_debug("2. wOffset: %d, Data: %X\n", wOffset, dwData); pr_debug("2. offset: %d, Data: %X\n", offset, dwData);
iowrite16(wOffset, io_base + MAC_REG_MISCFFNDEX); iowrite16(offset, io_base + MAC_REG_MISCFFNDEX);
iowrite32(dwData, io_base + MAC_REG_MISCFFDATA); iowrite32(dwData, io_base + MAC_REG_MISCFFDATA);
iowrite16(MISCFFCTL_WRITE, io_base + MAC_REG_MISCFFCTL); iowrite16(MISCFFCTL_WRITE, io_base + MAC_REG_MISCFFCTL);
wOffset++; offset++;
wOffset += (uKeyIdx * 4); offset += (uKeyIdx * 4);
for (ii = 0; ii < 4; ii++) { for (ii = 0; ii < 4; ii++) {
/* always push 128 bits */ /* always push 128 bits */
pr_debug("3.(%d) wOffset: %d, Data: %X\n", pr_debug("3.(%d) offset: %d, Data: %X\n",
ii, wOffset+ii, *pdwKey); ii, offset + ii, *pdwKey);
iowrite16(wOffset + ii, io_base + MAC_REG_MISCFFNDEX); iowrite16(offset + ii, io_base + MAC_REG_MISCFFNDEX);
iowrite32(*pdwKey++, io_base + MAC_REG_MISCFFDATA); iowrite32(*pdwKey++, io_base + MAC_REG_MISCFFDATA);
iowrite16(MISCFFCTL_WRITE, io_base + MAC_REG_MISCFFCTL); iowrite16(MISCFFCTL_WRITE, io_base + MAC_REG_MISCFFCTL);
} }
...@@ -869,12 +869,12 @@ void MACvSetKeyEntry(struct vnt_private *priv, unsigned short wKeyCtl, ...@@ -869,12 +869,12 @@ void MACvSetKeyEntry(struct vnt_private *priv, unsigned short wKeyCtl,
void MACvDisableKeyEntry(struct vnt_private *priv, unsigned int uEntryIdx) void MACvDisableKeyEntry(struct vnt_private *priv, unsigned int uEntryIdx)
{ {
void __iomem *io_base = priv->PortOffset; void __iomem *io_base = priv->PortOffset;
unsigned short wOffset; unsigned short offset;
wOffset = MISCFIFO_KEYETRY0; offset = MISCFIFO_KEYETRY0;
wOffset += (uEntryIdx * MISCFIFO_KEYENTRYSIZE); offset += (uEntryIdx * MISCFIFO_KEYENTRYSIZE);
iowrite16(wOffset, io_base + MAC_REG_MISCFFNDEX); iowrite16(offset, io_base + MAC_REG_MISCFFNDEX);
iowrite32(0, io_base + MAC_REG_MISCFFDATA); iowrite32(0, io_base + MAC_REG_MISCFFDATA);
iowrite16(MISCFFCTL_WRITE, io_base + MAC_REG_MISCFFCTL); iowrite16(MISCFFCTL_WRITE, io_base + MAC_REG_MISCFFCTL);
} }
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