summaryrefslogtreecommitdiff
path: root/net/mac80211
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-11-08 14:06:28 +0100
committerXavier Boudet <x-boudet@ti.com>2012-11-27 09:35:25 +0100
commitaca1270d36403b3fad2503b47c3b45197a1c0a78 (patch)
tree5c8ff541693f89cbd048a158b8f0713802d8c71a /net/mac80211
parent9561183738a17a1aff13b93402dd4f47685fa2cd (diff)
mac80211: don't send null data packet when not associated
commit 20f544eea03db4b498942558b882d463ce575c3e upstream. On resume or firmware recovery, mac80211 sends a null data packet to see if the AP is still around and hasn't disconnected us. However, it always does this even if it wasn't even connected before, leading to a warning in the new channel context code. Fix this by checking that it's associated. Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/util.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 7015d8084560..4f9728132d56 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -1391,6 +1391,8 @@ int ieee80211_reconfig(struct ieee80211_local *local)
list_for_each_entry(sdata, &local->interfaces, list) {
if (sdata->vif.type != NL80211_IFTYPE_STATION)
continue;
+ if (!sdata->u.mgd.associated)
+ continue;
ieee80211_send_nullfunc(local, sdata, 0);
}