]>
Commit | Line | Data |
---|---|---|
ad522180 GKH |
1 | From be099e82e9cf6d5d65d044e9ef6fc8bee3c7a113 Mon Sep 17 00:00:00 2001 |
2 | From: Luis R. Rodriguez <lrodriguez@atheros.com> | |
3 | Date: Thu, 16 Sep 2010 15:12:29 -0400 | |
4 | Subject: mac80211: add helper for reseting the connection monitor | |
5 | ||
6 | From: Luis R. Rodriguez <lrodriguez@atheros.com> | |
7 | ||
8 | commit be099e82e9cf6d5d65d044e9ef6fc8bee3c7a113 upstream. | |
9 | ||
10 | This will be used in another place later. The connection | |
11 | monitor was added as of 2.6.35 so these fixes will be | |
12 | applicable to >= 2.6.35. | |
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 | 15 ++++++++++----- | |
23 | 2 files changed, 11 insertions(+), 5 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_conn_monitor(struct ieee80211_sub_if_data *sdata); | |
32 | ||
33 | /* IBSS code */ | |
34 | void ieee80211_ibss_notify_scan_completed(struct ieee80211_local *local); | |
35 | --- a/net/mac80211/mlme.c | |
36 | +++ b/net/mac80211/mlme.c | |
37 | @@ -118,6 +118,15 @@ static void mod_beacon_timer(struct ieee | |
38 | round_jiffies_up(jiffies + IEEE80211_BEACON_LOSS_TIME)); | |
39 | } | |
40 | ||
41 | +void ieee80211_sta_reset_conn_monitor(struct ieee80211_sub_if_data *sdata) | |
42 | +{ | |
43 | + if (sdata->local->hw.flags & IEEE80211_HW_CONNECTION_MONITOR) | |
44 | + return; | |
45 | + | |
46 | + mod_timer(&sdata->u.mgd.conn_mon_timer, | |
47 | + round_jiffies_up(jiffies + IEEE80211_CONNECTION_IDLE_TIME)); | |
48 | +} | |
49 | + | |
50 | static int ecw2cw(int ecw) | |
51 | { | |
52 | return (1 << ecw) - 1; | |
53 | @@ -1006,11 +1015,7 @@ void ieee80211_sta_rx_notify(struct ieee | |
54 | if (is_multicast_ether_addr(hdr->addr1)) | |
55 | return; | |
56 | ||
57 | - if (sdata->local->hw.flags & IEEE80211_HW_CONNECTION_MONITOR) | |
58 | - return; | |
59 | - | |
60 | - mod_timer(&sdata->u.mgd.conn_mon_timer, | |
61 | - round_jiffies_up(jiffies + IEEE80211_CONNECTION_IDLE_TIME)); | |
62 | + ieee80211_sta_reset_conn_monitor(sdata); | |
63 | } | |
64 | ||
65 | static void ieee80211_mgd_probe_ap_send(struct ieee80211_sub_if_data *sdata) |