aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx/wl1271_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/wl12xx/wl1271_main.c')
-rw-r--r--drivers/net/wireless/wl12xx/wl1271_main.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_main.c b/drivers/net/wireless/wl12xx/wl1271_main.c
index 9d68f0012f05..30194c0f36a9 100644
--- a/drivers/net/wireless/wl12xx/wl1271_main.c
+++ b/drivers/net/wireless/wl12xx/wl1271_main.c
@@ -1439,7 +1439,7 @@ static int wl1271_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
1439 wl1271_debug(DEBUG_CRYPT, "CMD: 0x%x", cmd); 1439 wl1271_debug(DEBUG_CRYPT, "CMD: 0x%x", cmd);
1440 wl1271_dump(DEBUG_CRYPT, "ADDR: ", addr, ETH_ALEN); 1440 wl1271_dump(DEBUG_CRYPT, "ADDR: ", addr, ETH_ALEN);
1441 wl1271_debug(DEBUG_CRYPT, "Key: algo:0x%x, id:%d, len:%d flags 0x%x", 1441 wl1271_debug(DEBUG_CRYPT, "Key: algo:0x%x, id:%d, len:%d flags 0x%x",
1442 key_conf->alg, key_conf->keyidx, 1442 key_conf->cipher, key_conf->keyidx,
1443 key_conf->keylen, key_conf->flags); 1443 key_conf->keylen, key_conf->flags);
1444 wl1271_dump(DEBUG_CRYPT, "KEY: ", key_conf->key, key_conf->keylen); 1444 wl1271_dump(DEBUG_CRYPT, "KEY: ", key_conf->key, key_conf->keylen);
1445 1445
@@ -1455,20 +1455,21 @@ static int wl1271_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
1455 if (ret < 0) 1455 if (ret < 0)
1456 goto out_unlock; 1456 goto out_unlock;
1457 1457
1458 switch (key_conf->alg) { 1458 switch (key_conf->cipher) {
1459 case ALG_WEP: 1459 case WLAN_CIPHER_SUITE_WEP40:
1460 case WLAN_CIPHER_SUITE_WEP104:
1460 key_type = KEY_WEP; 1461 key_type = KEY_WEP;
1461 1462
1462 key_conf->hw_key_idx = key_conf->keyidx; 1463 key_conf->hw_key_idx = key_conf->keyidx;
1463 break; 1464 break;
1464 case ALG_TKIP: 1465 case WLAN_CIPHER_SUITE_TKIP:
1465 key_type = KEY_TKIP; 1466 key_type = KEY_TKIP;
1466 1467
1467 key_conf->hw_key_idx = key_conf->keyidx; 1468 key_conf->hw_key_idx = key_conf->keyidx;
1468 tx_seq_32 = WL1271_TX_SECURITY_HI32(wl->tx_security_seq); 1469 tx_seq_32 = WL1271_TX_SECURITY_HI32(wl->tx_security_seq);
1469 tx_seq_16 = WL1271_TX_SECURITY_LO16(wl->tx_security_seq); 1470 tx_seq_16 = WL1271_TX_SECURITY_LO16(wl->tx_security_seq);
1470 break; 1471 break;
1471 case ALG_CCMP: 1472 case WLAN_CIPHER_SUITE_CCMP:
1472 key_type = KEY_AES; 1473 key_type = KEY_AES;
1473 1474
1474 key_conf->flags |= IEEE80211_KEY_FLAG_GENERATE_IV; 1475 key_conf->flags |= IEEE80211_KEY_FLAG_GENERATE_IV;
@@ -1476,7 +1477,7 @@ static int wl1271_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
1476 tx_seq_16 = WL1271_TX_SECURITY_LO16(wl->tx_security_seq); 1477 tx_seq_16 = WL1271_TX_SECURITY_LO16(wl->tx_security_seq);
1477 break; 1478 break;
1478 default: 1479 default:
1479 wl1271_error("Unknown key algo 0x%x", key_conf->alg); 1480 wl1271_error("Unknown key algo 0x%x", key_conf->cipher);
1480 1481
1481 ret = -EOPNOTSUPP; 1482 ret = -EOPNOTSUPP;
1482 goto out_sleep; 1483 goto out_sleep;