From: "John W. Linville" <linville@tuxdriver.com>
To: Tomas Winkler <tomasw@gmail.com>
Cc: linux-wireless@vger.kernel.org, reinette.chatre@intel.com
Subject: Re: [PATCH] iwlwifi: do not register bands with no supported channels
Date: Tue, 25 Mar 2008 17:24:07 -0400 [thread overview]
Message-ID: <20080325212407.GB20488@tuxdriver.com> (raw)
In-Reply-To: <1ba2fa240803251331y60f3cf58x8f08bd4411b1369d@mail.gmail.com>
On Tue, Mar 25, 2008 at 10:31:27PM +0200, Tomas Winkler wrote:
> On Tue, Mar 25, 2008 at 9:58 PM, John W. Linville
> <linville@tuxdriver.com> wrote:
> > Signed-off-by: John W. Linville <linville@tuxdriver.com>
> > ---
> > Otherwise, b/g-only devices fail in wiphy_register. Tested in Fedora
> > kernels for the last week or so...
> >
> > drivers/net/wireless/iwlwifi/iwl3945-base.c | 8 ++++++--
> > drivers/net/wireless/iwlwifi/iwl4965-base.c | 8 ++++++--
> > 2 files changed, 12 insertions(+), 4 deletions(-)
> > diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c
> > index 44cfd02..9ae3d29 100644
> > --- a/drivers/net/wireless/iwlwifi/iwl4965-base.c
> > +++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c
> > @@ -5001,8 +5001,12 @@ int iwl4965_init_geos(struct iwl_priv *priv)
> > priv->bands[IEEE80211_BAND_2GHZ].n_channels,
> > priv->bands[IEEE80211_BAND_5GHZ].n_channels);
> >
> > - priv->hw->wiphy->bands[IEEE80211_BAND_2GHZ] = &priv->bands[IEEE80211_BAND_2GHZ];
> > - priv->hw->wiphy->bands[IEEE80211_BAND_5GHZ] = &priv->bands[IEEE80211_BAND_5GHZ];
> > + if (priv->bands[IEEE80211_BAND_2GHZ].n_channels)
> > + priv->hw->wiphy->bands[IEEE80211_BAND_2GHZ] =
> > + &priv->bands[IEEE80211_BAND_2GHZ];
> > + if (priv->bands[IEEE80211_BAND_5GHZ].n_channels)
> > + priv->hw->wiphy->bands[IEEE80211_BAND_5GHZ] =
> > + &priv->bands[IEEE80211_BAND_5GHZ];
> >
> > set_bit(STATUS_GEO_CONFIGURED, &priv->status);
> >
>
> As there already exists condition testing this I would prefer
> something like this
I don't think it is the same -- yours is checking IWL_SKU_A.
> if ((priv->bands[IEEE80211_BAND_5GHZ].n_channels == 0) &&
> priv->cfg->sku & IWL_SKU_A) {
> printk(KERN_INFO DRV_NAME
> ": Incorrectly detected BG card as ABG. Please send "
> "your PCI ID 0x%04X:0x%04X to maintainer.\n",
> priv->pci_dev->device, priv->pci_dev->subsystem_device);
> priv->cfg->sku &= ~IWL_SKU_A;
> priv->hw->wiphy->bands[IEEE80211_BAND_5GHZ] = NULL;
> }
A clause just like this exists a few lines above, yet it does not
fire for the device that prompted this patch:
https://bugzilla.redhat.com/attachment.cgi?id=298613
> else
> priv->hw->wiphy->bands[IEEE80211_BAND_5GHZ] =
> &priv->bands[IEEE80211_BAND_5GHZ];
I don't think your version will resolve the issue. Am I missing
something?
John
--
John W. Linville
linville@tuxdriver.com
next prev parent reply other threads:[~2008-03-25 21:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-25 19:58 [PATCH] iwlwifi: do not register bands with no supported channels John W. Linville
2008-03-25 20:31 ` Tomas Winkler
2008-03-25 21:24 ` John W. Linville [this message]
2008-03-25 23:45 ` Tomas Winkler
2008-03-27 20:53 ` John W. Linville
2008-03-28 1:02 ` Tomas Winkler
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=20080325212407.GB20488@tuxdriver.com \
--to=linville@tuxdriver.com \
--cc=linux-wireless@vger.kernel.org \
--cc=reinette.chatre@intel.com \
--cc=tomasw@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).