Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mac80211: don't send null data packet when not associated

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.

Cc: stable@vger.kernel.org
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

+2
+2
net/mac80211/util.c
··· 1491 1491 list_for_each_entry(sdata, &local->interfaces, list) { 1492 1492 if (sdata->vif.type != NL80211_IFTYPE_STATION) 1493 1493 continue; 1494 + if (!sdata->u.mgd.associated) 1495 + continue; 1494 1496 1495 1497 ieee80211_send_nullfunc(local, sdata, 0); 1496 1498 }