nl80211: Fix set_key regression with some drivers
authorJouni Malinen <jouni.malinen@atheros.com>
Wed, 4 May 2011 05:45:16 +0000 (22:45 -0700)
committerSteve Conklin <sconklin@canonical.com>
Fri, 15 Jul 2011 17:20:53 +0000 (12:20 -0500)
commitfc20cc2bc849976a40d0e3687e1f9e2938bf6989
tree7b70dcd7d2ee3f51ce8e4417ec50aedcf0bc874f
parentd50a07956384f661b6aa3434070f0c63219f7fe0
nl80211: Fix set_key regression with some drivers

BugLink: http://bugs.launchpad.net/bugs/793702

commit 0e579d6a8f4aea346da818f13ee71401c125e639 upstream.

Commit dbd2fd656f2060abfd3a16257f8b51ec60f6d2ed added a mechanism for
user space to indicate whether a default key is being configured for
only unicast or only multicast frames instead of all frames. This
commit added a driver capability flag for indicating whether separate
default keys are supported and validation of the set_key command based
on that capability.

However, this single capability flag is not enough to cover possible
difference based on mode (AP/IBSS/STA) and the way this change was
introduced resulted in a regression with drivers that do not indicate
the new capability (i.e.., more or less any non-mac80211 driver using
cfg80211) when using a recent wpa_supplicant snapshot.

Fix the regression by removing the new check which is not strictly
speaking needed. The new separate default key functionality is needed
only for RSN IBSS which has a separate capability indication.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
net/wireless/nl80211.c