diff options
author | Stanislaw Gruszka <sgruszka@redhat.com> | 2011-08-29 14:52:20 +0400 |
---|---|---|
committer | Stanislaw Gruszka <sgruszka@redhat.com> | 2011-11-15 15:31:35 +0400 |
commit | 17d6e557359e0a4033bf0889e0b481519e145404 (patch) | |
tree | 744f2dec4994b08f982d5643d04d70b2734418cb /drivers/net/wireless/iwlegacy/iwl-scan.c | |
parent | 3b98c7f49b675eb13e723967cf1264e3d562c480 (diff) | |
download | linux-17d6e557359e0a4033bf0889e0b481519e145404.tar.xz |
iwlegacy: remove for_each_context
We do not support many contexts.
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Diffstat (limited to 'drivers/net/wireless/iwlegacy/iwl-scan.c')
-rw-r--r-- | drivers/net/wireless/iwlegacy/iwl-scan.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/drivers/net/wireless/iwlegacy/iwl-scan.c b/drivers/net/wireless/iwlegacy/iwl-scan.c index 71b2fac1b5d3..18226d1988a7 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; |