const u8 *mac_addr, struct key_params *params)
{
- s32 ret = 0, KeyLen = params->key_len;
+ s32 ret = 0, keylen = params->key_len;
struct wilc_priv *priv;
- const u8 *pu8RxMic = NULL;
- const u8 *pu8TxMic = NULL;
+ const u8 *rx_mic = NULL;
+ const u8 *tx_mic = NULL;
u8 u8mode = NO_ENCRYPT;
u8 u8gmode = NO_ENCRYPT;
u8 u8pmode = NO_ENCRYPT;
- enum AUTHTYPE tenuAuth_type = ANY;
+ enum AUTHTYPE auth_type = ANY;
struct wilc *wl;
struct wilc_vif *vif;
priv->WILC_WFI_wep_key_len[key_index] = params->key_len;
memcpy(priv->WILC_WFI_wep_key[key_index], params->key, params->key_len);
- tenuAuth_type = OPEN_SYSTEM;
+ auth_type = OPEN_SYSTEM;
if (params->cipher == WLAN_CIPHER_SUITE_WEP40)
u8mode = ENCRYPT_ENABLED | WEP;
wilc_add_wep_key_bss_ap(vif, params->key,
params->key_len, key_index,
- u8mode, tenuAuth_type);
+ u8mode, auth_type);
break;
}
if (memcmp(params->key, priv->WILC_WFI_wep_key[key_index], params->key_len)) {
priv->wilc_groupkey = u8gmode;
if (params->key_len > 16 && params->cipher == WLAN_CIPHER_SUITE_TKIP) {
- pu8TxMic = params->key + 24;
- pu8RxMic = params->key + 16;
- KeyLen = params->key_len - 16;
+ tx_mic = params->key + 24;
+ rx_mic = params->key + 16;
+ keylen = params->key_len - 16;
}
kfree(priv->wilc_gtk[key_index]->key);
priv->wilc_gtk[key_index]->key_len = params->key_len;
priv->wilc_gtk[key_index]->seq_len = params->seq_len;
- wilc_add_rx_gtk(vif, params->key, KeyLen,
+ wilc_add_rx_gtk(vif, params->key, keylen,
key_index, params->seq_len,
- params->seq, pu8RxMic,
- pu8TxMic, AP_MODE, u8gmode);
+ params->seq, rx_mic,
+ tx_mic, AP_MODE, u8gmode);
} else {
if (params->cipher == WLAN_CIPHER_SUITE_TKIP)
u8pmode = priv->wilc_groupkey | AES;
if (params->key_len > 16 && params->cipher == WLAN_CIPHER_SUITE_TKIP) {
- pu8TxMic = params->key + 24;
- pu8RxMic = params->key + 16;
- KeyLen = params->key_len - 16;
+ tx_mic = params->key + 24;
+ rx_mic = params->key + 16;
+ keylen = params->key_len - 16;
}
kfree(priv->wilc_ptk[key_index]->key);
priv->wilc_ptk[key_index]->key_len = params->key_len;
priv->wilc_ptk[key_index]->seq_len = params->seq_len;
- wilc_add_ptk(vif, params->key, KeyLen,
- mac_addr, pu8RxMic, pu8TxMic,
+ wilc_add_ptk(vif, params->key, keylen,
+ mac_addr, rx_mic, tx_mic,
AP_MODE, u8pmode, key_index);
}
break;
u8mode = 0;
if (!pairwise) {
if (params->key_len > 16 && params->cipher == WLAN_CIPHER_SUITE_TKIP) {
- pu8RxMic = params->key + 24;
- pu8TxMic = params->key + 16;
- KeyLen = params->key_len - 16;
+ rx_mic = params->key + 24;
+ tx_mic = params->key + 16;
+ keylen = params->key_len - 16;
}
if (!g_gtk_keys_saved && netdev == wl->vif[0]->ndev) {
g_gtk_keys_saved = true;
}
- wilc_add_rx_gtk(vif, params->key, KeyLen,
+ wilc_add_rx_gtk(vif, params->key, keylen,
key_index, params->seq_len,
- params->seq, pu8RxMic,
- pu8TxMic, STATION_MODE,
+ params->seq, rx_mic,
+ tx_mic, STATION_MODE,
u8mode);
} else {
if (params->key_len > 16 && params->cipher == WLAN_CIPHER_SUITE_TKIP) {
- pu8RxMic = params->key + 24;
- pu8TxMic = params->key + 16;
- KeyLen = params->key_len - 16;
+ rx_mic = params->key + 24;
+ tx_mic = params->key + 16;
+ keylen = params->key_len - 16;
}
if (!g_ptk_keys_saved && netdev == wl->vif[0]->ndev) {
g_ptk_keys_saved = true;
}
- wilc_add_ptk(vif, params->key, KeyLen,
- mac_addr, pu8RxMic, pu8TxMic,
+ wilc_add_ptk(vif, params->key, keylen,
+ mac_addr, rx_mic, tx_mic,
STATION_MODE, u8mode, key_index);
}
}