Commit 86ea6167 authored by Tobin C. Harding's avatar Tobin C. Harding Committed by Greg Kroah-Hartman

staging: ks7010: fix spelling of Michael MIC

Driver mixes spelling michael and michel in symbol names and
comments. Michael here references the IEEE 802.11i Message Integrity
Code. It is incorrect to spell it michel and confusing having two
spellings for the same thing.

Change michel -> micheal in both symbol names and comments.
Signed-off-by: default avatarTobin C. Harding <me@tobin.cc>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 879a0418
...@@ -317,7 +317,7 @@ int hostif_data_indication_wpa(struct ks_wlan_private *priv, ...@@ -317,7 +317,7 @@ int hostif_data_indication_wpa(struct ks_wlan_private *priv,
char buf[128]; char buf[128];
unsigned long now; unsigned long now;
struct mic_failure_t *mic_failure; struct mic_failure_t *mic_failure;
struct michel_mic_t michel_mic; struct michael_mic_t michael_mic;
union iwreq_data wrqu; union iwreq_data wrqu;
unsigned int key_index = auth_type - 1; unsigned int key_index = auth_type - 1;
struct wpa_key_t *key = &priv->wpa.key[key_index]; struct wpa_key_t *key = &priv->wpa.key[key_index];
...@@ -347,14 +347,14 @@ int hostif_data_indication_wpa(struct ks_wlan_private *priv, ...@@ -347,14 +347,14 @@ int hostif_data_indication_wpa(struct ks_wlan_private *priv,
memcpy(&RecvMIC[0], (priv->rxp) + ((priv->rx_size) - 8), 8); memcpy(&RecvMIC[0], (priv->rxp) + ((priv->rx_size) - 8), 8);
priv->rx_size = priv->rx_size - 8; priv->rx_size = priv->rx_size - 8;
if (auth_type > 0 && auth_type < 4) { /* auth_type check */ if (auth_type > 0 && auth_type < 4) { /* auth_type check */
MichaelMICFunction(&michel_mic, MichaelMICFunction(&michael_mic,
(uint8_t *)key->rx_mic_key, (uint8_t *)key->rx_mic_key,
(uint8_t *)priv->rxp, (uint8_t *)priv->rxp,
(int)priv->rx_size, (int)priv->rx_size,
(uint8_t)0, /* priority */ (uint8_t)0, /* priority */
(uint8_t *)michel_mic.Result); (uint8_t *)michael_mic.Result);
} }
if (memcmp(michel_mic.Result, RecvMIC, 8)) { if (memcmp(michael_mic.Result, RecvMIC, 8)) {
now = jiffies; now = jiffies;
mic_failure = &priv->wpa.mic_failure; mic_failure = &priv->wpa.mic_failure;
/* MIC FAILURE */ /* MIC FAILURE */
...@@ -1120,7 +1120,7 @@ int hostif_data_request(struct ks_wlan_private *priv, struct sk_buff *packet) ...@@ -1120,7 +1120,7 @@ int hostif_data_request(struct ks_wlan_private *priv, struct sk_buff *packet)
int result = 0; int result = 0;
unsigned short eth_proto; unsigned short eth_proto;
struct ether_hdr *eth_hdr; struct ether_hdr *eth_hdr;
struct michel_mic_t michel_mic; struct michael_mic_t michael_mic;
unsigned short keyinfo = 0; unsigned short keyinfo = 0;
struct ieee802_1x_hdr *aa1x_hdr; struct ieee802_1x_hdr *aa1x_hdr;
struct wpa_eapol_key *eap_key; struct wpa_eapol_key *eap_key;
...@@ -1228,10 +1228,10 @@ int hostif_data_request(struct ks_wlan_private *priv, struct sk_buff *packet) ...@@ -1228,10 +1228,10 @@ int hostif_data_request(struct ks_wlan_private *priv, struct sk_buff *packet)
pp->auth_type = cpu_to_le16((uint16_t)TYPE_AUTH); /* no encryption */ pp->auth_type = cpu_to_le16((uint16_t)TYPE_AUTH); /* no encryption */
} else { } else {
if (priv->wpa.pairwise_suite == IW_AUTH_CIPHER_TKIP) { if (priv->wpa.pairwise_suite == IW_AUTH_CIPHER_TKIP) {
MichaelMICFunction(&michel_mic, (uint8_t *)priv->wpa.key[0].tx_mic_key, (uint8_t *)&pp->data[0], (int)packet_len, (uint8_t)0, /* priority */ MichaelMICFunction(&michael_mic, (uint8_t *)priv->wpa.key[0].tx_mic_key, (uint8_t *)&pp->data[0], (int)packet_len, (uint8_t)0, /* priority */
(uint8_t *)michel_mic. (uint8_t *)michael_mic.
Result); Result);
memcpy(p, michel_mic.Result, 8); memcpy(p, michael_mic.Result, 8);
length += 8; length += 8;
packet_len += 8; packet_len += 8;
p += 8; p += 8;
......
...@@ -38,7 +38,7 @@ do { \ ...@@ -38,7 +38,7 @@ do { \
} while (0) } while (0)
static static
void MichaelInitializeFunction(struct michel_mic_t *Mic, uint8_t *key) void MichaelInitializeFunction(struct michael_mic_t *Mic, uint8_t *key)
{ {
// Set the key // Set the key
Mic->K0 = getUInt32(key, 0); Mic->K0 = getUInt32(key, 0);
...@@ -61,7 +61,7 @@ do { \ ...@@ -61,7 +61,7 @@ do { \
} while (0) } while (0)
static static
void MichaelAppend(struct michel_mic_t *Mic, uint8_t *src, int nBytes) void MichaelAppend(struct michael_mic_t *Mic, uint8_t *src, int nBytes)
{ {
int addlen; int addlen;
...@@ -96,7 +96,7 @@ void MichaelAppend(struct michel_mic_t *Mic, uint8_t *src, int nBytes) ...@@ -96,7 +96,7 @@ void MichaelAppend(struct michel_mic_t *Mic, uint8_t *src, int nBytes)
} }
static static
void MichaelGetMIC(struct michel_mic_t *Mic, uint8_t *dst) void MichaelGetMIC(struct michael_mic_t *Mic, uint8_t *dst)
{ {
u8 *data = Mic->M; u8 *data = Mic->M;
...@@ -125,7 +125,7 @@ void MichaelGetMIC(struct michel_mic_t *Mic, uint8_t *dst) ...@@ -125,7 +125,7 @@ void MichaelGetMIC(struct michel_mic_t *Mic, uint8_t *dst)
MichaelClear(Mic); MichaelClear(Mic);
} }
void MichaelMICFunction(struct michel_mic_t *Mic, u8 *Key, void MichaelMICFunction(struct michael_mic_t *Mic, u8 *Key,
u8 *Data, int Len, u8 priority, u8 *Data, int Len, u8 priority,
u8 *Result) u8 *Result)
{ {
......
...@@ -9,8 +9,8 @@ ...@@ -9,8 +9,8 @@
* published by the Free Software Foundation. * published by the Free Software Foundation.
*/ */
/* MichelMIC routine define */ /* MichaelMIC routine define */
struct michel_mic_t { struct michael_mic_t {
u32 K0; // Key u32 K0; // Key
u32 K1; // Key u32 K1; // Key
u32 L; // Current state u32 L; // Current state
...@@ -20,6 +20,6 @@ struct michel_mic_t { ...@@ -20,6 +20,6 @@ struct michel_mic_t {
u8 Result[8]; u8 Result[8];
}; };
void MichaelMICFunction(struct michel_mic_t *Mic, u8 *Key, void MichaelMICFunction(struct michael_mic_t *Mic, u8 *Key,
u8 *Data, int Len, u8 priority, u8 *Data, int Len, u8 priority,
u8 *Result); u8 *Result);
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