From: Dan Williams <dcbw@redhat.com>
To: "Abbas, Mohamed" <mohamed.abbas@intel.com>
Cc: Johannes Berg <johannes@sipsolutions.net>,
"Zhu, Yi" <yi.zhu@intel.com>,
linville@tuxdriver.com, linux-wireless@vger.kernel.org, "Cahill,
Ben M" <ben.m.cahill@intel.com>
Subject: RE: [PATCH] mac80211: hardware scan rework (V2)
Date: Tue, 20 Nov 2007 12:21:47 -0500 [thread overview]
Message-ID: <1195579307.3389.52.camel@localhost.localdomain> (raw)
In-Reply-To: <33E1C72C74DBE747B7B59C1740F74437027F30D4@orsmsx417.amr.corp.intel.com>
On Tue, 2007-11-20 at 09:17 -0800, Abbas, Mohamed wrote:
> Johannes
> The firmware will go back to the old setting, the ones before scan, once
> done scanning by it self. The calls by mac80211 after scan complete to
> set channel will be ignored by the iwl driver if we still tuned to the
> same channel, iwl wont call firmware on the same setting, it has to be a
> change to call down to firmware. I need to check what happen if user
> change channel during scan, this call might be necessary in this case.
I'd expect that either (a) the scan gets canceled and then the channel
change happens, or (b) the channel change gets queued and happens
immediately after the scan completes. (b) is probably the easier thing
to do here unless the ucode has a cancel-scan command, but then you have
to wait until the scan is actually canceled anyway, which sort of
implies (b) too. So maybe just do (b) and be done with it :)
Dan
> Mohamed
>
> -----Original Message-----
> From: Johannes Berg [mailto:johannes@sipsolutions.net]
> Sent: Tuesday, November 20, 2007 5:51 AM
> To: Zhu, Yi
> Cc: linville@tuxdriver.com; linux-wireless@vger.kernel.org; Abbas,
> Mohamed; Cahill, Ben M
> Subject: Re: [PATCH] mac80211: hardware scan rework (V2)
>
> Hi,
>
> Thanks!
>
> > 1. fix a hw scan bug in ieee80211_rx_bss_info() for setting beacon
> > supported rates
> > 2. let control frames pass in ieee80211_sta_rx_scan() during hw scan
> > 3. set local->sta_{hw|sw}_scanning type to bool
> > 4. avoid channel setting during hw scan
>
> Why this? I was confused at first and I'm sorry if I confused you, but
> since we're now fully unaware of hardware scan thanks to your item 5, I
> think we need to allow setting channel during hardware scan so the
> firmware will change to the right channel once it finished scanning.
>
> > 5. rework ieee80211_scan_completed() to make it symmetric for hw scan
>
>
> > diff --git a/net/mac80211/ieee80211_sta.c
> b/net/mac80211/ieee80211_sta.c
> > index 015b3f8..26f404a 100644
> > --- a/net/mac80211/ieee80211_sta.c
> > +++ b/net/mac80211/ieee80211_sta.c
> > @@ -1487,8 +1487,18 @@ static void ieee80211_rx_bss_info(struct
> net_device *dev,
> > u32 supp_rates, prev_rates;
> > int i, j;
> >
> > - mode = local->sta_scanning ?
> > + mode = local->sta_sw_scanning ?
> > local->scan_hw_mode : local->oper_hw_mode;
> > +
> > + if (local->sta_hw_scanning) {
> > + /* search for the correct mode matches the
> beacon */
> > + list_for_each_entry(mode, &local->modes_list,
> list)
> > + if (mode->mode == rx_status->phymode)
> > + break;
> > +
> > + if (mode == NULL)
> > + mode = local->oper_hw_mode;
> > + }
>
> Good catch.
>
> > @@ -1985,7 +2003,7 @@ void ieee80211_sta_work(struct work_struct
> *work)
> > if (!netif_running(dev))
> > return;
> >
> > - if (local->sta_scanning)
> > + if (local->sta_sw_scanning || local->sta_hw_scanning)
> > return;
>
> Shouldn't the sta work be able to run normally while hw scan is in
> progress?
>
> > - if (unlikely(local->sta_scanning != 0)) {
> > - ieee80211_sta_rx_scan(rx->dev, skb, rx->u.rx.status);
> > + if (unlikely(local->sta_hw_scanning))
> > + return ieee80211_sta_rx_scan(rx->dev, skb,
> rx->u.rx.status);
> > +
> > + if (unlikely(local->sta_sw_scanning)) {
> > + /* drop all the other packets during a software scan
> anyway */
> > + if (ieee80211_sta_rx_scan(rx->dev, skb, rx->u.rx.status)
> > + != TXRX_QUEUED)
> > + dev_kfree_skb(skb);
>
> Not entirely sure why we do this, but nothing we should change with this
> patch.
>
> Other than the ioctl thing it looks good to me.
>
> johannes
> -
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2007-11-20 17:25 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-20 5:20 [PATCH] mac80211: hardware scan rework (V2) Zhu Yi
2007-11-20 13:50 ` Johannes Berg
2007-11-20 16:23 ` Cahill, Ben M
2007-11-20 16:29 ` Johannes Berg
2007-11-20 16:37 ` Cahill, Ben M
2007-11-20 17:17 ` Abbas, Mohamed
2007-11-20 17:21 ` Dan Williams [this message]
2007-11-21 6:19 ` mohamed salim abbas
2007-11-21 15:10 ` Johannes Berg
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=1195579307.3389.52.camel@localhost.localdomain \
--to=dcbw@redhat.com \
--cc=ben.m.cahill@intel.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=mohamed.abbas@intel.com \
--cc=yi.zhu@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 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).