diff options
author | Stanislaw Gruszka <sgruszka@redhat.com> | 2013-02-28 04:55:27 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-03-06 10:35:56 -0500 |
commit | 9b7d72c1041ec5b20b24af487a98f71d8ff1555e (patch) | |
tree | 129662526b17deaf0f4f34586c099528feaee8b8 /net/mac80211/mlme.c | |
parent | 12e7f517029dad819c45eca9ca01fdb9ba57616b (diff) |
mac80211: cleanup suspend/resume on managed mode
Remove not used any longer suspend/resume code.
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r-- | net/mac80211/mlme.c | 88 |
1 files changed, 2 insertions, 86 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 9784622cd3d1..fdc06e381c10 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -87,9 +87,6 @@ MODULE_PARM_DESC(probe_wait_ms, | |||
87 | */ | 87 | */ |
88 | #define IEEE80211_SIGNAL_AVE_MIN_COUNT 4 | 88 | #define IEEE80211_SIGNAL_AVE_MIN_COUNT 4 |
89 | 89 | ||
90 | #define TMR_RUNNING_TIMER 0 | ||
91 | #define TMR_RUNNING_CHANSW 1 | ||
92 | |||
93 | /* | 90 | /* |
94 | * All cfg80211 functions have to be called outside a locked | 91 | * All cfg80211 functions have to be called outside a locked |
95 | * section so that they can acquire a lock themselves... This | 92 | * section so that they can acquire a lock themselves... This |
@@ -1039,14 +1036,8 @@ static void ieee80211_chswitch_timer(unsigned long data) | |||
1039 | { | 1036 | { |
1040 | struct ieee80211_sub_if_data *sdata = | 1037 | struct ieee80211_sub_if_data *sdata = |
1041 | (struct ieee80211_sub_if_data *) data; | 1038 | (struct ieee80211_sub_if_data *) data; |
1042 | struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; | ||
1043 | 1039 | ||
1044 | if (sdata->local->quiescing) { | 1040 | ieee80211_queue_work(&sdata->local->hw, &sdata->u.mgd.chswitch_work); |
1045 | set_bit(TMR_RUNNING_CHANSW, &ifmgd->timers_running); | ||
1046 | return; | ||
1047 | } | ||
1048 | |||
1049 | ieee80211_queue_work(&sdata->local->hw, &ifmgd->chswitch_work); | ||
1050 | } | 1041 | } |
1051 | 1042 | ||
1052 | void | 1043 | void |
@@ -1833,8 +1824,6 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata, | |||
1833 | del_timer_sync(&sdata->u.mgd.timer); | 1824 | del_timer_sync(&sdata->u.mgd.timer); |
1834 | del_timer_sync(&sdata->u.mgd.chswitch_timer); | 1825 | del_timer_sync(&sdata->u.mgd.chswitch_timer); |
1835 | 1826 | ||
1836 | sdata->u.mgd.timers_running = 0; | ||
1837 | |||
1838 | sdata->vif.bss_conf.dtim_period = 0; | 1827 | sdata->vif.bss_conf.dtim_period = 0; |
1839 | 1828 | ||
1840 | ifmgd->flags = 0; | 1829 | ifmgd->flags = 0; |
@@ -3143,15 +3132,8 @@ static void ieee80211_sta_timer(unsigned long data) | |||
3143 | { | 3132 | { |
3144 | struct ieee80211_sub_if_data *sdata = | 3133 | struct ieee80211_sub_if_data *sdata = |
3145 | (struct ieee80211_sub_if_data *) data; | 3134 | (struct ieee80211_sub_if_data *) data; |
3146 | struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; | ||
3147 | struct ieee80211_local *local = sdata->local; | ||
3148 | |||
3149 | if (local->quiescing) { | ||
3150 | set_bit(TMR_RUNNING_TIMER, &ifmgd->timers_running); | ||
3151 | return; | ||
3152 | } | ||
3153 | 3135 | ||
3154 | ieee80211_queue_work(&local->hw, &sdata->work); | 3136 | ieee80211_queue_work(&sdata->local->hw, &sdata->work); |
3155 | } | 3137 | } |
3156 | 3138 | ||
3157 | static void ieee80211_sta_connection_lost(struct ieee80211_sub_if_data *sdata, | 3139 | static void ieee80211_sta_connection_lost(struct ieee80211_sub_if_data *sdata, |
@@ -3503,72 +3485,6 @@ static void ieee80211_restart_sta_timer(struct ieee80211_sub_if_data *sdata) | |||
3503 | } | 3485 | } |
3504 | } | 3486 | } |
3505 | 3487 | ||
3506 | #ifdef CONFIG_PM | ||
3507 | void ieee80211_sta_quiesce(struct ieee80211_sub_if_data *sdata) | ||
3508 | { | ||
3509 | struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; | ||
3510 | |||
3511 | /* | ||
3512 | * Stop timers before deleting work items, as timers | ||
3513 | * could race and re-add the work-items. They will be | ||
3514 | * re-established on connection. | ||
3515 | */ | ||
3516 | del_timer_sync(&ifmgd->conn_mon_timer); | ||
3517 | del_timer_sync(&ifmgd->bcn_mon_timer); | ||
3518 | |||
3519 | /* | ||
3520 | * we need to use atomic bitops for the running bits | ||
3521 | * only because both timers might fire at the same | ||
3522 | * time -- the code here is properly synchronised. | ||
3523 | */ | ||
3524 | |||
3525 | cancel_work_sync(&ifmgd->request_smps_work); | ||
3526 | |||
3527 | cancel_work_sync(&ifmgd->monitor_work); | ||
3528 | cancel_work_sync(&ifmgd->beacon_connection_loss_work); | ||
3529 | cancel_work_sync(&ifmgd->csa_connection_drop_work); | ||
3530 | if (del_timer_sync(&ifmgd->timer)) | ||
3531 | set_bit(TMR_RUNNING_TIMER, &ifmgd->timers_running); | ||
3532 | |||
3533 | if (del_timer_sync(&ifmgd->chswitch_timer)) | ||
3534 | set_bit(TMR_RUNNING_CHANSW, &ifmgd->timers_running); | ||
3535 | cancel_work_sync(&ifmgd->chswitch_work); | ||
3536 | } | ||
3537 | |||
3538 | void ieee80211_sta_restart(struct ieee80211_sub_if_data *sdata) | ||
3539 | { | ||
3540 | struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; | ||
3541 | |||
3542 | mutex_lock(&ifmgd->mtx); | ||
3543 | if (!ifmgd->associated) { | ||
3544 | mutex_unlock(&ifmgd->mtx); | ||
3545 | return; | ||
3546 | } | ||
3547 | |||
3548 | if (sdata->flags & IEEE80211_SDATA_DISCONNECT_RESUME) { | ||
3549 | sdata->flags &= ~IEEE80211_SDATA_DISCONNECT_RESUME; | ||
3550 | mlme_dbg(sdata, "driver requested disconnect after resume\n"); | ||
3551 | ieee80211_sta_connection_lost(sdata, | ||
3552 | ifmgd->associated->bssid, | ||
3553 | WLAN_REASON_UNSPECIFIED, | ||
3554 | true); | ||
3555 | mutex_unlock(&ifmgd->mtx); | ||
3556 | return; | ||
3557 | } | ||
3558 | mutex_unlock(&ifmgd->mtx); | ||
3559 | |||
3560 | if (test_and_clear_bit(TMR_RUNNING_TIMER, &ifmgd->timers_running)) | ||
3561 | add_timer(&ifmgd->timer); | ||
3562 | if (test_and_clear_bit(TMR_RUNNING_CHANSW, &ifmgd->timers_running)) | ||
3563 | add_timer(&ifmgd->chswitch_timer); | ||
3564 | ieee80211_sta_reset_beacon_monitor(sdata); | ||
3565 | |||
3566 | mutex_lock(&sdata->local->mtx); | ||
3567 | ieee80211_restart_sta_timer(sdata); | ||
3568 | mutex_unlock(&sdata->local->mtx); | ||
3569 | } | ||
3570 | #endif | ||
3571 | |||
3572 | /* interface setup */ | 3488 | /* interface setup */ |
3573 | void ieee80211_sta_setup_sdata(struct ieee80211_sub_if_data *sdata) | 3489 | void ieee80211_sta_setup_sdata(struct ieee80211_sub_if_data *sdata) |
3574 | { | 3490 | { |