]> git.karo-electronics.de Git - linux-beck.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)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 3 May 2013 17:44:56 +0000 (13:44 -0400)
commit4ef69d0394cba8caa9f75d3f2e53429bfb8b3045
tree89ef58c65e22609f631771501e66070b6220de5a
parenta8a48e60a468084ef6ec23c78e8903c9e0ba7a4c
ath9k: fix key allocation error handling for powersave keys

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.

Cc: stable@vger.kernel.org
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/main.c