diff options
author | Stanislaw Gruszka <sgruszka@redhat.com> | 2012-02-03 11:31:56 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-02-06 14:56:10 -0500 |
commit | 20c47eba7001680e62878c5b20e487a8b0b873ad (patch) | |
tree | bae391aa49008d1d30252319b048a1cdc4e57ef1 /drivers | |
parent | dee9a09eb34a272494a315fe0c19e49b6375a000 (diff) |
iwlegacy: remove il_setup_interface()
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/iwlegacy/common.c | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/drivers/net/wireless/iwlegacy/common.c b/drivers/net/wireless/iwlegacy/common.c index 13bd3a8c21b1..ea2fa97fa36b 100644 --- a/drivers/net/wireless/iwlegacy/common.c +++ b/drivers/net/wireless/iwlegacy/common.c | |||
@@ -4533,23 +4533,6 @@ il_set_mode(struct il_priv *il, struct il_rxon_context *ctx) | |||
4533 | return il_commit_rxon(il, ctx); | 4533 | return il_commit_rxon(il, ctx); |
4534 | } | 4534 | } |
4535 | 4535 | ||
4536 | static int | ||
4537 | il_setup_interface(struct il_priv *il, struct il_rxon_context *ctx) | ||
4538 | { | ||
4539 | struct ieee80211_vif *vif = ctx->vif; | ||
4540 | |||
4541 | lockdep_assert_held(&il->mutex); | ||
4542 | |||
4543 | /* | ||
4544 | * This variable will be correct only when there's just | ||
4545 | * a single context, but all code using it is for hardware | ||
4546 | * that supports only one context. | ||
4547 | */ | ||
4548 | il->iw_mode = vif->type; | ||
4549 | |||
4550 | return il_set_mode(il, ctx); | ||
4551 | } | ||
4552 | |||
4553 | int | 4536 | int |
4554 | il_mac_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif) | 4537 | il_mac_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif) |
4555 | { | 4538 | { |
@@ -4574,8 +4557,9 @@ il_mac_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif) | |||
4574 | 4557 | ||
4575 | vif_priv->ctx = &il->ctx; | 4558 | vif_priv->ctx = &il->ctx; |
4576 | il->ctx.vif = vif; | 4559 | il->ctx.vif = vif; |
4560 | il->iw_mode = vif->type; | ||
4577 | 4561 | ||
4578 | err = il_setup_interface(il, &il->ctx); | 4562 | err = il_set_mode(il, &il->ctx); |
4579 | if (err) { | 4563 | if (err) { |
4580 | il->ctx.vif = NULL; | 4564 | il->ctx.vif = NULL; |
4581 | il->iw_mode = NL80211_IFTYPE_STATION; | 4565 | il->iw_mode = NL80211_IFTYPE_STATION; |
@@ -4978,7 +4962,7 @@ il_mac_change_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif, | |||
4978 | il_teardown_interface(il, vif, true); | 4962 | il_teardown_interface(il, vif, true); |
4979 | vif->type = newtype; | 4963 | vif->type = newtype; |
4980 | vif->p2p = false; | 4964 | vif->p2p = false; |
4981 | err = il_setup_interface(il, ctx); | 4965 | err = il_set_mode(il, ctx); |
4982 | WARN_ON(err); | 4966 | WARN_ON(err); |
4983 | /* | 4967 | /* |
4984 | * We've switched internally, but submitting to the | 4968 | * We've switched internally, but submitting to the |