Commit 20c47eba authored by Stanislaw Gruszka's avatar Stanislaw Gruszka Committed by John W. Linville

iwlegacy: remove il_setup_interface()

Signed-off-by: default avatarStanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent dee9a09e
...@@ -4533,23 +4533,6 @@ il_set_mode(struct il_priv *il, struct il_rxon_context *ctx) ...@@ -4533,23 +4533,6 @@ il_set_mode(struct il_priv *il, struct il_rxon_context *ctx)
return il_commit_rxon(il, ctx); return il_commit_rxon(il, ctx);
} }
static int
il_setup_interface(struct il_priv *il, struct il_rxon_context *ctx)
{
struct ieee80211_vif *vif = ctx->vif;
lockdep_assert_held(&il->mutex);
/*
* This variable will be correct only when there's just
* a single context, but all code using it is for hardware
* that supports only one context.
*/
il->iw_mode = vif->type;
return il_set_mode(il, ctx);
}
int int
il_mac_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif) il_mac_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
{ {
...@@ -4574,8 +4557,9 @@ il_mac_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif) ...@@ -4574,8 +4557,9 @@ il_mac_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
vif_priv->ctx = &il->ctx; vif_priv->ctx = &il->ctx;
il->ctx.vif = vif; il->ctx.vif = vif;
il->iw_mode = vif->type;
err = il_setup_interface(il, &il->ctx); err = il_set_mode(il, &il->ctx);
if (err) { if (err) {
il->ctx.vif = NULL; il->ctx.vif = NULL;
il->iw_mode = NL80211_IFTYPE_STATION; il->iw_mode = NL80211_IFTYPE_STATION;
...@@ -4978,7 +4962,7 @@ il_mac_change_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif, ...@@ -4978,7 +4962,7 @@ il_mac_change_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
il_teardown_interface(il, vif, true); il_teardown_interface(il, vif, true);
vif->type = newtype; vif->type = newtype;
vif->p2p = false; vif->p2p = false;
err = il_setup_interface(il, ctx); err = il_set_mode(il, ctx);
WARN_ON(err); WARN_ON(err);
/* /*
* We've switched internally, but submitting to the * We've switched internally, but submitting to the
......
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