[PATCH] rtl8187b: do not do per packet TX AGC

The code for rtl8187 does not do per packet TX AGC. Resetting the per
packet TX AGC for rtl8187b appears to increase its overall TX power.
This allows the device to associate and a connection be established
using APs a little further away.

Tested-by: Thadeu Lima de Souza Cascardo <cascardo@...>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@...>
Cc: linux-wireless@...
Cc: Larry Finger <Larry.Finger@...>
Cc: Rogerio Luz Coelho <rogluz.news@...>
Cc: Herton Ronaldo Krzesinski <herton@...>
Cc: Hin-Tak Leung <hintak.leung@...>
---
 drivers/net/wireless/rtl818x/rtl8187_dev.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/rtl818x/rtl8187_dev.c b/drivers/net/wireless/rtl818x/rtl8187_dev.c
index 38fa824..6e26149 100644
--- a/drivers/net/wireless/rtl818x/rtl8187_dev.c
+++ b/drivers/net/wireless/rtl818x/rtl8187_dev.c
 <at>  <at>  -775,10 +775,6  <at>  <at>  static int rtl8187b_init_hw(struct ieee80211_hw *dev)
 	reg = rtl818x_ioread8(priv, &priv->map->CW_CONF);
 	reg |= RTL818X_CW_CONF_PERPACKET_RETRY_SHIFT;
 	rtl818x_iowrite8(priv, &priv->map->CW_CONF, reg);
-	reg = rtl818x_ioread8(priv, &priv->map->TX_AGC_CTL);
-	reg |= RTL818X_TX_AGC_CTL_PERPACKET_GAIN_SHIFT |
-	       RTL818X_TX_AGC_CTL_PERPACKET_ANTSEL_SHIFT;
-	rtl818x_iowrite8(priv, &priv->map->TX_AGC_CTL, reg);

 	rtl818x_iowrite16_idx(priv, (__le16 *)0xFFE0, 0x0FFF, 1);
(Continue reading)

Larry Finger | 28 Aug 23:32 2010
Picon

Re: [PATCH] rtl8187b: do not do per packet TX AGC

On 08/28/2010 12:54 AM, Thadeu Lima de Souza Cascardo wrote:
> The code for rtl8187 does not do per packet TX AGC. Resetting the per
> packet TX AGC for rtl8187b appears to increase its overall TX power.
> This allows the device to associate and a connection be established
> using APs a little further away.
> 
> Tested-by: Thadeu Lima de Souza Cascardo <cascardo@...>
> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@...>
> Cc: linux-wireless@...
> Cc: Larry Finger <Larry.Finger@...>
> Cc: Rogerio Luz Coelho <rogluz.news@...>
> Cc: Herton Ronaldo Krzesinski <herton@...>
> Cc: Hin-Tak Leung <hintak.leung@...>
> ---

I'm a little confused here. The subject says not to set the per packet TX AGC,
while the submission text says that setting it helps. I don't have access to any
documents that describe this register, but I expect that clearing
RTL818X_TX_AGC_CTL_PERPACKET_GAIN_SHIFT would disable that feature. As a result
the code change seems to match the subject.

I have not yet tested this code, but I do note that all the Realtek drivers for
the RTL8187B set this bit.

Until testing, I withhold judgment on the actual code change, but NACK for the
inconsistency.

Larry

--
(Continue reading)

John W. Linville | 30 Aug 16:12 2010

Re: [PATCH] rtl8187b: do not do per packet TX AGC

On Sat, Aug 28, 2010 at 04:32:48PM -0500, Larry Finger wrote:
> On 08/28/2010 12:54 AM, Thadeu Lima de Souza Cascardo wrote:
> > The code for rtl8187 does not do per packet TX AGC. Resetting the per
> > packet TX AGC for rtl8187b appears to increase its overall TX power.
> > This allows the device to associate and a connection be established
> > using APs a little further away.
> > 
> > Tested-by: Thadeu Lima de Souza Cascardo <cascardo@...>
> > Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@...>
> > Cc: linux-wireless@...
> > Cc: Larry Finger <Larry.Finger@...>
> > Cc: Rogerio Luz Coelho <rogluz.news@...>
> > Cc: Herton Ronaldo Krzesinski <herton@...>
> > Cc: Hin-Tak Leung <hintak.leung@...>
> > ---
> 
> I'm a little confused here. The subject says not to set the per packet TX AGC,
> while the submission text says that setting it helps. I don't have access to any
> documents that describe this register, but I expect that clearing
> RTL818X_TX_AGC_CTL_PERPACKET_GAIN_SHIFT would disable that feature. As a result
> the code change seems to match the subject.
> 
> I have not yet tested this code, but I do note that all the Realtek drivers for
> the RTL8187B set this bit.
> 
> Until testing, I withhold judgment on the actual code change, but NACK for the
> inconsistency.

