From: Hin-Tak Leung <hintak_leung@yahoo.co.uk>
To: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Cc: linux-wireless@vger.kernel.org,
Hin-Tak Leung <htl10@users.sourceforge.net>,
Larry Finger <Larry.Finger@lwfinger.net>,
proski@gnu.org
Subject: Re: [RFC] Try to improve RTL8187B initialization time
Date: Thu, 10 Jul 2008 23:51:18 +0100 [thread overview]
Message-ID: <48769266.4090407@yahoo.co.uk> (raw)
In-Reply-To: <200807101851.31985.herton@mandriva.com.br>
Herton Ronaldo Krzesinski wrote:
> As reported before, we know that the initialization of rtl8187b interfaces is
> slow. There were some strange sleeps from vendor driver that were imported too
> just to be sure, but they don't seem to be needed. After looking at r8180 code,
> I think they really aren't needed, and using it as reference, I did a similar
> initialization now for rtl8187b, on quick tests seems to work well.
Most of the change is minor - mainly 6 secs is removed in 3 big chunks, but
a fraction of a sec here and there is added back elsewhere, so the net effect
is probably 4-5 sec, or less, since you also added some new code.
How about just removing the 3 chunks as below?
I am wondering also if some of the delays is simply that some of the init
numbers is wrong and the firmware gets thrown into some mini-recovery over-ride
routine.
I also have another "theory" - the windows driver is sensitive to the hardware
switch and the linux driver not, so obviously the effect of the hardware switch
can be overrided in software. To give the *appearance* of fast initialization,
maybe the windows driver simply initialize everything on load (i.e. when windows
starts), then switch the radio on and off when the user asks to shut off the
interface, etc. I have never got ndiswrapper to work on x86_64 (ifconfig up
stuck) - how does timing of ifconfig up/down with ndiswrapper compare?
BTW, ndiswrapper won't even build with 2.6.26-rc9.
> diff --git a/drivers/net/wireless/rtl8187_dev.c b/drivers/net/wireless/rtl8187_dev.c
> index f981fdb..25d9a0e 100644
> --- a/drivers/net/wireless/rtl8187_dev.c
> +++ b/drivers/net/wireless/rtl8187_dev.c
> @@ -643,14 +641,13 @@ static int rtl8187b_init_hw(struct ieee80211_hw *dev)
> - rtl818x_iowrite16(priv, &priv->map->RFPinsOutput, 0x0480);
> - rtl818x_iowrite16(priv, &priv->map->RFPinsSelect, 0x2488);
> - rtl818x_iowrite16(priv, &priv->map->RFPinsEnable, 0x1FFF);
> - msleep(1100);
> -
1st one.
> diff --git a/drivers/net/wireless/rtl8187_rtl8225.c b/drivers/net/wireless/rtl8187_rtl8225.c
> index 1bae899..9549e33 100644
> --- a/drivers/net/wireless/rtl8187_rtl8225.c
> +++ b/drivers/net/wireless/rtl8187_rtl8225.c
> @@ -850,25 +859,36 @@ static void rtl8225z2_b_rf_init(struct ieee80211_hw *dev)
> - rtl8225_write(dev, 0x3, 0x080); msleep(1);
> - rtl8225_write(dev, 0x5, 0x004); msleep(1);
> - rtl8225_write(dev, 0x0, 0x0B7); msleep(1);
> - msleep(3000);
2nd
> + rtl8225_write(dev, 0x0, 0x0B7);
> + msleep(100);
> + rtl8225_write(dev, 0x2, 0xC4D);
> + msleep(200);
> + rtl8225_write(dev, 0x2, 0x44D);
> + msleep(100);
>
> - rtl8225_write(dev, 0x2, 0xC4D); msleep(1);
> - msleep(2000);
3rd, but some are added as above.
next prev parent reply other threads:[~2008-07-10 22:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-10 21:51 [RFC] Try to improve RTL8187B initialization time Herton Ronaldo Krzesinski
2008-07-10 22:51 ` Hin-Tak Leung [this message]
2008-07-10 23:58 ` Herton Ronaldo Krzesinski
2008-07-11 16:58 ` Hin-Tak Leung
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=48769266.4090407@yahoo.co.uk \
--to=hintak_leung@yahoo.co.uk \
--cc=Larry.Finger@lwfinger.net \
--cc=herton@mandriva.com.br \
--cc=htl10@users.sourceforge.net \
--cc=linux-wireless@vger.kernel.org \
--cc=proski@gnu.org \
/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).