Skip to content

Commit

Permalink
nl80211: Fix set_key regression with some drivers
Browse files Browse the repository at this point in the history
Commit dbd2fd6 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.

Cc: stable@kernel.org
Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Jouni Malinen authored and John W. Linville committed May 5, 2011
1 parent 270e58e commit 0e579d6
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions net/wireless/nl80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -1682,14 +1682,6 @@ static int nl80211_set_key(struct sk_buff *skb, struct genl_info *info)
if (err)
goto out;

if (!(rdev->wiphy.flags &
WIPHY_FLAG_SUPPORTS_SEPARATE_DEFAULT_KEYS)) {
if (!key.def_uni || !key.def_multi) {
err = -EOPNOTSUPP;
goto out;
}
}

err = rdev->ops->set_default_key(&rdev->wiphy, dev, key.idx,
key.def_uni, key.def_multi);

Expand Down

0 comments on commit 0e579d6

Please sign in to comment.