Perhaps the word "clearing" rather than "resetting" would be less confusing?

(Continue reading)

Larry Finger | 30 Aug 16:48 2010
Picon

Re: [PATCH] rtl8187b: do not do per packet TX AGC

On 08/30/2010 09:12 AM, John W. Linville wrote:
> On Sat, Aug 28, 2010 at 04:32:48PM -0500, Larry Finger wrote:
>> On 08/28/2010 12:54 AM, Thadeu Lima de Souza Cascardo wrote:
>>> The code for rtl8187 does not do per packet TX AGC. Resetting the per
>>> packet TX AGC for rtl8187b appears to increase its overall TX power.
>>> This allows the device to associate and a connection be established
>>> using APs a little further away.
>>>
>>> Tested-by: Thadeu Lima de Souza Cascardo <cascardo@...>
>>> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@...>
>>> Cc: linux-wireless@...
>>> Cc: Larry Finger <Larry.Finger@...>
>>> Cc: Rogerio Luz Coelho <rogluz.news@...>
>>> Cc: Herton Ronaldo Krzesinski <herton@...>
>>> Cc: Hin-Tak Leung <hintak.leung@...>
>>> ---
>>
>> I'm a little confused here. The subject says not to set the per packet TX AGC,
>> while the submission text says that setting it helps. I don't have access to any
>> documents that describe this register, but I expect that clearing
>> RTL818X_TX_AGC_CTL_PERPACKET_GAIN_SHIFT would disable that feature. As a result
>> the code change seems to match the subject.
>>
>> I have not yet tested this code, but I do note that all the Realtek drivers for
>> the RTL8187B set this bit.
>>
>> Until testing, I withhold judgment on the actual code change, but NACK for the
>> inconsistency.
> 
> Perhaps the word "clearing" rather than "resetting" would be less confusing?
(Continue reading)

Re: [PATCH] rtl8187b: do not do per packet TX AGC

On Mon, Aug 30, 2010 at 09:48:57AM -0500, Larry Finger wrote:
> On 08/30/2010 09:12 AM, John W. Linville wrote:
> > On Sat, Aug 28, 2010 at 04:32:48PM -0500, Larry Finger wrote:
> >> On 08/28/2010 12:54 AM, Thadeu Lima de Souza Cascardo wrote:
> >>> The code for rtl8187 does not do per packet TX AGC. Resetting the per
> >>> packet TX AGC for rtl8187b appears to increase its overall TX power.
> >>> This allows the device to associate and a connection be established
> >>> using APs a little further away.
> >>>
> >>> Tested-by: Thadeu Lima de Souza Cascardo <cascardo@...>
> >>> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@...>
> >>> Cc: linux-wireless@...
> >>> Cc: Larry Finger <Larry.Finger@...>
> >>> Cc: Rogerio Luz Coelho <rogluz.news@...>
> >>> Cc: Herton Ronaldo Krzesinski <herton@...>
> >>> Cc: Hin-Tak Leung <hintak.leung@...>
> >>> ---
> >>
> >> I'm a little confused here. The subject says not to set the per packet TX AGC,
> >> while the submission text says that setting it helps. I don't have access to any
> >> documents that describe this register, but I expect that clearing
> >> RTL818X_TX_AGC_CTL_PERPACKET_GAIN_SHIFT would disable that feature. As a result
> >> the code change seems to match the subject.
> >>
> >> I have not yet tested this code, but I do note that all the Realtek drivers for
> >> the RTL8187B set this bit.
> >>
> >> Until testing, I withhold judgment on the actual code change, but NACK for the
> >> inconsistency.
> > 
(Continue reading)

