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@xxxxxxxxxxx> --- 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-08 13:03:42.000000000 +0200 +++ wireless-testing/drivers/net/wireless/ath9k/main.c 2009-01-08 13:08:51.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 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html