summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath9k/main.c
diff options
context:
space:
mode:
authorJouni Malinen2009-01-08 12:32:12 +0100
committerJohn W. Linville2009-01-29 22:00:09 +0100
commitca470b29027f093d8d63abc0fa401cf4f72e427b (patch)
tree58a416c9c90b26ee0fdee23d8a500f31db94d12f /drivers/net/wireless/ath9k/main.c
parentmac80211: 802.11w - Add driver capability flag for MFP (diff)
downloadkernel-qcow2-linux-ca470b29027f093d8d63abc0fa401cf4f72e427b.tar.gz
kernel-qcow2-linux-ca470b29027f093d8d63abc0fa401cf4f72e427b.tar.xz
kernel-qcow2-linux-ca470b29027f093d8d63abc0fa401cf4f72e427b.zip
ath9k: Fix set_key error codes
Return -EOPNOTSUPP if the algorithm is not supported and -ENOSPC if there is no room in the key cache. This avoids KERN_ERR printk in mac80211 for "errors" that are actually expected to happen in normal operating conditions. Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath9k/main.c')
-rw-r--r--drivers/net/wireless/ath9k/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath9k/main.c b/drivers/net/wireless/ath9k/main.c
index 5e9a3e19da40..fc4439f97506 100644
--- a/drivers/net/wireless/ath9k/main.c
+++ b/drivers/net/wireless/ath9k/main.c
@@ -817,7 +817,7 @@ static int ath_key_config(struct ath_softc *sc,
hk.kv_type = ATH9K_CIPHER_AES_CCM;
break;
default:
- return -EINVAL;
+ return -EOPNOTSUPP;
}
hk.kv_len = key->keylen;
@@ -851,7 +851,7 @@ static int ath_key_config(struct ath_softc *sc,
else
idx = ath_reserve_key_cache_slot(sc);
if (idx < 0)
- return -EIO; /* no free key cache entries */
+ return -ENOSPC; /* no free key cache entries */
}
if (key->alg == ALG_TKIP)