]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ath9k: fix key allocation error handling for powersave keys
authorFelix Fietkau <nbd@openwrt.org>
Sat, 27 Apr 2013 09:47:01 +0000 (11:47 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 19 May 2013 17:04:41 +0000 (10:04 -0700)
commit61ed7336516e074d426f2f7c1e041846d7fa5c12
tree7eab524ff0c5a3ed4e1ce4963c03f37d432f90cb
parent7fb7465071b6f553c5c5cd8aca704cfc6896917c
ath9k: fix key allocation error handling for powersave keys

commit 4ef69d0394cba8caa9f75d3f2e53429bfb8b3045 upstream.

If no keycache slots are available, ath_key_config can return -ENOSPC.
If the key index is not checked for errors, it can lead to logspam that
looks like this: "ath: wiphy0: keyreset: keycache entry 228 out of range"
This can cause follow-up errors if the invalid keycache index gets
used for tx.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/ath/ath9k/main.c