seno | 26 Oct 20:03 2010
Picon

Re:[PATCH] rtl8187b: do not do per packet TX AGC

I tried that patch on compat-wireless-2010-10-25 (Kernel 2.6.33.7).

Performance improves minimal, but thousands of errors occur in iwconfig output.
(Tx excessive retries, Invalid misc, Missed beacon).

The router also shows lots of errors 
(for Received (RX) / Transmitted (TX) packets)

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@...
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Larry Finger | 26 Oct 20:25 2010
Picon

Re: [PATCH] rtl8187b: do not do per packet TX AGC

On 10/26/2010 01:03 PM, seno wrote:
> I tried that patch on compat-wireless-2010-10-25 (Kernel 2.6.33.7).
> 
> Performance improves minimal, but thousands of errors occur in iwconfig output.
> (Tx excessive retries, Invalid misc, Missed beacon).
> 
> The router also shows lots of errors 
> (for Received (RX) / Transmitted (TX) packets)

I no longer remember the details of why this patch was abandoned, but I suspect
you found the answer.

Larry
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@...
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Re: [PATCH] rtl8187b: do not do per packet TX AGC

On Tue, Oct 26, 2010 at 01:25:03PM -0500, Larry Finger wrote:
> On 10/26/2010 01:03 PM, seno wrote:
> > I tried that patch on compat-wireless-2010-10-25 (Kernel 2.6.33.7).
> > 
> > Performance improves minimal, but thousands of errors occur in iwconfig output.
> > (Tx excessive retries, Invalid misc, Missed beacon).
> > 
> > The router also shows lots of errors 
> > (for Received (RX) / Transmitted (TX) packets)
> 
> I no longer remember the details of why this patch was abandoned, but I suspect
> you found the answer.
> 

It was because of the bad wording in the commit description. I was
expecting some more testing from my client before posting it again with
the wording fixed. They've been testing it and there is enough
improvement they require the patch. I don't get the thousands of errors
in iwconfig output. I can try to reproduce it here if I get more
details.

Thanks,
Cascardo.

> Larry
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@...
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
(Continue reading)

Herton Ronaldo Krzesinski | 28 Oct 23:13 2010
Picon

Re: [PATCH] rtl8187b: do not do per packet TX AGC

On Tue, 26 Oct 2010 16:53:42 -0200
Thadeu Lima de Souza Cascardo <cascardo@...> wrote:
> On Tue, Oct 26, 2010 at 01:25:03PM -0500, Larry Finger wrote:
> > On 10/26/2010 01:03 PM, seno wrote:
> > > I tried that patch on compat-wireless-2010-10-25 (Kernel 2.6.33.7).
> > > 
> > > Performance improves minimal, but thousands of errors occur in iwconfig output.
> > > (Tx excessive retries, Invalid misc, Missed beacon).
> > > 
> > > The router also shows lots of errors 
> > > (for Received (RX) / Transmitted (TX) packets)
> > 
> > I no longer remember the details of why this patch was abandoned, but I suspect
> > you found the answer.
> > 
> 
> It was because of the bad wording in the commit description. I was
> expecting some more testing from my client before posting it again with
> the wording fixed. They've been testing it and there is enough
> improvement they require the patch. I don't get the thousands of errors
> in iwconfig output. I can try to reproduce it here if I get more
> details.

The excessive retries etc. should be another issue. The patch from Thadeu
really improves the driver. In last days I got back a RTL8187B device for
testing, and for me it also improved the range and throughput doing some
scps or with iperf. And looking at newer realtek drivers for 8187B, they
also started to clear the flags. In fact, while doing a printk to see the
contents of the register after chip reset, it's already cleared, but I don't
see any problem to make sure we already have all *TX_AGC_CTL* flags cleared.
(Continue reading)

[PATCH] rtl8187b: do not do per packet TX AGC

Clearing the per packet TX AGC for the RTL8187B device appears to
increase its overall TX power. This allows the device to associate and a
connection to be established using APs a little further away.

This is in accordance to what is done for RTL8187L devices and also what
Realtek drivers do.

