From: Johannes Berg <johannes.berg@xxxxxxxxx> When shared key auth is requested, cfg80211 should verify that the device is capable of WEP crypto which is required. Signed-off-by: Johannes Berg <johannes.berg@xxxxxxxxx> --- net/wireless/nl80211.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) --- wireless-testing.orig/net/wireless/nl80211.c 2010-08-08 11:32:20.000000000 +0200 +++ wireless-testing/net/wireless/nl80211.c 2010-08-08 11:32:28.000000000 +0200 @@ -3604,6 +3604,21 @@ static int nl80211_authenticate(struct s if (err) goto unlock_rtnl; + if (key.idx >= 0) { + int i; + bool ok = false; + for (i = 0; i < rdev->wiphy.n_cipher_suites; i++) { + if (key.p.cipher == rdev->wiphy.cipher_suites[i]) { + ok = true; + break; + } + } + if (!ok) { + err = -EINVAL; + goto out; + } + } + if (!rdev->ops->auth) { err = -EOPNOTSUPP; goto out; -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html