summaryrefslogtreecommitdiffstats
path: root/net/mac80211/cfg.c
diff options
context:
space:
mode:
authorJohn W. Linville2013-01-28 19:54:03 +0100
committerJohn W. Linville2013-01-28 19:54:03 +0100
commit9ebea3829fac7505e0cd2642fbd13cfa9c038831 (patch)
treeed690568a27b7231b8a507e8ba07c1ae34868e5c /net/mac80211/cfg.c
parentath9k_hw: remove a useless WARN_ON (diff)
parentmwifiex: fix typo in PCIe adapter NULL check (diff)
downloadkernel-qcow2-linux-9ebea3829fac7505e0cd2642fbd13cfa9c038831.tar.gz
kernel-qcow2-linux-9ebea3829fac7505e0cd2642fbd13cfa9c038831.tar.xz
kernel-qcow2-linux-9ebea3829fac7505e0cd2642fbd13cfa9c038831.zip
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
Conflicts: drivers/net/wireless/ath/ath9k/main.c drivers/net/wireless/iwlwifi/dvm/tx.c
Diffstat (limited to 'net/mac80211/cfg.c')
-rw-r--r--net/mac80211/cfg.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 36aa65f495ff..661b878bd19c 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -164,7 +164,17 @@ static int ieee80211_add_key(struct wiphy *wiphy, struct net_device *dev,
sta = sta_info_get(sdata, mac_addr);
else
sta = sta_info_get_bss(sdata, mac_addr);
- if (!sta) {
+ /*
+ * The ASSOC test makes sure the driver is ready to
+ * receive the key. When wpa_supplicant has roamed
+ * using FT, it attempts to set the key before
+ * association has completed, this rejects that attempt
+ * so it will set the key again after assocation.
+ *
+ * TODO: accept the key if we have a station entry and
+ * add it to the device after the station.
+ */
+ if (!sta || !test_sta_flag(sta, WLAN_STA_ASSOC)) {
ieee80211_key_free(sdata->local, key);
err = -ENOENT;
goto out_unlock;