Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: ks7010: avoid camel cases in MichaelMICFunction

This commit replace camel cases for name and params used in
MichaelMICFunction. This improves a bit readability.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Sergio Paracuellos and committed by
Greg Kroah-Hartman
c9be5632 f47ecc0c

+21 -23
+12 -12
drivers/staging/ks7010/ks_hostif.c
··· 341 341 memcpy(&recv_mic[0], (priv->rxp) + ((priv->rx_size) - 8), 8); 342 342 priv->rx_size = priv->rx_size - 8; 343 343 if (auth_type > 0 && auth_type < 4) { /* auth_type check */ 344 - MichaelMICFunction(&michael_mic, 345 - (uint8_t *)key->rx_mic_key, 346 - (uint8_t *)priv->rxp, 347 - (int)priv->rx_size, 348 - (uint8_t)0, /* priority */ 349 - (uint8_t *)michael_mic.result); 344 + michael_mic_function(&michael_mic, 345 + (uint8_t *)key->rx_mic_key, 346 + (uint8_t *)priv->rxp, 347 + (int)priv->rx_size, 348 + (uint8_t)0, /* priority */ 349 + (uint8_t *)michael_mic.result); 350 350 } 351 351 if (memcmp(michael_mic.result, recv_mic, 8) != 0) { 352 352 now = jiffies; ··· 1172 1172 pp->auth_type = cpu_to_le16((uint16_t)TYPE_AUTH); 1173 1173 } else { 1174 1174 if (priv->wpa.pairwise_suite == IW_AUTH_CIPHER_TKIP) { 1175 - MichaelMICFunction(&michael_mic, 1176 - (uint8_t *)priv->wpa.key[0].tx_mic_key, 1177 - (uint8_t *)&pp->data[0], 1178 - (int)skb_len, 1179 - (uint8_t)0, /* priority */ 1180 - (uint8_t *)michael_mic.result); 1175 + michael_mic_function(&michael_mic, 1176 + (uint8_t *)priv->wpa.key[0].tx_mic_key, 1177 + (uint8_t *)&pp->data[0], 1178 + (int)skb_len, 1179 + (uint8_t)0, /* priority */ 1180 + (uint8_t *)michael_mic.result); 1181 1181 memcpy(p, michael_mic.result, 8); 1182 1182 length += 8; 1183 1183 skb_len += 8;
+7 -8
drivers/staging/ks7010/michael_mic.c
··· 123 123 MichaelClear(Mic); 124 124 } 125 125 126 - void MichaelMICFunction(struct michael_mic_t *Mic, u8 *Key, 127 - u8 *Data, int Len, u8 priority, 128 - u8 *Result) 126 + void michael_mic_function(struct michael_mic_t *mic, u8 *key, 127 + u8 *data, int len, u8 priority, u8 *result) 129 128 { 130 129 u8 pad_data[4] = { priority, 0, 0, 0 }; 131 130 // Compute the MIC value ··· 137 138 * |DA|SA|Priority|0 |Data|M0|M1|M2|M3|M4|M5|M6|M7| 138 139 * +--+--+--------+--+----+--+--+--+--+--+--+--+--+ 139 140 */ 140 - MichaelInitializeFunction(Mic, Key); 141 - MichaelAppend(Mic, (uint8_t *)Data, 12); /* |DA|SA| */ 142 - MichaelAppend(Mic, pad_data, 4); /* |Priority|0|0|0| */ 143 - MichaelAppend(Mic, (uint8_t *)(Data + 12), Len - 12); /* |Data| */ 144 - MichaelGetMIC(Mic, Result); 141 + MichaelInitializeFunction(mic, key); 142 + MichaelAppend(mic, (uint8_t *)data, 12); /* |DA|SA| */ 143 + MichaelAppend(mic, pad_data, 4); /* |Priority|0|0|0| */ 144 + MichaelAppend(mic, (uint8_t *)(data + 12), len - 12); /* |Data| */ 145 + MichaelGetMIC(mic, result); 145 146 }
+2 -3
drivers/staging/ks7010/michael_mic.h
··· 20 20 u8 result[8]; 21 21 }; 22 22 23 - void MichaelMICFunction(struct michael_mic_t *Mic, u8 *Key, 24 - u8 *Data, int Len, u8 priority, 25 - u8 *Result); 23 + void michael_mic_function(struct michael_mic_t *mic, u8 *key, 24 + u8 *data, int len, u8 priority, u8 *result);