Tested-by: Thadeu Lima de Souza Cascardo <cascardo@...>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@...>
Cc: linux-wireless@...
Cc: Larry Finger <Larry.Finger@...>
Cc: Rogerio Luz Coelho <rogluz.news@...>
Cc: Herton Ronaldo Krzesinski <herton@...>
Cc: Hin-Tak Leung <hintak.leung@...>
Cc: seno <senada@...>
---
 drivers/net/wireless/rtl818x/rtl8187_dev.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/rtl818x/rtl8187_dev.c b/drivers/net/wireless/rtl818x/rtl8187_dev.c
index 38fa824..6e26149 100644
--- a/drivers/net/wireless/rtl818x/rtl8187_dev.c
+++ b/drivers/net/wireless/rtl818x/rtl8187_dev.c
 <at>  <at>  -775,10 +775,6  <at>  <at>  static int rtl8187b_init_hw(struct ieee80211_hw *dev)
 	reg = rtl818x_ioread8(priv, &priv->map->CW_CONF);
 	reg |= RTL818X_CW_CONF_PERPACKET_RETRY_SHIFT;
 	rtl818x_iowrite8(priv, &priv->map->CW_CONF, reg);
-	reg = rtl818x_ioread8(priv, &priv->map->TX_AGC_CTL);
-	reg |= RTL818X_TX_AGC_CTL_PERPACKET_GAIN_SHIFT |
-	       RTL818X_TX_AGC_CTL_PERPACKET_ANTSEL_SHIFT;
(Continue reading)

Herton Ronaldo Krzesinski | 29 Oct 15:15 2010
Picon

Re: [PATCH] rtl8187b: do not do per packet TX AGC

On Thu, 28 Oct 2010 20:01:00 -0200
Thadeu Lima de Souza Cascardo <cascardo@...> wrote:

> Clearing the per packet TX AGC for the RTL8187B device appears to
> increase its overall TX power. This allows the device to associate and a
> connection to be established using APs a little further away.
> 
> This is in accordance to what is done for RTL8187L devices and also what
> Realtek drivers do.
> 
> Tested-by: Thadeu Lima de Souza Cascardo <cascardo@...>
> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@...>
> Cc: linux-wireless@...
> Cc: Larry Finger <Larry.Finger@...>
> Cc: Rogerio Luz Coelho <rogluz.news@...>
> Cc: Herton Ronaldo Krzesinski <herton@...>
> Cc: Hin-Tak Leung <hintak.leung@...>
> Cc: seno <senada@...>

Tested-by: Herton Ronaldo Krzesinski <herton@...>

> ---
>  drivers/net/wireless/rtl818x/rtl8187_dev.c |   10 ++++++----
>  1 files changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/net/wireless/rtl818x/rtl8187_dev.c b/drivers/net/wireless/rtl818x/rtl8187_dev.c
> index 38fa824..6e26149 100644
> --- a/drivers/net/wireless/rtl818x/rtl8187_dev.c
> +++ b/drivers/net/wireless/rtl818x/rtl8187_dev.c
>  <at>  <at>  -775,10 +775,6  <at>  <at>  static int rtl8187b_init_hw(struct ieee80211_hw *dev)
(Continue reading)

seno | 29 Oct 01:21 2010
Picon

Re: [PATCH] rtl8187b: do not do per packet TX AGC

Herton Ronaldo Krzesinski <herton <at> ...> writes:

> The excessive retries etc. should be another issue. The patch from Thadeu
> really improves the driver.

Well, I tried once more today, maybe I'm doing something wrong?

- I run "./scripts/driver-select rtl818x" in compat-wireless-2010-10-28
- then "patch -p1 rtl8187_dev.c rtl8187b-do-not-do-per-packet-TX-AGC.patch"
- then "make"
- then "sudo make install"
- then reboot

"dmesg |grep compat" gives "Compat-wireless backport release: compat-
wireless-2010-10-22-5-g69fdc09" so the new module is used.

On speedtest.net, max speed is ~ 1mbit (on 10 mbit cable internet  <at> 10 meters 
distance)
The router reports an improved "Signal Quality", but iwconfig now shows:

"Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0"
"Tx excessive retries:2589  Invalid misc:17686   Missed beacon:0"

Herton: If I make something wrong, can you please post your rtl8187.ko.gz 
(Mandriva 2010.1 / 2.6.33.7-desktop-2mnb x86_64)?

