From: Johannes Berg <johannes@sipsolutions.net>
To: Stanislaw Gruszka <sgruszka@redhat.com>
Cc: Wey-Yi Guy <wey-yi.w.guy@intel.com>,
Intel Linux Wireless <ilw@linux.intel.com>,
linux-wireless@vger.kernel.org
Subject: Re: [PATCH] iwlwifi: correct frequency settings
Date: Mon, 31 Jan 2011 13:10:26 +0100 [thread overview]
Message-ID: <1296475826.3812.24.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <1296475295-5420-1-git-send-email-sgruszka@redhat.com>
On Mon, 2011-01-31 at 13:01 +0100, Stanislaw Gruszka wrote:
> After commit 59eb21a6504731fc16db4cf9463065dd61093e08
> "cfg80211: Extend channel to frequency mapping for 802.11j"
> we use uninitialized sband->band when assign channel frequencies, what
> results that 5GHz channels have erroneous (zero) center_freq value.
>
> Patch fixes problem and simplifies code a bit.
Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
Thanks!
> Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
> ---
> drivers/net/wireless/iwlwifi/iwl-core.c | 8 ++------
> 1 files changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
> index 92724cb..4ad8938 100644
> --- a/drivers/net/wireless/iwlwifi/iwl-core.c
> +++ b/drivers/net/wireless/iwlwifi/iwl-core.c
> @@ -219,16 +219,12 @@ int iwlcore_init_geos(struct iwl_priv *priv)
> if (!is_channel_valid(ch))
> continue;
>
> - if (is_channel_a_band(ch))
> - sband = &priv->bands[IEEE80211_BAND_5GHZ];
> - else
> - sband = &priv->bands[IEEE80211_BAND_2GHZ];
> + sband = &priv->bands[ch->band];
>
> geo_ch = &sband->channels[sband->n_channels++];
>
> geo_ch->center_freq =
> - ieee80211_channel_to_frequency(ch->channel,
> - sband->band);
> + ieee80211_channel_to_frequency(ch->channel, ch->band);
> geo_ch->max_power = ch->max_power_avg;
> geo_ch->max_antenna_gain = 0xff;
> geo_ch->hw_value = ch->channel;
next prev parent reply other threads:[~2011-01-31 12:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-31 12:01 [PATCH] iwlwifi: correct frequency settings Stanislaw Gruszka
2011-01-31 12:10 ` Johannes Berg [this message]
2011-01-31 15:27 ` wwguy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1296475826.3812.24.camel@jlt3.sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=ilw@linux.intel.com \
--cc=linux-wireless@vger.kernel.org \
--cc=sgruszka@redhat.com \
--cc=wey-yi.w.guy@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.