Commit 977923b0 authored by Helmut Schaa's avatar Helmut Schaa Committed by John W. Linville
Browse files

mac80211: rename scan_state to next_scan_state



Rename scan_state to next_scan_state to better reflect
what it is used for.
Signed-off-by: default avatarHelmut Schaa <helmut.schaa@googlemail.com>
Acked-by: default avatarJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 142b9f50
...@@ -715,7 +715,7 @@ struct ieee80211_local { ...@@ -715,7 +715,7 @@ struct ieee80211_local {
int scan_channel_idx; int scan_channel_idx;
int scan_ies_len; int scan_ies_len;
enum mac80211_scan_state scan_state; enum mac80211_scan_state next_scan_state;
struct delayed_work scan_work; struct delayed_work scan_work;
struct ieee80211_sub_if_data *scan_sdata; struct ieee80211_sub_if_data *scan_sdata;
enum nl80211_channel_type oper_channel_type; enum nl80211_channel_type oper_channel_type;
......
...@@ -374,7 +374,7 @@ static int ieee80211_start_sw_scan(struct ieee80211_local *local) ...@@ -374,7 +374,7 @@ static int ieee80211_start_sw_scan(struct ieee80211_local *local)
} }
mutex_unlock(&local->iflist_mtx); mutex_unlock(&local->iflist_mtx);
local->scan_state = SCAN_DECISION; local->next_scan_state = SCAN_DECISION;
local->scan_channel_idx = 0; local->scan_channel_idx = 0;
spin_lock_bh(&local->filter_lock); spin_lock_bh(&local->filter_lock);
...@@ -505,15 +505,15 @@ static int ieee80211_scan_state_decision(struct ieee80211_local *local, ...@@ -505,15 +505,15 @@ static int ieee80211_scan_state_decision(struct ieee80211_local *local,
* next channel * next channel
*/ */
if (associated) if (associated)
local->scan_state = SCAN_ENTER_OPER_CHANNEL; local->next_scan_state = SCAN_ENTER_OPER_CHANNEL;
else else
local->scan_state = SCAN_SET_CHANNEL; local->next_scan_state = SCAN_SET_CHANNEL;
} else { } else {
/* /*
* we're on the operating channel currently, let's * we're on the operating channel currently, let's
* leave that channel now to scan another one * leave that channel now to scan another one
*/ */
local->scan_state = SCAN_LEAVE_OPER_CHANNEL; local->next_scan_state = SCAN_LEAVE_OPER_CHANNEL;
} }
*next_delay = 0; *next_delay = 0;
...@@ -545,7 +545,7 @@ static void ieee80211_scan_state_leave_oper_channel(struct ieee80211_local *loca ...@@ -545,7 +545,7 @@ static void ieee80211_scan_state_leave_oper_channel(struct ieee80211_local *loca
/* advance to the next channel to be scanned */ /* advance to the next channel to be scanned */
*next_delay = HZ / 10; *next_delay = HZ / 10;
local->scan_state = SCAN_SET_CHANNEL; local->next_scan_state = SCAN_SET_CHANNEL;
} }
static void ieee80211_scan_state_enter_oper_channel(struct ieee80211_local *local, static void ieee80211_scan_state_enter_oper_channel(struct ieee80211_local *local,
...@@ -577,7 +577,7 @@ static void ieee80211_scan_state_enter_oper_channel(struct ieee80211_local *loca ...@@ -577,7 +577,7 @@ static void ieee80211_scan_state_enter_oper_channel(struct ieee80211_local *loca
__clear_bit(SCAN_OFF_CHANNEL, &local->scanning); __clear_bit(SCAN_OFF_CHANNEL, &local->scanning);
*next_delay = HZ / 5; *next_delay = HZ / 5;
local->scan_state = SCAN_DECISION; local->next_scan_state = SCAN_DECISION;
} }
static void ieee80211_scan_state_set_channel(struct ieee80211_local *local, static void ieee80211_scan_state_set_channel(struct ieee80211_local *local,
...@@ -621,13 +621,13 @@ static void ieee80211_scan_state_set_channel(struct ieee80211_local *local, ...@@ -621,13 +621,13 @@ static void ieee80211_scan_state_set_channel(struct ieee80211_local *local,
if (chan->flags & IEEE80211_CHAN_PASSIVE_SCAN || if (chan->flags & IEEE80211_CHAN_PASSIVE_SCAN ||
!local->scan_req->n_ssids) { !local->scan_req->n_ssids) {
*next_delay = IEEE80211_PASSIVE_CHANNEL_TIME; *next_delay = IEEE80211_PASSIVE_CHANNEL_TIME;
local->scan_state = SCAN_DECISION; local->next_scan_state = SCAN_DECISION;
return; return;
} }
/* active scan, send probes */ /* active scan, send probes */
*next_delay = IEEE80211_PROBE_DELAY; *next_delay = IEEE80211_PROBE_DELAY;
local->scan_state = SCAN_SEND_PROBE; local->next_scan_state = SCAN_SEND_PROBE;
} }
static void ieee80211_scan_state_send_probe(struct ieee80211_local *local, static void ieee80211_scan_state_send_probe(struct ieee80211_local *local,
...@@ -648,7 +648,7 @@ static void ieee80211_scan_state_send_probe(struct ieee80211_local *local, ...@@ -648,7 +648,7 @@ static void ieee80211_scan_state_send_probe(struct ieee80211_local *local,
* on the channel. * on the channel.
*/ */
*next_delay = IEEE80211_CHANNEL_TIME; *next_delay = IEEE80211_CHANNEL_TIME;
local->scan_state = SCAN_DECISION; local->next_scan_state = SCAN_DECISION;
} }
void ieee80211_scan_work(struct work_struct *work) void ieee80211_scan_work(struct work_struct *work)
...@@ -693,7 +693,7 @@ void ieee80211_scan_work(struct work_struct *work) ...@@ -693,7 +693,7 @@ void ieee80211_scan_work(struct work_struct *work)
* without scheduling a new work * without scheduling a new work
*/ */
do { do {
switch (local->scan_state) { switch (local->next_scan_state) {
case SCAN_DECISION: case SCAN_DECISION:
if (ieee80211_scan_state_decision(local, &next_delay)) if (ieee80211_scan_state_decision(local, &next_delay))
return; return;
......
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