From 17d6e557359e0a4033bf0889e0b481519e145404 Mon Sep 17 00:00:00 2001 From: Stanislaw Gruszka Date: Mon, 29 Aug 2011 12:52:20 +0200 Subject: iwlegacy: remove for_each_context We do not support many contexts. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/iwlegacy/iwl-scan.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'drivers/net/wireless/iwlegacy/iwl-scan.c') diff --git a/drivers/net/wireless/iwlegacy/iwl-scan.c b/drivers/net/wireless/iwlegacy/iwl-scan.c index 71b2fac1b5d..18226d1988a 100644 --- a/drivers/net/wireless/iwlegacy/iwl-scan.c +++ b/drivers/net/wireless/iwlegacy/iwl-scan.c @@ -290,7 +290,9 @@ u16 il_get_passive_dwell_time(struct il_priv *il, enum ieee80211_band band, struct ieee80211_vif *vif) { - struct il_rxon_context *ctx; + struct il_rxon_context *ctx = &il->ctx; + u16 value; + u16 passive = (band == IEEE80211_BAND_2GHZ) ? IL_PASSIVE_DWELL_BASE + IL_PASSIVE_DWELL_TIME_24 : IL_PASSIVE_DWELL_BASE + IL_PASSIVE_DWELL_TIME_52; @@ -301,17 +303,11 @@ u16 il_get_passive_dwell_time(struct il_priv *il, * dwell time to be 98% of the smallest beacon interval * (minus 2 * channel tune time) */ - for_each_context(il, ctx) { - u16 value; - - if (!il_is_associated_ctx(ctx)) - continue; - value = ctx->vif ? ctx->vif->bss_conf.beacon_int : 0; - if (value > IL_PASSIVE_DWELL_BASE || !value) - value = IL_PASSIVE_DWELL_BASE; - value = (value * 98) / 100 - IL_CHANNEL_TUNE_TIME * 2; - passive = min(value, passive); - } + value = ctx->vif ? ctx->vif->bss_conf.beacon_int : 0; + if (value > IL_PASSIVE_DWELL_BASE || !value) + value = IL_PASSIVE_DWELL_BASE; + value = (value * 98) / 100 - IL_CHANNEL_TUNE_TIME * 2; + passive = min(value, passive); } return passive; -- cgit v1.2.3