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 <[email protected]>
---
drivers/net/wireless/ath9k/main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- wireless-testing.orig/drivers/net/wireless/ath9k/main.c 2009-01-07 10:39:55.000000000 +0200
+++ wireless-testing/drivers/net/wireless/ath9k/main.c 2009-01-07 13:08:10.000000000 +0200
@@ -815,7 +815,7 @@ static int ath_key_config(struct ath_sof
hk.kv_type = ATH9K_CIPHER_AES_CCM;
break;
default:
- return -EINVAL;
+ return -EOPNOTSUPP;
}
hk.kv_len = key->keylen;
@@ -849,7 +849,7 @@ static int ath_key_config(struct ath_sof
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)
--
--
Jouni Malinen PGP id EFC895FA