Commit 77b73282 authored by Ajay Singh's avatar Ajay Singh Committed by Greg Kroah-Hartman

staging: wilc1000: rename variables using camelCase in add_key()

This is a cleanup patch to avoid using camelCase for variable
names.
Changes fix "Avoid camelCase" issue reported by checkpatch.pl script.
Signed-off-by: default avatarAjay Singh <ajay.kathat@microchip.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e1375f1c
...@@ -855,14 +855,14 @@ static int add_key(struct wiphy *wiphy, struct net_device *netdev, u8 key_index, ...@@ -855,14 +855,14 @@ static int add_key(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
const u8 *mac_addr, struct key_params *params) 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; struct wilc_priv *priv;
const u8 *pu8RxMic = NULL; const u8 *rx_mic = NULL;
const u8 *pu8TxMic = NULL; const u8 *tx_mic = NULL;
u8 u8mode = NO_ENCRYPT; u8 u8mode = NO_ENCRYPT;
u8 u8gmode = NO_ENCRYPT; u8 u8gmode = NO_ENCRYPT;
u8 u8pmode = NO_ENCRYPT; u8 u8pmode = NO_ENCRYPT;
enum AUTHTYPE tenuAuth_type = ANY; enum AUTHTYPE auth_type = ANY;
struct wilc *wl; struct wilc *wl;
struct wilc_vif *vif; struct wilc_vif *vif;
...@@ -877,7 +877,7 @@ static int add_key(struct wiphy *wiphy, struct net_device *netdev, u8 key_index, ...@@ -877,7 +877,7 @@ static int add_key(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
priv->WILC_WFI_wep_key_len[key_index] = params->key_len; priv->WILC_WFI_wep_key_len[key_index] = params->key_len;
memcpy(priv->WILC_WFI_wep_key[key_index], params->key, 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) if (params->cipher == WLAN_CIPHER_SUITE_WEP40)
u8mode = ENCRYPT_ENABLED | WEP; u8mode = ENCRYPT_ENABLED | WEP;
...@@ -886,7 +886,7 @@ static int add_key(struct wiphy *wiphy, struct net_device *netdev, u8 key_index, ...@@ -886,7 +886,7 @@ static int add_key(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
wilc_add_wep_key_bss_ap(vif, params->key, wilc_add_wep_key_bss_ap(vif, params->key,
params->key_len, key_index, params->key_len, key_index,
u8mode, tenuAuth_type); u8mode, auth_type);
break; break;
} }
if (memcmp(params->key, priv->WILC_WFI_wep_key[key_index], params->key_len)) { if (memcmp(params->key, priv->WILC_WFI_wep_key[key_index], params->key_len)) {
...@@ -922,9 +922,9 @@ static int add_key(struct wiphy *wiphy, struct net_device *netdev, u8 key_index, ...@@ -922,9 +922,9 @@ static int add_key(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
priv->wilc_groupkey = u8gmode; priv->wilc_groupkey = u8gmode;
if (params->key_len > 16 && params->cipher == WLAN_CIPHER_SUITE_TKIP) { if (params->key_len > 16 && params->cipher == WLAN_CIPHER_SUITE_TKIP) {
pu8TxMic = params->key + 24; tx_mic = params->key + 24;
pu8RxMic = params->key + 16; rx_mic = params->key + 16;
KeyLen = params->key_len - 16; keylen = params->key_len - 16;
} }
kfree(priv->wilc_gtk[key_index]->key); kfree(priv->wilc_gtk[key_index]->key);
...@@ -941,10 +941,10 @@ static int add_key(struct wiphy *wiphy, struct net_device *netdev, u8 key_index, ...@@ -941,10 +941,10 @@ static int add_key(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
priv->wilc_gtk[key_index]->key_len = params->key_len; priv->wilc_gtk[key_index]->key_len = params->key_len;
priv->wilc_gtk[key_index]->seq_len = params->seq_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, key_index, params->seq_len,
params->seq, pu8RxMic, params->seq, rx_mic,
pu8TxMic, AP_MODE, u8gmode); tx_mic, AP_MODE, u8gmode);
} else { } else {
if (params->cipher == WLAN_CIPHER_SUITE_TKIP) if (params->cipher == WLAN_CIPHER_SUITE_TKIP)
...@@ -953,9 +953,9 @@ static int add_key(struct wiphy *wiphy, struct net_device *netdev, u8 key_index, ...@@ -953,9 +953,9 @@ static int add_key(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
u8pmode = priv->wilc_groupkey | AES; u8pmode = priv->wilc_groupkey | AES;
if (params->key_len > 16 && params->cipher == WLAN_CIPHER_SUITE_TKIP) { if (params->key_len > 16 && params->cipher == WLAN_CIPHER_SUITE_TKIP) {
pu8TxMic = params->key + 24; tx_mic = params->key + 24;
pu8RxMic = params->key + 16; rx_mic = params->key + 16;
KeyLen = params->key_len - 16; keylen = params->key_len - 16;
} }
kfree(priv->wilc_ptk[key_index]->key); kfree(priv->wilc_ptk[key_index]->key);
...@@ -976,8 +976,8 @@ static int add_key(struct wiphy *wiphy, struct net_device *netdev, u8 key_index, ...@@ -976,8 +976,8 @@ static int add_key(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
priv->wilc_ptk[key_index]->key_len = params->key_len; priv->wilc_ptk[key_index]->key_len = params->key_len;
priv->wilc_ptk[key_index]->seq_len = params->seq_len; priv->wilc_ptk[key_index]->seq_len = params->seq_len;
wilc_add_ptk(vif, params->key, KeyLen, wilc_add_ptk(vif, params->key, keylen,
mac_addr, pu8RxMic, pu8TxMic, mac_addr, rx_mic, tx_mic,
AP_MODE, u8pmode, key_index); AP_MODE, u8pmode, key_index);
} }
break; break;
...@@ -987,9 +987,9 @@ static int add_key(struct wiphy *wiphy, struct net_device *netdev, u8 key_index, ...@@ -987,9 +987,9 @@ static int add_key(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
u8mode = 0; u8mode = 0;
if (!pairwise) { if (!pairwise) {
if (params->key_len > 16 && params->cipher == WLAN_CIPHER_SUITE_TKIP) { if (params->key_len > 16 && params->cipher == WLAN_CIPHER_SUITE_TKIP) {
pu8RxMic = params->key + 24; rx_mic = params->key + 24;
pu8TxMic = params->key + 16; tx_mic = params->key + 16;
KeyLen = params->key_len - 16; keylen = params->key_len - 16;
} }
if (!g_gtk_keys_saved && netdev == wl->vif[0]->ndev) { if (!g_gtk_keys_saved && netdev == wl->vif[0]->ndev) {
...@@ -1013,16 +1013,16 @@ static int add_key(struct wiphy *wiphy, struct net_device *netdev, u8 key_index, ...@@ -1013,16 +1013,16 @@ static int add_key(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
g_gtk_keys_saved = true; 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, key_index, params->seq_len,
params->seq, pu8RxMic, params->seq, rx_mic,
pu8TxMic, STATION_MODE, tx_mic, STATION_MODE,
u8mode); u8mode);
} else { } else {
if (params->key_len > 16 && params->cipher == WLAN_CIPHER_SUITE_TKIP) { if (params->key_len > 16 && params->cipher == WLAN_CIPHER_SUITE_TKIP) {
pu8RxMic = params->key + 24; rx_mic = params->key + 24;
pu8TxMic = params->key + 16; tx_mic = params->key + 16;
KeyLen = params->key_len - 16; keylen = params->key_len - 16;
} }
if (!g_ptk_keys_saved && netdev == wl->vif[0]->ndev) { if (!g_ptk_keys_saved && netdev == wl->vif[0]->ndev) {
...@@ -1046,8 +1046,8 @@ static int add_key(struct wiphy *wiphy, struct net_device *netdev, u8 key_index, ...@@ -1046,8 +1046,8 @@ static int add_key(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
g_ptk_keys_saved = true; g_ptk_keys_saved = true;
} }
wilc_add_ptk(vif, params->key, KeyLen, wilc_add_ptk(vif, params->key, keylen,
mac_addr, pu8RxMic, pu8TxMic, mac_addr, rx_mic, tx_mic,
STATION_MODE, u8mode, key_index); STATION_MODE, u8mode, key_index);
} }
} }
......
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