Skip to content

Commit

Permalink
mac80211: monitor the connection
Browse files Browse the repository at this point in the history
With the recent MLME rework I accidentally removed the connection
monitoring code. In order to add it back, this patch will add new
code to monitor both for beacon loss and for the connection actually
working, with possibly separate triggers.

When no unicast frames have been received from the AP for (currently)
two seconds, we will send the AP a probe request. Also, when we don't
see beacons from the AP for two seconds, we do the same (but those
times need not be the same due to the way the code is now written).

Additionally, clean up the parameters to the ieee80211_set_disassoc()
function that I need here, those are all useless except sdata.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Johannes Berg authored and John W. Linville committed Jul 24, 2009
1 parent ca386f3 commit b291ba1
Show file tree
Hide file tree
Showing 3 changed files with 227 additions and 72 deletions.
20 changes: 12 additions & 8 deletions net/mac80211/ieee80211_i.h
Original file line number Diff line number Diff line change
Expand Up @@ -256,12 +256,13 @@ struct ieee80211_mgd_work {

/* flags used in struct ieee80211_if_managed.flags */
enum ieee80211_sta_flags {
IEEE80211_STA_PROBEREQ_POLL = BIT(3),
IEEE80211_STA_CONTROL_PORT = BIT(4),
IEEE80211_STA_WMM_ENABLED = BIT(5),
IEEE80211_STA_DISABLE_11N = BIT(6),
IEEE80211_STA_CSA_RECEIVED = BIT(7),
IEEE80211_STA_MFP_ENABLED = BIT(8),
IEEE80211_STA_BEACON_POLL = BIT(0),
IEEE80211_STA_CONNECTION_POLL = BIT(1),
IEEE80211_STA_CONTROL_PORT = BIT(2),
IEEE80211_STA_WMM_ENABLED = BIT(3),
IEEE80211_STA_DISABLE_11N = BIT(4),
IEEE80211_STA_CSA_RECEIVED = BIT(5),
IEEE80211_STA_MFP_ENABLED = BIT(6),
};

/* flags for MLME request */
Expand All @@ -271,11 +272,16 @@ enum ieee80211_sta_request {

struct ieee80211_if_managed {
struct timer_list timer;
struct timer_list conn_mon_timer;
struct timer_list bcn_mon_timer;
struct timer_list chswitch_timer;
struct work_struct work;
struct work_struct monitor_work;
struct work_struct chswitch_work;
struct work_struct beacon_loss_work;

unsigned long probe_timeout;

struct mutex mtx;
struct ieee80211_bss *associated;
struct list_head work_list;
Expand All @@ -292,8 +298,6 @@ struct ieee80211_if_managed {

unsigned long request;

unsigned long last_beacon;

unsigned int flags;

u32 beacon_crc;
Expand Down
Loading

0 comments on commit b291ba1

Please sign in to comment.