diff options
| author | John W. Linville <linville@tuxdriver.com> | 2013-01-23 14:34:00 -0500 |
|---|---|---|
| committer | John W. Linville <linville@tuxdriver.com> | 2013-01-23 14:34:00 -0500 |
| commit | e91d1694d362f065c51eb07b46b19e8b33c92777 (patch) | |
| tree | 35d67945915b202026680a62438e07d3241ba6a2 /net/mac80211/cfg.c | |
| parent | 5d0feaff230c0abfe4a112e6f09f096ed99e0b2d (diff) | |
| parent | 83f0c6d1f502bd75bb4a9e31e8d64e59c6894ad1 (diff) | |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem
Diffstat (limited to 'net/mac80211/cfg.c')
| -rw-r--r-- | net/mac80211/cfg.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 47e0aca614b..516fbc96fef 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; |
