aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ar9170/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/ath/ar9170/main.c')
-rw-r--r--drivers/net/wireless/ath/ar9170/main.c31
1 files changed, 15 insertions, 16 deletions
diff --git a/drivers/net/wireless/ath/ar9170/main.c b/drivers/net/wireless/ath/ar9170/main.c
index debfb0fbc7c5..32bf79e6a320 100644
--- a/drivers/net/wireless/ath/ar9170/main.c
+++ b/drivers/net/wireless/ath/ar9170/main.c
@@ -1190,14 +1190,13 @@ static int ar9170_tx_prepare(struct ar9170 *ar, struct sk_buff *skb)
1190 if (info->control.hw_key) { 1190 if (info->control.hw_key) {
1191 icv = info->control.hw_key->icv_len; 1191 icv = info->control.hw_key->icv_len;
1192 1192
1193 switch (info->control.hw_key->alg) { 1193 switch (info->control.hw_key->cipher) {
1194 case ALG_WEP: 1194 case WLAN_CIPHER_SUITE_WEP40:
1195 case WLAN_CIPHER_SUITE_WEP104:
1196 case WLAN_CIPHER_SUITE_TKIP:
1195 keytype = AR9170_TX_MAC_ENCR_RC4; 1197 keytype = AR9170_TX_MAC_ENCR_RC4;
1196 break; 1198 break;
1197 case ALG_TKIP: 1199 case WLAN_CIPHER_SUITE_CCMP:
1198 keytype = AR9170_TX_MAC_ENCR_RC4;
1199 break;
1200 case ALG_CCMP:
1201 keytype = AR9170_TX_MAC_ENCR_AES; 1200 keytype = AR9170_TX_MAC_ENCR_AES;
1202 break; 1201 break;
1203 default: 1202 default:
@@ -1778,17 +1777,17 @@ static int ar9170_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
1778 if ((!ar->vif) || (ar->disable_offload)) 1777 if ((!ar->vif) || (ar->disable_offload))
1779 return -EOPNOTSUPP; 1778 return -EOPNOTSUPP;
1780 1779
1781 switch (key->alg) { 1780 switch (key->cipher) {
1782 case ALG_WEP: 1781 case WLAN_CIPHER_SUITE_WEP40:
1783 if (key->keylen == WLAN_KEY_LEN_WEP40) 1782 ktype = AR9170_ENC_ALG_WEP64;
1784 ktype = AR9170_ENC_ALG_WEP64; 1783 break;
1785 else 1784 case WLAN_CIPHER_SUITE_WEP104:
1786 ktype = AR9170_ENC_ALG_WEP128; 1785 ktype = AR9170_ENC_ALG_WEP128;
1787 break; 1786 break;
1788 case ALG_TKIP: 1787 case WLAN_CIPHER_SUITE_TKIP:
1789 ktype = AR9170_ENC_ALG_TKIP; 1788 ktype = AR9170_ENC_ALG_TKIP;
1790 break; 1789 break;
1791 case ALG_CCMP: 1790 case WLAN_CIPHER_SUITE_CCMP:
1792 ktype = AR9170_ENC_ALG_AESCCMP; 1791 ktype = AR9170_ENC_ALG_AESCCMP;
1793 break; 1792 break;
1794 default: 1793 default:
@@ -1827,7 +1826,7 @@ static int ar9170_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
1827 if (err) 1826 if (err)
1828 goto out; 1827 goto out;
1829 1828
1830 if (key->alg == ALG_TKIP) { 1829 if (key->cipher == WLAN_CIPHER_SUITE_TKIP) {
1831 err = ar9170_upload_key(ar, i, sta ? sta->addr : NULL, 1830 err = ar9170_upload_key(ar, i, sta ? sta->addr : NULL,
1832 ktype, 1, key->key + 16, 16); 1831 ktype, 1, key->key + 16, 16);
1833 if (err) 1832 if (err)
@@ -1864,7 +1863,7 @@ static int ar9170_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
1864 if (err) 1863 if (err)
1865 goto out; 1864 goto out;
1866 1865
1867 if (key->alg == ALG_TKIP) { 1866 if (key->cipher == WLAN_CIPHER_SUITE_TKIP) {
1868 err = ar9170_upload_key(ar, key->hw_key_idx, 1867 err = ar9170_upload_key(ar, key->hw_key_idx,
1869 NULL, 1868 NULL,
1870 AR9170_ENC_ALG_NONE, 1, 1869 AR9170_ENC_ALG_NONE, 1,