提交 ca470b29 编写于 作者: J Jouni Malinen 提交者: John W. Linville

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: NJouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 4375d083
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册