]> git.baikalelectronics.ru Git - kernel.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)
commitdf8bc11c6c1ce5402abd77637f275d2f24e98d8d
tree89ef58c65e22609f631771501e66070b6220de5a
parentf811844d60627c65c417efffa646790c94371c62
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