aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorLuis R. Rodriguez <lrodriguez@atheros.com>2010-09-16 15:12:32 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-09-16 15:46:16 -0400
commitd3a910a8e4e846b9a767d35483f4dc7c6de7af82 (patch)
tree14b51fdb68ef34a27be0a82ba9ce0c256e338f2c /net/mac80211
parent4730d5977f3e12b828d354f7752cffd94bdf39e5 (diff)
mac80211: make the beacon monitor available externally
This will be used by other components next. The beacon monitor was added as of 2.6.34 so these fixes are applicable only to kernels >= 2.6.34. Cc: stable@kernel.org Cc: Paul Stewart <pstew@google.com> Cc: Amod Bodas <amod.bodas@atheros.com> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/ieee80211_i.h1
-rw-r--r--net/mac80211/mlme.c8
2 files changed, 5 insertions, 4 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 737fd0f07524..9346a6b0f400 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -1041,6 +1041,7 @@ void ieee80211_sta_restart(struct ieee80211_sub_if_data *sdata);
1041void ieee80211_sta_work(struct ieee80211_sub_if_data *sdata); 1041void ieee80211_sta_work(struct ieee80211_sub_if_data *sdata);
1042void ieee80211_sta_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata, 1042void ieee80211_sta_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata,
1043 struct sk_buff *skb); 1043 struct sk_buff *skb);
1044void ieee80211_sta_reset_beacon_monitor(struct ieee80211_sub_if_data *sdata);
1044void ieee80211_sta_reset_conn_monitor(struct ieee80211_sub_if_data *sdata); 1045void ieee80211_sta_reset_conn_monitor(struct ieee80211_sub_if_data *sdata);
1045 1046
1046/* IBSS code */ 1047/* IBSS code */
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index d7915ab15a43..07d03e791bc0 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -115,7 +115,7 @@ static void run_again(struct ieee80211_if_managed *ifmgd,
115 mod_timer(&ifmgd->timer, timeout); 115 mod_timer(&ifmgd->timer, timeout);
116} 116}
117 117
118static void mod_beacon_timer(struct ieee80211_sub_if_data *sdata) 118void ieee80211_sta_reset_beacon_monitor(struct ieee80211_sub_if_data *sdata)
119{ 119{
120 if (sdata->local->hw.flags & IEEE80211_HW_BEACON_FILTER) 120 if (sdata->local->hw.flags & IEEE80211_HW_BEACON_FILTER)
121 return; 121 return;
@@ -1390,7 +1390,7 @@ static bool ieee80211_assoc_success(struct ieee80211_work *wk,
1390 * Also start the timer that will detect beacon loss. 1390 * Also start the timer that will detect beacon loss.
1391 */ 1391 */
1392 ieee80211_sta_rx_notify(sdata, (struct ieee80211_hdr *)mgmt); 1392 ieee80211_sta_rx_notify(sdata, (struct ieee80211_hdr *)mgmt);
1393 mod_beacon_timer(sdata); 1393 ieee80211_sta_reset_beacon_monitor(sdata);
1394 1394
1395 return true; 1395 return true;
1396} 1396}
@@ -1493,7 +1493,7 @@ static void ieee80211_rx_mgmt_probe_resp(struct ieee80211_sub_if_data *sdata,
1493 * we have or will be receiving any beacons or data, so let's 1493 * we have or will be receiving any beacons or data, so let's
1494 * schedule the timers again, just in case. 1494 * schedule the timers again, just in case.
1495 */ 1495 */
1496 mod_beacon_timer(sdata); 1496 ieee80211_sta_reset_beacon_monitor(sdata);
1497 1497
1498 mod_timer(&ifmgd->conn_mon_timer, 1498 mod_timer(&ifmgd->conn_mon_timer,
1499 round_jiffies_up(jiffies + 1499 round_jiffies_up(jiffies +
@@ -1619,7 +1619,7 @@ static void ieee80211_rx_mgmt_beacon(struct ieee80211_sub_if_data *sdata,
1619 * Push the beacon loss detection into the future since 1619 * Push the beacon loss detection into the future since
1620 * we are processing a beacon from the AP just now. 1620 * we are processing a beacon from the AP just now.
1621 */ 1621 */
1622 mod_beacon_timer(sdata); 1622 ieee80211_sta_reset_beacon_monitor(sdata);
1623 1623
1624 ncrc = crc32_be(0, (void *)&mgmt->u.beacon.beacon_int, 4); 1624 ncrc = crc32_be(0, (void *)&mgmt->u.beacon.beacon_int, 4);
1625 ncrc = ieee802_11_parse_elems_crc(mgmt->u.beacon.variable, 1625 ncrc = ieee802_11_parse_elems_crc(mgmt->u.beacon.variable,