Thank you.

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
(Continue reading)

Re: [PATCH] rtl8187b: do not do per packet TX AGC

On Thu, Oct 28, 2010 at 11:21:47PM +0000, seno wrote:
> Herton Ronaldo Krzesinski <herton <at> ...> writes:
> 
> > The excessive retries etc. should be another issue. The patch from Thadeu
> > really improves the driver.
> 
> Well, I tried once more today, maybe I'm doing something wrong?
> 
> - I run "./scripts/driver-select rtl818x" in compat-wireless-2010-10-28
> - then "patch -p1 rtl8187_dev.c rtl8187b-do-not-do-per-packet-TX-AGC.patch"
> - then "make"
> - then "sudo make install"
> - then reboot
> 
> "dmesg |grep compat" gives "Compat-wireless backport release: compat-
> wireless-2010-10-22-5-g69fdc09" so the new module is used.
> 
> On speedtest.net, max speed is ~ 1mbit (on 10 mbit cable internet  <at> 10 meters 
> distance)
> The router reports an improved "Signal Quality", but iwconfig now shows:
> 
> "Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0"
> "Tx excessive retries:2589  Invalid misc:17686   Missed beacon:0"
> 
> Herton: If I make something wrong, can you please post your rtl8187.ko.gz 
> (Mandriva 2010.1 / 2.6.33.7-desktop-2mnb x86_64)?
> 
> Thank you.

Hello, seno.
(Continue reading)

seno | 30 Oct 00:31 2010
Picon

Re: [PATCH] rtl8187b: do not do per packet TX AGC

Thadeu Lima de Souza Cascardo <cascardo <at> ...> writes:

> Perhaps, the problem is related to using compat-wireless. Have you tried
> using the module without the patch, using this same compat-wireless
> version in the same linux version you are using?

Cascardo, you were right :-) Your patch did not cause the problem.
I get those errors also with an unpatched compat-wireless-2010-10-25 driver.

With a patched compat-wireless-2.6.33.6 there occur no errors.

The router reports a better signal quality compared to the unpatched module, but 
I can not really recognize a better throughput - usually still max 1 mbit  <at>  10 
meters.

I noticed that the connection is fast for a short time after booting (10 mbit  <at>  
10 meters), but a few seconds after the download on speedtest.net started 
(meaning the network gets under load), speed drops to 1 mbit and never recovers 
to faster speed again; somehow like an "unrecoverable fallback mechanism"...?

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@...
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Larry Finger | 30 Oct 02:00 2010
Picon

Re: [PATCH] rtl8187b: do not do per packet TX AGC

On 10/29/2010 05:31 PM, seno wrote:
> I noticed that the connection is fast for a short time after booting (10 mbit  <at>  
> 10 meters), but a few seconds after the download on speedtest.net started 
> (meaning the network gets under load), speed drops to 1 mbit and never recovers 
> to faster speed again; somehow like an "unrecoverable fallback mechanism"...?

Is your device overheating?
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@...
More majordomo info at  http://vger.kernel.org/majordomo-info.html

seno | 30 Oct 04:12 2010
Picon

Re: [PATCH] rtl8187b: do not do per packet TX AGC

Larry Finger <Larry.Finger <at> ...> writes:

> Is your device overheating?

I don't think so.

I reduced Tx-Power to 20 dBm (wireless regulatory domain DE).
That doesn't make any difference to 27 dBm (CA) or even 30 dBm (BO).
(Beside that: it performs fine in w7)

In contrast to the unchanged measured performance, web browsing feels 'snappier'
with the patched driver (websites load faster although speed peek never top > 140
kByte/s)

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@...
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Herton Ronaldo Krzesinski | 1 Nov 05:39 2010
Picon

Re: [PATCH] rtl8187b: do not do per packet TX AGC

