aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/ks7010
diff options
context:
space:
mode:
authorSergio Paracuellos <sergio.paracuellos@gmail.com>2018-03-28 17:24:21 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-03-29 11:49:11 +0200
commit9018154f1bac0a3c30ea9b174d5e7f5e4fd3570c (patch)
tree2769380347f5c15c73c6cafbaea9639e477cce6c /drivers/staging/ks7010
parentstaging: ks7010: replace macro MichaelClear with inline function (diff)
downloadlinux-dev-9018154f1bac0a3c30ea9b174d5e7f5e4fd3570c.tar.xz
linux-dev-9018154f1bac0a3c30ea9b174d5e7f5e4fd3570c.zip
staging: ks7010: avoid camel cases in MichaelGetMIC function
This commit avoid camel cases in MichaelGetMIC function and params renaming it to michael_get_mic. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/ks7010')
-rw-r--r--drivers/staging/ks7010/michael_mic.c27
1 files changed, 13 insertions, 14 deletions
diff --git a/drivers/staging/ks7010/michael_mic.c b/drivers/staging/ks7010/michael_mic.c
index af36b12dcf3b..82ac1229001b 100644
--- a/drivers/staging/ks7010/michael_mic.c
+++ b/drivers/staging/ks7010/michael_mic.c
@@ -91,34 +91,33 @@ static void michael_append(struct michael_mic_t *mic, uint8_t *src, int bytes)
}
}
-static
-void MichaelGetMIC(struct michael_mic_t *Mic, uint8_t *dst)
+static void michael_get_mic(struct michael_mic_t *mic, uint8_t *dst)
{
- u8 *data = Mic->m;
+ u8 *data = mic->m;
- switch (Mic->m_bytes) {
+ switch (mic->m_bytes) {
case 0:
- Mic->l ^= 0x5a;
+ mic->l ^= 0x5a;
break;
case 1:
- Mic->l ^= data[0] | 0x5a00;
+ mic->l ^= data[0] | 0x5a00;
break;
case 2:
- Mic->l ^= data[0] | (data[1] << 8) | 0x5a0000;
+ mic->l ^= data[0] | (data[1] << 8) | 0x5a0000;
break;
case 3:
- Mic->l ^= data[0] | (data[1] << 8) | (data[2] << 16) |
+ mic->l ^= data[0] | (data[1] << 8) | (data[2] << 16) |
0x5a000000;
break;
}
- MichaelBlockFunction(Mic->l, Mic->r);
- MichaelBlockFunction(Mic->l, Mic->r);
+ MichaelBlockFunction(mic->l, mic->r);
+ MichaelBlockFunction(mic->l, mic->r);
// The appendByte function has already computed the result.
- putUInt32(dst, 0, Mic->l);
- putUInt32(dst, 4, Mic->r);
+ putUInt32(dst, 0, mic->l);
+ putUInt32(dst, 4, mic->r);
// Reset to the empty message.
- michael_clear(Mic);
+ michael_clear(mic);
}
void michael_mic_function(struct michael_mic_t *mic, u8 *key,
@@ -139,5 +138,5 @@ void michael_mic_function(struct michael_mic_t *mic, u8 *key,
michael_append(mic, (uint8_t *)data, 12); /* |DA|SA| */
michael_append(mic, pad_data, 4); /* |Priority|0|0|0| */
michael_append(mic, (uint8_t *)(data + 12), len - 12); /* |Data| */
- MichaelGetMIC(mic, result);
+ michael_get_mic(mic, result);
}