From f11f6bd849c50f453d859a46bcf804d6c6096566 Mon Sep 17 00:00:00 2001 From: Stanislaw Gruszka Date: Fri, 3 Feb 2012 17:31:56 +0100 Subject: [PATCH] --- yaml --- r: 290391 b: refs/heads/master c: 20c47eba7001680e62878c5b20e487a8b0b873ad h: refs/heads/master i: 290389: 339dced837819e0c371910f7472bbee1a37bbad1 290387: cee0739c78da5ac3245965001b334294035f683c 290383: 27d01e2f4c570df9a01c236adbd6eb59d8d4df53 v: v3 --- [refs] | 2 +- trunk/drivers/net/wireless/iwlegacy/common.c | 22 +++----------------- 2 files changed, 4 insertions(+), 20 deletions(-) diff --git a/[refs] b/[refs] index 7db38d7c9054..b0bb29038caf 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: dee9a09eb34a272494a315fe0c19e49b6375a000 +refs/heads/master: 20c47eba7001680e62878c5b20e487a8b0b873ad diff --git a/trunk/drivers/net/wireless/iwlegacy/common.c b/trunk/drivers/net/wireless/iwlegacy/common.c index 13bd3a8c21b1..ea2fa97fa36b 100644 --- a/trunk/drivers/net/wireless/iwlegacy/common.c +++ b/trunk/drivers/net/wireless/iwlegacy/common.c @@ -4533,23 +4533,6 @@ il_set_mode(struct il_priv *il, struct il_rxon_context *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 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; 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) { il->ctx.vif = NULL; il->iw_mode = NL80211_IFTYPE_STATION; @@ -4978,7 +4962,7 @@ il_mac_change_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif, il_teardown_interface(il, vif, true); vif->type = newtype; vif->p2p = false; - err = il_setup_interface(il, ctx); + err = il_set_mode(il, ctx); WARN_ON(err); /* * We've switched internally, but submitting to the