On 29-10-2010 20:31, seno wrote:
> Thadeu Lima de Souza Cascardo<cascardo <at> ...>  writes:
>
>> Perhaps, the problem is related to using compat-wireless. Have you tried
>> using the module without the patch, using this same compat-wireless
>> version in the same linux version you are using?
>
> Cascardo, you were right :-) Your patch did not cause the problem.
> I get those errors also with an unpatched compat-wireless-2010-10-25 driver.
>
> With a patched compat-wireless-2.6.33.6 there occur no errors.
>
> The router reports a better signal quality compared to the unpatched module, but
> I can not really recognize a better throughput - usually still max 1 mbit  <at>  10
> meters.
>
> I noticed that the connection is fast for a short time after booting (10 mbit  <at> 
> 10 meters), but a few seconds after the download on speedtest.net started
> (meaning the network gets under load), speed drops to 1 mbit and never recovers
> to faster speed again; somehow like an "unrecoverable fallback mechanism"...?

I have seen the throughput issue, but on my tests it wasn't so bad. 
Usually max I got on testing was 24M while close to the AP, and it goes 
into lower speeds when going more far away, but takes a good number of 
meters to go down to 1M.

Anyway of course something isn't right. I started reviewing realtek GPL 
code (their ieee80211 drivers) and code in rtl8187 in the kernel, doing 
many tests and verifying things, trying to understand and check some 
register writes etc. (hard with missing doc or other info).
(Continue reading)

Larry Finger | 1 Nov 17:24 2010
Picon

Re: [PATCH] rtl8187b: do not do per packet TX AGC

