]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/2.6.36.2/mac80211-make-the-beacon-monitor-available-externally.patch
Fixes for 5.10
[thirdparty/kernel/stable-queue.git] / releases / 2.6.36.2 / mac80211-make-the-beacon-monitor-available-externally.patch
1 From d3a910a8e4e846b9a767d35483f4dc7c6de7af82 Mon Sep 17 00:00:00 2001
2 From: Luis R. Rodriguez <lrodriguez@atheros.com>
3 Date: Thu, 16 Sep 2010 15:12:32 -0400
4 Subject: mac80211: make the beacon monitor available externally
5
6 From: Luis R. Rodriguez <lrodriguez@atheros.com>
7
8 commit d3a910a8e4e846b9a767d35483f4dc7c6de7af82 upstream.
9
10 This will be used by other components next. The beacon
11 monitor was added as of 2.6.34 so these fixes are applicable
12 only to kernels >= 2.6.34.
13
14 Cc: Paul Stewart <pstew@google.com>
15 Cc: Amod Bodas <amod.bodas@atheros.com>
16 Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
17 Signed-off-by: John W. Linville <linville@tuxdriver.com>
18 Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
19
20 ---
21 net/mac80211/ieee80211_i.h | 1 +
22 net/mac80211/mlme.c | 8 ++++----
23 2 files changed, 5 insertions(+), 4 deletions(-)
24
25 --- a/net/mac80211/ieee80211_i.h
26 +++ b/net/mac80211/ieee80211_i.h
27 @@ -1003,6 +1003,7 @@ void ieee80211_sta_restart(struct ieee80
28 void ieee80211_sta_work(struct ieee80211_sub_if_data *sdata);
29 void ieee80211_sta_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata,
30 struct sk_buff *skb);
31 +void ieee80211_sta_reset_beacon_monitor(struct ieee80211_sub_if_data *sdata);
32 void ieee80211_sta_reset_conn_monitor(struct ieee80211_sub_if_data *sdata);
33
34 /* IBSS code */
35 --- a/net/mac80211/mlme.c
36 +++ b/net/mac80211/mlme.c
37 @@ -109,7 +109,7 @@ static void run_again(struct ieee80211_i
38 mod_timer(&ifmgd->timer, timeout);
39 }
40
41 -static void mod_beacon_timer(struct ieee80211_sub_if_data *sdata)
42 +void ieee80211_sta_reset_beacon_monitor(struct ieee80211_sub_if_data *sdata)
43 {
44 if (sdata->local->hw.flags & IEEE80211_HW_BEACON_FILTER)
45 return;
46 @@ -1367,7 +1367,7 @@ static bool ieee80211_assoc_success(stru
47 * Also start the timer that will detect beacon loss.
48 */
49 ieee80211_sta_rx_notify(sdata, (struct ieee80211_hdr *)mgmt);
50 - mod_beacon_timer(sdata);
51 + ieee80211_sta_reset_beacon_monitor(sdata);
52
53 return true;
54 }
55 @@ -1470,7 +1470,7 @@ static void ieee80211_rx_mgmt_probe_resp
56 * we have or will be receiving any beacons or data, so let's
57 * schedule the timers again, just in case.
58 */
59 - mod_beacon_timer(sdata);
60 + ieee80211_sta_reset_beacon_monitor(sdata);
61
62 mod_timer(&ifmgd->conn_mon_timer,
63 round_jiffies_up(jiffies +
64 @@ -1593,7 +1593,7 @@ static void ieee80211_rx_mgmt_beacon(str
65 * Push the beacon loss detection into the future since
66 * we are processing a beacon from the AP just now.
67 */
68 - mod_beacon_timer(sdata);
69 + ieee80211_sta_reset_beacon_monitor(sdata);
70
71 ncrc = crc32_be(0, (void *)&mgmt->u.beacon.beacon_int, 4);
72 ncrc = ieee802_11_parse_elems_crc(mgmt->u.beacon.variable,