Skip to content

Commit

Permalink
mac80211: respond to beacon loss report only once
Browse files Browse the repository at this point in the history
The driver might keep reporting beacon loss until we
disassociate -- catch that and don't respond to any
subsequent events until the probe is either successful
or we disassociate.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Johannes Berg authored and John W. Linville committed May 13, 2009
1 parent f7eef35 commit 34bfc41
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions net/mac80211/mlme.c
Original file line number Diff line number Diff line change
Expand Up @@ -1182,6 +1182,17 @@ void ieee80211_beacon_loss_work(struct work_struct *work)
u.mgd.beacon_loss_work);
struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;

/*
* The driver has already reported this event and we have
* already sent a probe request. Maybe the AP died and the
* driver keeps reporting until we disassociate... We have
* to ignore that because otherwise we would continually
* reset the timer and never check whether we received a
* probe response!
*/
if (ifmgd->flags & IEEE80211_STA_PROBEREQ_POLL)
return;

#ifdef CONFIG_MAC80211_VERBOSE_DEBUG
if (net_ratelimit()) {
printk(KERN_DEBUG "%s: driver reports beacon loss from AP %pM "
Expand Down

0 comments on commit 34bfc41

Please sign in to comment.