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

staging: wilc1000: remove inner block {} and resetting of mode variable

Cleanup fixes to remove the uncessary inner block { /* */ } and setting
of 'mode' variable.
Signed-off-by: default avatarAjay Singh <ajay.kathat@microchip.com>
Reviewed-by: default avatarClaudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7cec84fd
......@@ -1008,31 +1008,28 @@ static int add_key(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
break;
}
{
mode = 0;
if (!pairwise) {
if (params->key_len > 16 && params->cipher == WLAN_CIPHER_SUITE_TKIP) {
rx_mic = params->key + 24;
tx_mic = params->key + 16;
keylen = params->key_len - 16;
}
wilc_add_rx_gtk(vif, params->key, keylen,
key_index, params->seq_len,
params->seq, rx_mic,
tx_mic, STATION_MODE,
mode);
} else {
if (params->key_len > 16 && params->cipher == WLAN_CIPHER_SUITE_TKIP) {
rx_mic = params->key + 24;
tx_mic = params->key + 16;
keylen = params->key_len - 16;
}
if (!pairwise) {
if (params->key_len > 16 && params->cipher == WLAN_CIPHER_SUITE_TKIP) {
rx_mic = params->key + 24;
tx_mic = params->key + 16;
keylen = params->key_len - 16;
}
wilc_add_ptk(vif, params->key, keylen,
mac_addr, rx_mic, tx_mic,
STATION_MODE, mode, key_index);
wilc_add_rx_gtk(vif, params->key, keylen,
key_index, params->seq_len,
params->seq, rx_mic,
tx_mic, STATION_MODE,
mode);
} else {
if (params->key_len > 16 && params->cipher == WLAN_CIPHER_SUITE_TKIP) {
rx_mic = params->key + 24;
tx_mic = params->key + 16;
keylen = params->key_len - 16;
}
wilc_add_ptk(vif, params->key, keylen,
mac_addr, rx_mic, tx_mic,
STATION_MODE, mode, key_index);
}
break;
......
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