]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
mac80211: be more careful about sending beacon-loss-events
authorBen Greear <greearb@candelatech.com>
Mon, 25 Mar 2013 18:19:35 +0000 (11:19 -0700)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 8 Apr 2013 07:16:55 +0000 (09:16 +0200)
I don't think we should send the events unless it was actually
a beacon that was lost...not just any probe of an AP.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/mlme.c

index 237e2ef42ba905b4f933e33d9ba3d2ad6fc5de93..e12fedcfa98870929f5ed779e83c933ff3d1d9f0 100644 (file)
@@ -1988,13 +1988,15 @@ static void ieee80211_mgd_probe_ap(struct ieee80211_sub_if_data *sdata,
                goto out;
        }
 
-       if (beacon)
+       if (beacon) {
                mlme_dbg_ratelimited(sdata,
                                     "detected beacon loss from AP (missed %d beacons) - probing\n",
                                     beacon_loss_count);
 
-       ieee80211_cqm_rssi_notify(&sdata->vif,
-               NL80211_CQM_RSSI_BEACON_LOSS_EVENT, GFP_KERNEL);
+               ieee80211_cqm_rssi_notify(&sdata->vif,
+                                         NL80211_CQM_RSSI_BEACON_LOSS_EVENT,
+                                         GFP_KERNEL);
+       }
 
        /*
         * The driver/our work has already reported this event or the