From: Zhu Yi <yi.zhu@intel.com>
To: Helmut Schaa <helmut.schaa@googlemail.com>
Cc: "linville@tuxdriver.com" <linville@tuxdriver.com>,
"ipw2100-devel@lists.sourceforge.net"
<ipw2100-devel@lists.sourceforge.net>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
"Cahill, Ben M" <ben.m.cahill@intel.com>
Subject: Re: [Ipw2100-devel] [PATCH] ipw2200: rework scan handling while associated
Date: Fri, 28 Nov 2008 16:51:38 +0800 [thread overview]
Message-ID: <1227862298.2558.107.camel@debian.sh.intel.com> (raw)
In-Reply-To: <200811261805.39953.helmut.schaa@gmail.com>
On Thu, 2008-11-27 at 01:05 +0800, Helmut Schaa wrote:
> Could somebody please review the patch?
> Should I split the patch into three single patches?
Thank you for your patch. See my comments below.
> diff --git a/drivers/net/wireless/ipw2x00/ipw2200.c b/drivers/net/wireless/ipw2x00/ipw2200.c
> index c73173a..f17b5b2 100644
> --- a/drivers/net/wireless/ipw2x00/ipw2200.c
> +++ b/drivers/net/wireless/ipw2x00/ipw2200.c
> @@ -2310,10 +2310,10 @@ static void ipw_scan_check(void *data)
> {
> struct ipw_priv *priv = data;
> if (priv->status & (STATUS_SCANNING | STATUS_SCAN_ABORTING)) {
> - IPW_DEBUG_SCAN("Scan completion watchdog resetting "
> - "adapter after (%dms).\n",
> + IPW_DEBUG_SCAN("Scan completion watchdog: aborting "
> + "scan after (%dms).\n",
> jiffies_to_msecs(IPW_SCAN_CHECK_WATCHDOG));
> - queue_work(priv->workqueue, &priv->adapter_restart);
> + queue_work(priv->workqueue, &priv->abort_scan);
> }
> }
We need something like the network Tx watchdog to prevent the firmware
stick forever when something is wrong during scan. At this time, no
command (include ABORT_SCAN) is going to be processed. We need something
can really move the firmware back to the correct state, that is the
adapter_restart. If you do see the watchdog files a lot, increasing
IPW_SCAN_CHECK_WATCHDOG should be the way to go.
> @@ -4346,7 +4346,8 @@ static void ipw_handle_missed_beacon(struct ipw_priv *priv,
> return;
> }
>
> - if (priv->status & STATUS_SCANNING) {
> + if (priv->status & STATUS_SCANNING &&
> + missed_count > priv->cancel_scan_threshold) {
> /* Stop scan to keep fw from getting
> * stuck (only if we aren't roaming --
> * otherwise we'll never scan more than 2 or 3
I'm OK with this. Since you don't change priv->cancel_scan_threadhold
anywhere, can you use IPW_MB_SCAN_CANCEL_THRESHOLD directly?
> @@ -6281,6 +6282,18 @@ static void ipw_add_scan_channels(struct ipw_priv *priv,
> }
> }
>
> +static int ipw_passive_dwell_time(struct ipw_priv *priv)
> +{
> + /* staying on passive channels longer than the beacon interval causes
> + * the firmware to enter an infinite loop. Hence, don't stay on passive
> + * longer than the beacon interval.
> + */
> + if (priv->status & STATUS_ASSOCIATED && priv->assoc_network->beacon_interval > 10)
> + return priv->assoc_network->beacon_interval - 10;
> + else
> + return 120;
> +}
Is it still a problem with the above IPW_MB_SCAN_CANCEL_THRESHOLD used?
We assume most APs use 100ms beacon interval. But in case you are
associated with an AP which uses 20ms beacon interval, do you want to
set the passive_dwell time to 10ms here? 120ms makes sure we can at
least receive a beacon for normal APs.
BTW, another thing might help to resolve the scan-while-associate
problem. Currently we scan 5GHz band channels first, then 2.4GHz band
(see ipw_add_scan_channels). Normally most channels in 5GHz band are
passive ones. Thus they use longer dwell time. If we change to scan
2.4GHz band channels first, we can get more scan result before a scan
abort. Can you please try it?
Thanks,
-yi
next prev parent reply other threads:[~2008-11-28 8:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-26 17:05 [PATCH] ipw2200: rework scan handling while associated Helmut Schaa
2008-11-28 8:51 ` Zhu Yi [this message]
2008-11-28 9:31 ` [Ipw2100-devel] " Helmut Schaa
2008-12-01 2:58 ` Zhu Yi
2008-12-01 10:10 ` Helmut Schaa
2008-12-03 9:33 ` Zhu Yi
2008-12-10 5:51 ` Zhu Yi
2008-12-10 9:11 ` Helmut Schaa
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=1227862298.2558.107.camel@debian.sh.intel.com \
--to=yi.zhu@intel.com \
--cc=ben.m.cahill@intel.com \
--cc=helmut.schaa@googlemail.com \
--cc=ipw2100-devel@lists.sourceforge.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.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).