Commit d3a910a8 authored by Luis R. Rodriguez's avatar Luis R. Rodriguez Committed by John W. Linville

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: default avatarLuis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 4730d597
...@@ -1041,6 +1041,7 @@ void ieee80211_sta_restart(struct ieee80211_sub_if_data *sdata); ...@@ -1041,6 +1041,7 @@ void ieee80211_sta_restart(struct ieee80211_sub_if_data *sdata);
void ieee80211_sta_work(struct ieee80211_sub_if_data *sdata); void ieee80211_sta_work(struct ieee80211_sub_if_data *sdata);
void ieee80211_sta_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata, void ieee80211_sta_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata,
struct sk_buff *skb); struct sk_buff *skb);
void ieee80211_sta_reset_beacon_monitor(struct ieee80211_sub_if_data *sdata);
void ieee80211_sta_reset_conn_monitor(struct ieee80211_sub_if_data *sdata); void ieee80211_sta_reset_conn_monitor(struct ieee80211_sub_if_data *sdata);
/* IBSS code */ /* IBSS code */
......
...@@ -115,7 +115,7 @@ static void run_again(struct ieee80211_if_managed *ifmgd, ...@@ -115,7 +115,7 @@ static void run_again(struct ieee80211_if_managed *ifmgd,
mod_timer(&ifmgd->timer, timeout); mod_timer(&ifmgd->timer, timeout);
} }
static void mod_beacon_timer(struct ieee80211_sub_if_data *sdata) void ieee80211_sta_reset_beacon_monitor(struct ieee80211_sub_if_data *sdata)
{ {
if (sdata->local->hw.flags & IEEE80211_HW_BEACON_FILTER) if (sdata->local->hw.flags & IEEE80211_HW_BEACON_FILTER)
return; return;
...@@ -1390,7 +1390,7 @@ static bool ieee80211_assoc_success(struct ieee80211_work *wk, ...@@ -1390,7 +1390,7 @@ static bool ieee80211_assoc_success(struct ieee80211_work *wk,
* Also start the timer that will detect beacon loss. * Also start the timer that will detect beacon loss.
*/ */
ieee80211_sta_rx_notify(sdata, (struct ieee80211_hdr *)mgmt); ieee80211_sta_rx_notify(sdata, (struct ieee80211_hdr *)mgmt);
mod_beacon_timer(sdata); ieee80211_sta_reset_beacon_monitor(sdata);
return true; return true;
} }
...@@ -1493,7 +1493,7 @@ static void ieee80211_rx_mgmt_probe_resp(struct ieee80211_sub_if_data *sdata, ...@@ -1493,7 +1493,7 @@ static void ieee80211_rx_mgmt_probe_resp(struct ieee80211_sub_if_data *sdata,
* we have or will be receiving any beacons or data, so let's * we have or will be receiving any beacons or data, so let's
* schedule the timers again, just in case. * schedule the timers again, just in case.
*/ */
mod_beacon_timer(sdata); ieee80211_sta_reset_beacon_monitor(sdata);
mod_timer(&ifmgd->conn_mon_timer, mod_timer(&ifmgd->conn_mon_timer,
round_jiffies_up(jiffies + round_jiffies_up(jiffies +
...@@ -1619,7 +1619,7 @@ static void ieee80211_rx_mgmt_beacon(struct ieee80211_sub_if_data *sdata, ...@@ -1619,7 +1619,7 @@ static void ieee80211_rx_mgmt_beacon(struct ieee80211_sub_if_data *sdata,
* Push the beacon loss detection into the future since * Push the beacon loss detection into the future since
* we are processing a beacon from the AP just now. * we are processing a beacon from the AP just now.
*/ */
mod_beacon_timer(sdata); ieee80211_sta_reset_beacon_monitor(sdata);
ncrc = crc32_be(0, (void *)&mgmt->u.beacon.beacon_int, 4); ncrc = crc32_be(0, (void *)&mgmt->u.beacon.beacon_int, 4);
ncrc = ieee802_11_parse_elems_crc(mgmt->u.beacon.variable, ncrc = ieee802_11_parse_elems_crc(mgmt->u.beacon.variable,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment