diff options
author | Stanislaw Gruszka <sgruszka@redhat.com> | 2012-02-03 11:31:55 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-02-06 14:56:09 -0500 |
commit | dee9a09eb34a272494a315fe0c19e49b6375a000 (patch) | |
tree | 98f5eb51aa843b5a4d15e56c93f9836cf20301b0 /drivers/net/wireless/iwlegacy | |
parent | eb123af3d1e038c486fc8fcf19518133883792d5 (diff) |
iwlegacy: get rid of ctx->is_active
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlegacy')
-rw-r--r-- | drivers/net/wireless/iwlegacy/4965-mac.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/iwlegacy/4965.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/iwlegacy/common.c | 21 | ||||
-rw-r--r-- | drivers/net/wireless/iwlegacy/common.h | 7 |
4 files changed, 3 insertions, 31 deletions
diff --git a/drivers/net/wireless/iwlegacy/4965-mac.c b/drivers/net/wireless/iwlegacy/4965-mac.c index 1c3c85ec1117..1a54c1a812dd 100644 --- a/drivers/net/wireless/iwlegacy/4965-mac.c +++ b/drivers/net/wireless/iwlegacy/4965-mac.c | |||
@@ -6134,9 +6134,6 @@ il4965_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
6134 | il = hw->priv; | 6134 | il = hw->priv; |
6135 | /* At this point both hw and il are allocated. */ | 6135 | /* At this point both hw and il are allocated. */ |
6136 | 6136 | ||
6137 | il->ctx.always_active = true; | ||
6138 | il->ctx.is_active = true; | ||
6139 | |||
6140 | SET_IEEE80211_DEV(hw, &pdev->dev); | 6137 | SET_IEEE80211_DEV(hw, &pdev->dev); |
6141 | 6138 | ||
6142 | D_INFO("*** LOAD DRIVER ***\n"); | 6139 | D_INFO("*** LOAD DRIVER ***\n"); |
diff --git a/drivers/net/wireless/iwlegacy/4965.c b/drivers/net/wireless/iwlegacy/4965.c index 8d0fd60bc491..7b0192aff839 100644 --- a/drivers/net/wireless/iwlegacy/4965.c +++ b/drivers/net/wireless/iwlegacy/4965.c | |||
@@ -1419,9 +1419,6 @@ il4965_commit_rxon(struct il_priv *il, struct il_rxon_context *ctx) | |||
1419 | if (!il_is_alive(il)) | 1419 | if (!il_is_alive(il)) |
1420 | return -EBUSY; | 1420 | return -EBUSY; |
1421 | 1421 | ||
1422 | if (!ctx->is_active) | ||
1423 | return 0; | ||
1424 | |||
1425 | /* always get timestamp with Rx frame */ | 1422 | /* always get timestamp with Rx frame */ |
1426 | il->staging.flags |= RXON_FLG_TSF2HOST_MSK; | 1423 | il->staging.flags |= RXON_FLG_TSF2HOST_MSK; |
1427 | 1424 | ||
diff --git a/drivers/net/wireless/iwlegacy/common.c b/drivers/net/wireless/iwlegacy/common.c index db2e8bb11fa1..13bd3a8c21b1 100644 --- a/drivers/net/wireless/iwlegacy/common.c +++ b/drivers/net/wireless/iwlegacy/common.c | |||
@@ -4537,7 +4537,6 @@ static int | |||
4537 | il_setup_interface(struct il_priv *il, struct il_rxon_context *ctx) | 4537 | il_setup_interface(struct il_priv *il, struct il_rxon_context *ctx) |
4538 | { | 4538 | { |
4539 | struct ieee80211_vif *vif = ctx->vif; | 4539 | struct ieee80211_vif *vif = ctx->vif; |
4540 | int err; | ||
4541 | 4540 | ||
4542 | lockdep_assert_held(&il->mutex); | 4541 | lockdep_assert_held(&il->mutex); |
4543 | 4542 | ||
@@ -4548,16 +4547,7 @@ il_setup_interface(struct il_priv *il, struct il_rxon_context *ctx) | |||
4548 | */ | 4547 | */ |
4549 | il->iw_mode = vif->type; | 4548 | il->iw_mode = vif->type; |
4550 | 4549 | ||
4551 | ctx->is_active = true; | 4550 | return il_set_mode(il, ctx); |
4552 | |||
4553 | err = il_set_mode(il, ctx); | ||
4554 | if (err) { | ||
4555 | if (!ctx->always_active) | ||
4556 | ctx->is_active = false; | ||
4557 | return err; | ||
4558 | } | ||
4559 | |||
4560 | return 0; | ||
4561 | } | 4551 | } |
4562 | 4552 | ||
4563 | int | 4553 | int |
@@ -4612,11 +4602,9 @@ il_teardown_interface(struct il_priv *il, struct ieee80211_vif *vif, | |||
4612 | il_force_scan_end(il); | 4602 | il_force_scan_end(il); |
4613 | } | 4603 | } |
4614 | 4604 | ||
4615 | if (!mode_change) { | 4605 | if (!mode_change) |
4616 | il_set_mode(il, ctx); | 4606 | il_set_mode(il, ctx); |
4617 | if (!ctx->always_active) | 4607 | |
4618 | ctx->is_active = false; | ||
4619 | } | ||
4620 | } | 4608 | } |
4621 | 4609 | ||
4622 | void | 4610 | void |
@@ -5227,9 +5215,6 @@ il_update_qos(struct il_priv *il, struct il_rxon_context *ctx) | |||
5227 | if (test_bit(S_EXIT_PENDING, &il->status)) | 5215 | if (test_bit(S_EXIT_PENDING, &il->status)) |
5228 | return; | 5216 | return; |
5229 | 5217 | ||
5230 | if (!ctx->is_active) | ||
5231 | return; | ||
5232 | |||
5233 | il->qos_data.def_qos_parm.qos_flags = 0; | 5218 | il->qos_data.def_qos_parm.qos_flags = 0; |
5234 | 5219 | ||
5235 | if (il->qos_data.qos_active) | 5220 | if (il->qos_data.qos_active) |
diff --git a/drivers/net/wireless/iwlegacy/common.h b/drivers/net/wireless/iwlegacy/common.h index e085131a4572..51c1eecf7510 100644 --- a/drivers/net/wireless/iwlegacy/common.h +++ b/drivers/net/wireless/iwlegacy/common.h | |||
@@ -1154,13 +1154,6 @@ struct il_force_reset { | |||
1154 | 1154 | ||
1155 | struct il_rxon_context { | 1155 | struct il_rxon_context { |
1156 | struct ieee80211_vif *vif; | 1156 | struct ieee80211_vif *vif; |
1157 | |||
1158 | /* | ||
1159 | * We could use the vif to indicate active, but we | ||
1160 | * also need it to be active during disabling when | ||
1161 | * we already removed the vif for type setting. | ||
1162 | */ | ||
1163 | bool always_active, is_active; | ||
1164 | }; | 1157 | }; |
1165 | 1158 | ||
1166 | struct il_power_mgr { | 1159 | struct il_power_mgr { |