aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHelmut Schaa <helmut.schaa@googlemail.com>2009-07-23 06:14:20 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-07-27 15:24:17 -0400
commit977923b00c79185c11b4b47664f5ffa4c3820438 (patch)
treeb3b8c8be229f1ee6ed14dc2838b26a57b89af725
parent142b9f5074dc0d09dc0025739ad437723d7bf527 (diff)
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: Helmut Schaa <helmut.schaa@googlemail.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--net/mac80211/ieee80211_i.h2
-rw-r--r--net/mac80211/scan.c20
2 files changed, 11 insertions, 11 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index efda19ee0152..c6b25cb73284 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -715,7 +715,7 @@ struct ieee80211_local {
715 int scan_channel_idx; 715 int scan_channel_idx;
716 int scan_ies_len; 716 int scan_ies_len;
717 717
718 enum mac80211_scan_state scan_state; 718 enum mac80211_scan_state next_scan_state;
719 struct delayed_work scan_work; 719 struct delayed_work scan_work;
720 struct ieee80211_sub_if_data *scan_sdata; 720 struct ieee80211_sub_if_data *scan_sdata;
721 enum nl80211_channel_type oper_channel_type; 721 enum nl80211_channel_type oper_channel_type;
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c
index d56b9da8b28a..b376775e722f 100644
--- a/net/mac80211/scan.c
+++ b/net/mac80211/scan.c
@@ -374,7 +374,7 @@ static int ieee80211_start_sw_scan(struct ieee80211_local *local)
374 } 374 }
375 mutex_unlock(&local->iflist_mtx); 375 mutex_unlock(&local->iflist_mtx);
376 376
377 local->scan_state = SCAN_DECISION; 377 local->next_scan_state = SCAN_DECISION;
378 local->scan_channel_idx = 0; 378 local->scan_channel_idx = 0;
379 379
380 spin_lock_bh(&local->filter_lock); 380 spin_lock_bh(&local->filter_lock);
@@ -505,15 +505,15 @@ static int ieee80211_scan_state_decision(struct ieee80211_local *local,
505 * next channel 505 * next channel
506 */ 506 */
507 if (associated) 507 if (associated)
508 local->scan_state = SCAN_ENTER_OPER_CHANNEL; 508 local->next_scan_state = SCAN_ENTER_OPER_CHANNEL;
509 else 509 else
510 local->scan_state = SCAN_SET_CHANNEL; 510 local->next_scan_state = SCAN_SET_CHANNEL;
511 } else { 511 } else {
512 /* 512 /*
513 * we're on the operating channel currently, let's 513 * we're on the operating channel currently, let's
514 * leave that channel now to scan another one 514 * leave that channel now to scan another one
515 */ 515 */
516 local->scan_state = SCAN_LEAVE_OPER_CHANNEL; 516 local->next_scan_state = SCAN_LEAVE_OPER_CHANNEL;
517 } 517 }
518 518
519 *next_delay = 0; 519 *next_delay = 0;
@@ -545,7 +545,7 @@ static void ieee80211_scan_state_leave_oper_channel(struct ieee80211_local *loca
545 545
546 /* advance to the next channel to be scanned */ 546 /* advance to the next channel to be scanned */
547 *next_delay = HZ / 10; 547 *next_delay = HZ / 10;
548 local->scan_state = SCAN_SET_CHANNEL; 548 local->next_scan_state = SCAN_SET_CHANNEL;
549} 549}
550 550
551static void ieee80211_scan_state_enter_oper_channel(struct ieee80211_local *local, 551static 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 __clear_bit(SCAN_OFF_CHANNEL, &local->scanning); 577 __clear_bit(SCAN_OFF_CHANNEL, &local->scanning);
578 578
579 *next_delay = HZ / 5; 579 *next_delay = HZ / 5;
580 local->scan_state = SCAN_DECISION; 580 local->next_scan_state = SCAN_DECISION;
581} 581}
582 582
583static void ieee80211_scan_state_set_channel(struct ieee80211_local *local, 583static 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 if (chan->flags & IEEE80211_CHAN_PASSIVE_SCAN || 621 if (chan->flags & IEEE80211_CHAN_PASSIVE_SCAN ||
622 !local->scan_req->n_ssids) { 622 !local->scan_req->n_ssids) {
623 *next_delay = IEEE80211_PASSIVE_CHANNEL_TIME; 623 *next_delay = IEEE80211_PASSIVE_CHANNEL_TIME;
624 local->scan_state = SCAN_DECISION; 624 local->next_scan_state = SCAN_DECISION;
625 return; 625 return;
626 } 626 }
627 627
628 /* active scan, send probes */ 628 /* active scan, send probes */
629 *next_delay = IEEE80211_PROBE_DELAY; 629 *next_delay = IEEE80211_PROBE_DELAY;
630 local->scan_state = SCAN_SEND_PROBE; 630 local->next_scan_state = SCAN_SEND_PROBE;
631} 631}
632 632
633static void ieee80211_scan_state_send_probe(struct ieee80211_local *local, 633static 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 * on the channel. 648 * on the channel.
649 */ 649 */
650 *next_delay = IEEE80211_CHANNEL_TIME; 650 *next_delay = IEEE80211_CHANNEL_TIME;
651 local->scan_state = SCAN_DECISION; 651 local->next_scan_state = SCAN_DECISION;
652} 652}
653 653
654void ieee80211_scan_work(struct work_struct *work) 654void ieee80211_scan_work(struct work_struct *work)
@@ -693,7 +693,7 @@ void ieee80211_scan_work(struct work_struct *work)
693 * without scheduling a new work 693 * without scheduling a new work
694 */ 694 */
695 do { 695 do {
696 switch (local->scan_state) { 696 switch (local->next_scan_state) {
697 case SCAN_DECISION: 697 case SCAN_DECISION:
698 if (ieee80211_scan_state_decision(local, &next_delay)) 698 if (ieee80211_scan_state_decision(local, &next_delay))
699 return; 699 return;