On 10/31/2010 11:39 PM, Herton Ronaldo Krzesinski wrote:
> I have seen the throughput issue, but on my tests it wasn't so bad.
> Usually max I got on testing was 24M while close to the AP, and it goes
> into lower speeds when going more far away, but takes a good number of
> meters to go down to 1M.
> 
> Anyway of course something isn't right. I started reviewing realtek GPL
> code (their ieee80211 drivers) and code in rtl8187 in the kernel, doing
> many tests and verifying things, trying to understand and check some
> register writes etc. (hard with missing doc or other info).
> 
> I did some cleanups, and discovered two bad things in the code. After
> the fixes, I can get normal rates (up to 54M close to the AP) without
> issue. I'll soon post the patch series to be included in
> wireless-testing, for now just for test I attach them to be easier (hope
> it isn't stripped by ML, and yes they start on 0003 through 0011 :P),
> check if with it you get better results.
> 
> The patches that matter (shown by my tests) are:
> 0010-rtl8187-remove-uneeded-setting-of-anaparam-write.patch
> 0011-rtl8187-restore-anaparam-registers-after-reset-with-.patch
> 
> but they depend on some previous patches in the series (better apply
> all), and I diffed on a tree with Thadeu's patch applied already. There
> is more cleanups and checking to do, but I probably will submit this
> initial series and later come with more ones, as with this initial
> series the throughput issue should be solved.

Good work. As you noted, patches 3 - 9 did not make any difference in the
transmit throughput. From a distance of 2 m from the AP, my 8187B yielded up to
(Continue reading)

Rogerio Luz Coelho | 3 Nov 04:16 2010
Picon

Re: [PATCH] rtl8187b: do not do per packet TX AGC

Ok I thought I got something wrong when I reviewed the thread I was
reading, this hole thread was in my trash folder (who would figure)

Will post results

Rogerio

2010/11/1 Larry Finger <Larry.Finger@...>:
> On 10/31/2010 11:39 PM, Herton Ronaldo Krzesinski wrote:
>> I have seen the throughput issue, but on my tests it wasn't so bad.
>> Usually max I got on testing was 24M while close to the AP, and it goes
>> into lower speeds when going more far away, but takes a good number of
>> meters to go down to 1M.
>>
>> Anyway of course something isn't right. I started reviewing realtek GPL
>> code (their ieee80211 drivers) and code in rtl8187 in the kernel, doing
>> many tests and verifying things, trying to understand and check some
>> register writes etc. (hard with missing doc or other info).
>>
>> I did some cleanups, and discovered two bad things in the code. After
>> the fixes, I can get normal rates (up to 54M close to the AP) without
>> issue. I'll soon post the patch series to be included in
>> wireless-testing, for now just for test I attach them to be easier (hope
>> it isn't stripped by ML, and yes they start on 0003 through 0011 :P),
>> check if with it you get better results.
>>
>> The patches that matter (shown by my tests) are:
>> 0010-rtl8187-remove-uneeded-setting-of-anaparam-write.patch
>> 0011-rtl8187-restore-anaparam-registers-after-reset-with-.patch
>>
(Continue reading)

Hin-Tak Leung | 4 Nov 15:23 2010
Picon

Re: [PATCH] rtl8187b: do not do per packet TX AGC

On Mon, Nov 1, 2010 at 4:24 PM, Larry Finger <Larry.Finger@...> wrote:
> On 10/31/2010 11:39 PM, Herton Ronaldo Krzesinski wrote:
>> I have seen the throughput issue, but on my tests it wasn't so bad.
>> Usually max I got on testing was 24M while close to the AP, and it goes
>> into lower speeds when going more far away, but takes a good number of
>> meters to go down to 1M.
>>
>> Anyway of course something isn't right. I started reviewing realtek GPL
>> code (their ieee80211 drivers) and code in rtl8187 in the kernel, doing
>> many tests and verifying things, trying to understand and check some
>> register writes etc. (hard with missing doc or other info).
>>
>> I did some cleanups, and discovered two bad things in the code. After
>> the fixes, I can get normal rates (up to 54M close to the AP) without
>> issue. I'll soon post the patch series to be included in
>> wireless-testing, for now just for test I attach them to be easier (hope
>> it isn't stripped by ML, and yes they start on 0003 through 0011 :P),
>> check if with it you get better results.
>>
>> The patches that matter (shown by my tests) are:
>> 0010-rtl8187-remove-uneeded-setting-of-anaparam-write.patch
>> 0011-rtl8187-restore-anaparam-registers-after-reset-with-.patch
>>
>> but they depend on some previous patches in the series (better apply
>> all), and I diffed on a tree with Thadeu's patch applied already. There
>> is more cleanups and checking to do, but I probably will submit this
>> initial series and later come with more ones, as with this initial
>> series the throughput issue should be solved.
>
> Good work. As you noted, patches 3 - 9 did not make any difference in the
(Continue reading)

Re: [PATCH] rtl8187b: do not do per packet TX AGC

On Sat, Aug 28, 2010 at 04:32:48PM -0500, Larry Finger wrote:
> On 08/28/2010 12:54 AM, Thadeu Lima de Souza Cascardo wrote:
> > The code for rtl8187 does not do per packet TX AGC. Resetting the per
> > packet TX AGC for rtl8187b appears to increase its overall TX power.
> > This allows the device to associate and a connection be established
> > using APs a little further away.
> > 
> > Tested-by: Thadeu Lima de Souza Cascardo <cascardo@...>
> > Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@...>
> > Cc: linux-wireless@...
> > Cc: Larry Finger <Larry.Finger@...>
> > Cc: Rogerio Luz Coelho <rogluz.news@...>
> > Cc: Herton Ronaldo Krzesinski <herton@...>
> > Cc: Hin-Tak Leung <hintak.leung@...>
> > ---
> 
> I'm a little confused here. The subject says not to set the per packet TX AGC,
> while the submission text says that setting it helps. I don't have access to any
> documents that describe this register, but I expect that clearing
> RTL818X_TX_AGC_CTL_PERPACKET_GAIN_SHIFT would disable that feature. As a result
> the code change seems to match the subject.

Hello, Larry.

I meant rtl8187 versus rtl8187b, since the driver does that distinction.
You may note that in function rtl8187_start, if priv->is_rtl8187b fails,
it will reset RTL818X_TX_AGC_CTL_PERPACKET_GAIN_SHIFT, just before
writing to TX_CONF. That's why I've decided to do it too before writing
in TX_CONF in the priv->is_rtl8187b true case.

(Continue reading)

John W. Linville | 16 Sep 20:44 2010

Re: [PATCH] rtl8187b: do not do per packet TX AGC

On Mon, Aug 30, 2010 at 12:12:04PM -0300, Thadeu Lima de Souza Cascardo wrote:

> > Until testing, I withhold judgment on the actual code change, but NACK for the
> > inconsistency.
> > 
> 
> I will send another version, clarifying the commit message. Thanks for
> the comments.

Should I still be expecting to see this?

--

-- 
John W. Linville		Someday the world will need a hero, and you
linville@...			might be all we have.  Be ready.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@...
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Gmane