* [PATCH] rtl8187: Fix driver to return TX retry info for RTL8187L
@ 2009-01-23 0:03 Larry Finger
2009-01-23 15:07 ` Hauke Mehrtens
0 siblings, 1 reply; 13+ messages in thread
From: Larry Finger @ 2009-01-23 0:03 UTC (permalink / raw)
To: John W Linville
Cc: Herton Ronaldo Krzesinski, Hin-Tak Leung, barreyromartin,
linux-wireless
Current code for the RTL8187 is not returning valid retry information, =
thus the
rate-setting mechanism is not functioning. As a further complication, t=
his info
is only obtained by reading a register, which cannot be read while in i=
nterrupt
context.
This patch implements the TX status return to mac80211 through the use =
of a
work queue.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Tested-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Tested-by: Mart=C3=ADn Ernesto Barreyro <barreyromartin@gmail.com>
Acked-by: Hin-Tak Leung <htl10@users.sourceforge.net>
---
John,
This patch fixes a long-standing bug for the RTL8187 that has been pres=
ent
since the driver was made to work with mac80211. Technically, it is not=
a
regression, but it would be nice if we could get it into 2.6.29 so that=
it
could be pushed to stable. I have not Cc'd stable as the patch will nee=
d
rebasing to work with 2.6.28, or older.
Larry
---
Index: wireless-testing/drivers/net/wireless/rtl818x/rtl8187.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- wireless-testing.orig/drivers/net/wireless/rtl818x/rtl8187.h
+++ wireless-testing/drivers/net/wireless/rtl818x/rtl8187.h
@@ -100,6 +100,8 @@ struct rtl8187_priv {
struct usb_device *udev;
u32 rx_conf;
struct usb_anchor anchored;
+ struct delayed_work work;
+ struct ieee80211_hw *dev;
u16 txpwr_base;
u8 asic_rev;
u8 is_rtl8187b;
@@ -117,7 +119,7 @@ struct rtl8187_priv {
struct {
__le64 buf;
struct sk_buff_head queue;
- } b_tx_status;
+ } b_tx_status; /* This queue is used by both -b and non-b devices */
};
=20
void rtl8187_write_phy(struct ieee80211_hw *dev, u8 addr, u32 data);
Index: wireless-testing/drivers/net/wireless/rtl818x/rtl8187_dev.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- wireless-testing.orig/drivers/net/wireless/rtl818x/rtl8187_dev.c
+++ wireless-testing/drivers/net/wireless/rtl818x/rtl8187_dev.c
@@ -177,25 +177,33 @@ static void rtl8187_tx_cb(struct urb *ur
sizeof(struct rtl8187_tx_hdr));
ieee80211_tx_info_clear_status(info);
=20
- if (!urb->status &&
- !(info->flags & IEEE80211_TX_CTL_NO_ACK) &&
- priv->is_rtl8187b) {
- skb_queue_tail(&priv->b_tx_status.queue, skb);
-
- /* queue is "full", discard last items */
- while (skb_queue_len(&priv->b_tx_status.queue) > 5) {
- struct sk_buff *old_skb;
-
- dev_dbg(&priv->udev->dev,
- "transmit status queue full\n");
-
- old_skb =3D skb_dequeue(&priv->b_tx_status.queue);
- ieee80211_tx_status_irqsafe(hw, old_skb);
- }
- } else {
- if (!(info->flags & IEEE80211_TX_CTL_NO_ACK) && !urb->status)
+ if (!(urb->status) && !(info->flags & IEEE80211_TX_CTL_NO_ACK)) {
+ if (priv->is_rtl8187b) {
+ skb_queue_tail(&priv->b_tx_status.queue, skb);
+
+ /* queue is "full", discard last items */
+ while (skb_queue_len(&priv->b_tx_status.queue) > 5) {
+ struct sk_buff *old_skb;
+
+ dev_dbg(&priv->udev->dev,
+ "transmit status queue full\n");
+
+ old_skb =3D skb_dequeue(&priv->b_tx_status.queue);
+ ieee80211_tx_status_irqsafe(hw, old_skb);
+ }
+ return;
+ } else {
info->flags |=3D IEEE80211_TX_STAT_ACK;
+ }
+ }
+ if (priv->is_rtl8187b)
ieee80211_tx_status_irqsafe(hw, skb);
+ else {
+ /* Retry information for the RTI8187 is only available by
+ * reading a register in the device. We are in interrupt mode
+ * here, thus queue the skb and finish on a work queue. */
+ skb_queue_tail(&priv->b_tx_status.queue, skb);
+ queue_delayed_work(hw->workqueue, &priv->work, 0);
}
}
=20
@@ -854,6 +862,34 @@ static int rtl8187b_init_hw(struct ieee8
return 0;
}
=20
+static void rtl8187_work(struct work_struct *work)
+{
+ /* The RTL8187 returns the retry count through register 0xFFFA. In
+ * addition, it appears to be a cumulative retry count, not the
+ * value for the current TX packet. When multiple TX entries are
+ * queued, the retry count will be valid for the last one in the queu=
e.
+ * The "error" should not matter for purposes of rate setting. */
+ struct rtl8187_priv *priv =3D container_of(work, struct rtl8187_priv,
+ work.work);
+ struct ieee80211_tx_info *info;
+ struct ieee80211_hw *dev =3D priv->dev;
+ static u16 retry;
+ u16 tmp;
+
+ mutex_lock(&priv->conf_mutex);
+ tmp =3D rtl818x_ioread16(priv, (__le16 *)0xFFFA);
+ while (skb_queue_len(&priv->b_tx_status.queue) > 0) {
+ struct sk_buff *old_skb;
+
+ old_skb =3D skb_dequeue(&priv->b_tx_status.queue);
+ info =3D IEEE80211_SKB_CB(old_skb);
+ info->status.rates[0].count =3D tmp - retry + 1;
+ ieee80211_tx_status_irqsafe(dev, old_skb);
+ }
+ retry =3D tmp;
+ mutex_unlock(&priv->conf_mutex);
+}
+
static int rtl8187_start(struct ieee80211_hw *dev)
{
struct rtl8187_priv *priv =3D dev->priv;
@@ -868,6 +904,7 @@ static int rtl8187_start(struct ieee8021
mutex_lock(&priv->conf_mutex);
=20
init_usb_anchor(&priv->anchored);
+ priv->dev =3D dev;
=20
if (priv->is_rtl8187b) {
reg =3D RTL818X_RX_CONF_MGMT |
@@ -935,6 +972,7 @@ static int rtl8187_start(struct ieee8021
reg |=3D RTL818X_CMD_TX_ENABLE;
reg |=3D RTL818X_CMD_RX_ENABLE;
rtl818x_iowrite8(priv, &priv->map->CMD, reg);
+ INIT_DELAYED_WORK(&priv->work, rtl8187_work);
mutex_unlock(&priv->conf_mutex);
=20
return 0;
@@ -965,6 +1003,8 @@ static void rtl8187_stop(struct ieee8021
dev_kfree_skb_any(skb);
=20
usb_kill_anchored_urbs(&priv->anchored);
+ if (!priv->is_rtl8187b)
+ cancel_delayed_work_sync(&priv->work);
mutex_unlock(&priv->conf_mutex);
}
=20
--
To unsubscribe from this list: send the line "unsubscribe linux-wireles=
s" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [PATCH] rtl8187: Fix driver to return TX retry info for RTL8187L
2009-01-23 0:03 [PATCH] rtl8187: Fix driver to return TX retry info for RTL8187L Larry Finger
@ 2009-01-23 15:07 ` Hauke Mehrtens
2009-01-23 15:31 ` John W. Linville
2009-01-23 15:34 ` [PATCH] rtl8187: Fix driver to return TX retry info " Larry Finger
0 siblings, 2 replies; 13+ messages in thread
From: Hauke Mehrtens @ 2009-01-23 15:07 UTC (permalink / raw)
To: Larry Finger
Cc: John W Linville, Herton Ronaldo Krzesinski, Hin-Tak Leung,
barreyromartin, linux-wireless
[-- Attachment #1: Type: text/plain, Size: 1084 bytes --]
Larry Finger wrote:
> Current code for the RTL8187 is not returning valid retry information, thus the
> rate-setting mechanism is not functioning. As a further complication, this info
> is only obtained by reading a register, which cannot be read while in interrupt
> context.
>
> This patch implements the TX status return to mac80211 through the use of a
> work queue.
>
> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
> Tested-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
> Tested-by: Martín Ernesto Barreyro <barreyromartin@gmail.com>
> Acked-by: Hin-Tak Leung <htl10@users.sourceforge.net>
I have tested this patch in compat-wireless-2009-01-23 (kernel 2.6.27,
ubuntu) with my rtl8187 card (build on Asus P5B Delux Wifi, 0bda:8187
Realtek Semiconductor Corp. RTL8187 Wireless Adapter) and for me it does
not work.
With this patch I get a connection to the AP, but the bandwidth is very
low. After a reboot it was connected to the AP, but the connection was
unusable for me, no traffic went through the connection at all.
Hauke
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 898 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] rtl8187: Fix driver to return TX retry info for RTL8187L
2009-01-23 15:07 ` Hauke Mehrtens
@ 2009-01-23 15:31 ` John W. Linville
2009-01-24 12:12 ` Hauke Mehrtens
2009-01-23 15:34 ` [PATCH] rtl8187: Fix driver to return TX retry info " Larry Finger
1 sibling, 1 reply; 13+ messages in thread
From: John W. Linville @ 2009-01-23 15:31 UTC (permalink / raw)
To: Hauke Mehrtens
Cc: Larry Finger, Herton Ronaldo Krzesinski, Hin-Tak Leung,
barreyromartin, linux-wireless
On Fri, Jan 23, 2009 at 04:07:37PM +0100, Hauke Mehrtens wrote:
> Larry Finger wrote:
> > Current code for the RTL8187 is not returning valid retry informati=
on, thus the
> > rate-setting mechanism is not functioning. As a further complicatio=
n, this info
> > is only obtained by reading a register, which cannot be read while =
in interrupt
> > context.
> >=20
> > This patch implements the TX status return to mac80211 through the =
use of a
> > work queue.
> >=20
> > Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
> > Tested-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
> > Tested-by: Mart=EDn Ernesto Barreyro <barreyromartin@gmail.com>
> > Acked-by: Hin-Tak Leung <htl10@users.sourceforge.net>
>=20
> I have tested this patch in compat-wireless-2009-01-23 (kernel 2.6.27=
,
> ubuntu) with my rtl8187 card (build on Asus P5B Delux Wifi, 0bda:8187
> Realtek Semiconductor Corp. RTL8187 Wireless Adapter) and for me it d=
oes
> not work.
>=20
> With this patch I get a connection to the AP, but the bandwidth is ve=
ry
> low. After a reboot it was connected to the AP, but the connection wa=
s
> unusable for me, no traffic went through the connection at all.
Just curious if you tried limiting the rate to 11Mb as Larry said
someone else had done? Did that work any better?
John
--=20
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireles=
s" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] rtl8187: Fix driver to return TX retry info for RTL8187L
2009-01-23 15:31 ` John W. Linville
@ 2009-01-24 12:12 ` Hauke Mehrtens
2009-01-24 17:45 ` Larry Finger
` (3 more replies)
0 siblings, 4 replies; 13+ messages in thread
From: Hauke Mehrtens @ 2009-01-24 12:12 UTC (permalink / raw)
To: John W. Linville
Cc: Larry Finger, Herton Ronaldo Krzesinski, Hin-Tak Leung,
barreyromartin, linux-wireless
[-- Attachment #1: Type: text/plain, Size: 1116 bytes --]
John W. Linville wrote:
> Just curious if you tried limiting the rate to 11Mb as Larry said
> someone else had done? Did that work any better?
>
> John
I did some more testing with and without the patch. With the patch it
works when the rate is limited to 11M with pid and with minstrel
algorithm. Without this limitation it works only with pid.
Without this patch it also works with the limiting the rate to 11M with
both rate control algorithms, but with minstrel it also works without
limiting the rate.
Without the patch, without limiting the rate and with minstrel iwconfig
reports a rate of 1Mb/s, but I get 3Mb/s with wget, properly an other
bug. With pid the rate goes up to 54Mb/s and it does not work.
With the patch, without limiting the rate and with minstrel iwconfig
reports a rate of 24Mb/s and it does not work. With pid it starts with
1Mb/s and the connection is stable. The rate is changing between 1mb/s,
2Mb/s, 5.5Mb/s and 9Mb/s.
I will do more testing with pid and with this patch.
I have tested with compat-wireless-2009-01-24 and reversed the patch.
Hauke
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 898 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [PATCH] rtl8187: Fix driver to return TX retry info for RTL8187L
2009-01-24 12:12 ` Hauke Mehrtens
@ 2009-01-24 17:45 ` Larry Finger
2009-01-25 16:55 ` Larry Finger
` (2 subsequent siblings)
3 siblings, 0 replies; 13+ messages in thread
From: Larry Finger @ 2009-01-24 17:45 UTC (permalink / raw)
To: Hauke Mehrtens
Cc: John W. Linville, Herton Ronaldo Krzesinski, Hin-Tak Leung,
barreyromartin, linux-wireless
Hauke Mehrtens wrote:
> I did some more testing with and without the patch. With the patch it
> works when the rate is limited to 11M with pid and with minstrel
> algorithm. Without this limitation it works only with pid.
Of course, when you set a manual rate, the rate-setting method is
immaterial.
> Without this patch it also works with the limiting the rate to 11M with
> both rate control algorithms, but with minstrel it also works without
> limiting the rate.
Without the patch, minstrel is internally limited to 1 Mb/s TX rate.
> Without the patch, without limiting the rate and with minstrel iwconfig
> reports a rate of 1Mb/s, but I get 3Mb/s with wget, properly an other
> bug. With pid the rate goes up to 54Mb/s and it does not work.
The rate reported by iwconfig is for TX. The throughput from wget is
dependent on the TX rate of the AP. This info is useful, but the rates
from wput, or any other transmitting program, are more instructive to
find TX problems.
> With the patch, without limiting the rate and with minstrel iwconfig
> reports a rate of 24Mb/s and it does not work. With pid it starts with
> 1Mb/s and the connection is stable. The rate is changing between 1mb/s,
> 2Mb/s, 5.5Mb/s and 9Mb/s.
Please submit your rc_stats data for the minstrel case.
It is obvious that the RTL8187L does not do as well as other wireless
chips in low S/N conditions. It is also possible that some flavors of
the chips are better than others. In my Netgear WG111v2 with the patch
and using the minstrel algorithm, I get a TX rate between 21 and 22
Mb/s as measured with tcpperf at a distance of 2 m from my AP. The
rate reported by iwconfig is 54 Mb/s. When I move to ~15 m from the
AP, the rate falls off to ~12 Mb/s with iwconfig reporting 24-48 Mb/s.
At 20 m, the connection is essentially unusable - sounds like yours
the iwconfig rate is 24 Mb/s.
We are clearly flying blind here as we do not have a data sheet for
the RTL8187L. I got some help from the Realtek engineer regarding the
retry info, but that is the limit of my info. I do have what I think
is the latest version of the vendor driver, and I will compare the
power setting code with theirs.
The patch definitely helps my device as long as the reported signal
level is above -60 dBm. With lower signals, then it doesn't work very
well. Your device must be in that range.
Larry
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [PATCH] rtl8187: Fix driver to return TX retry info for RTL8187L
2009-01-24 12:12 ` Hauke Mehrtens
2009-01-24 17:45 ` Larry Finger
@ 2009-01-25 16:55 ` Larry Finger
2009-01-26 1:36 ` [RFT] rtl8187: Fix OFDM power settings " Larry Finger
2009-01-26 3:19 ` [RFT V2] " Larry Finger
3 siblings, 0 replies; 13+ messages in thread
From: Larry Finger @ 2009-01-25 16:55 UTC (permalink / raw)
To: Hauke Mehrtens
Cc: John W. Linville, Herton Ronaldo Krzesinski, Hin-Tak Leung,
barreyromartin, linux-wireless
Hauke,
What does 'dmesg | grep rtl' show for your device?
Larry
^ permalink raw reply [flat|nested] 13+ messages in thread
* [RFT] rtl8187: Fix OFDM power settings for RTL8187L
2009-01-24 12:12 ` Hauke Mehrtens
2009-01-24 17:45 ` Larry Finger
2009-01-25 16:55 ` Larry Finger
@ 2009-01-26 1:36 ` Larry Finger
2009-01-26 3:19 ` [RFT V2] " Larry Finger
3 siblings, 0 replies; 13+ messages in thread
From: Larry Finger @ 2009-01-26 1:36 UTC (permalink / raw)
To: Hauke Mehrtens
Cc: John W. Linville, Herton Ronaldo Krzesinski, Hin-Tak Leung,
barreyromartin, linux-wireless
Hauke,
Please apply this patch on top of current wireless-testing, or
compat-wireless.
Larry
====================
After reports of poor performance, a review of the latest vendor
driver (rtl8187_linux_26.1025.0328.2007) for RTL8187L devices was
undertaken.
A difference was found in the code used to index the OFDM power
tables. When the Linux driver was changed, my unit works at a much
greater range than before.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
---
Index: wireless-testing/drivers/net/wireless/rtl818x/rtl8187_rtl8225.c
===================================================================
--- wireless-testing.orig/drivers/net/wireless/rtl818x/rtl8187_rtl8225.c
+++ wireless-testing/drivers/net/wireless/rtl818x/rtl8187_rtl8225.c
@@ -536,7 +536,10 @@ static void rtl8225z2_rf_set_tx_power(st
cck_power += priv->txpwr_base & 0xF;
cck_power = min(cck_power, (u8)35);
- ofdm_power = min(ofdm_power, (u8)15);
+ if (ofdm_power > (u8)15)
+ ofdm_power = 25;
+ else
+ ofdm_power += 10;
ofdm_power += priv->txpwr_base >> 4;
ofdm_power = min(ofdm_power, (u8)35);
^ permalink raw reply [flat|nested] 13+ messages in thread
* [RFT V2] rtl8187: Fix OFDM power settings for RTL8187L
2009-01-24 12:12 ` Hauke Mehrtens
` (2 preceding siblings ...)
2009-01-26 1:36 ` [RFT] rtl8187: Fix OFDM power settings " Larry Finger
@ 2009-01-26 3:19 ` Larry Finger
2009-01-27 19:24 ` Hauke Mehrtens
3 siblings, 1 reply; 13+ messages in thread
From: Larry Finger @ 2009-01-26 3:19 UTC (permalink / raw)
To: Hauke Mehrtens
Cc: John W. Linville, Herton Ronaldo Krzesinski, Hin-Tak Leung,
barreyromartin, linux-wireless
Hauke,
Please apply this patch on top of current wireless-testing, or
compat-wireless.
V1 only did one of the two kinds of radios.
Larry
====================
After reports of poor performance, a review of the latest vendor
driver (rtl8187_linux_26.1025.0328.2007) for RTL8187L devices was
undertaken.
A difference was found in the code used to index the OFDM power
tables. When the Linux driver was changed, my unit works at a much
greater range than before.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
---
Index: wireless-testing/drivers/net/wireless/rtl818x/rtl8187_rtl8225.c
===================================================================
--- wireless-testing.orig/drivers/net/wireless/rtl818x/rtl8187_rtl8225.c
+++ wireless-testing/drivers/net/wireless/rtl818x/rtl8187_rtl8225.c
@@ -285,6 +285,10 @@ static void rtl8225_rf_set_tx_power(stru
ofdm_power = priv->channels[channel - 1].hw_value >> 4;
cck_power = min(cck_power, (u8)11);
+ if (ofdm_power > (u8)15)
+ ofdm_power = 25;
+ else
+ ofdm_power += 10;
ofdm_power = min(ofdm_power, (u8)35);
rtl818x_iowrite8(priv, &priv->map->TX_GAIN_CCK,
@@ -536,7 +540,10 @@ static void rtl8225z2_rf_set_tx_power(st
cck_power += priv->txpwr_base & 0xF;
cck_power = min(cck_power, (u8)35);
- ofdm_power = min(ofdm_power, (u8)15);
+ if (ofdm_power > (u8)15)
+ ofdm_power = 25;
+ else
+ ofdm_power += 10;
ofdm_power += priv->txpwr_base >> 4;
ofdm_power = min(ofdm_power, (u8)35);
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [RFT V2] rtl8187: Fix OFDM power settings for RTL8187L
2009-01-26 3:19 ` [RFT V2] " Larry Finger
@ 2009-01-27 19:24 ` Hauke Mehrtens
2009-01-27 19:41 ` Hin-Tak Leung
2009-01-27 20:00 ` Larry Finger
0 siblings, 2 replies; 13+ messages in thread
From: Hauke Mehrtens @ 2009-01-27 19:24 UTC (permalink / raw)
To: Larry Finger
Cc: John W. Linville, Herton Ronaldo Krzesinski, Hin-Tak Leung,
barreyromartin, linux-wireless
[-- Attachment #1: Type: text/plain, Size: 1321 bytes --]
Larry Finger wrote:
> Hauke,
>
> Please apply this patch on top of current wireless-testing, or
> compat-wireless.
>
> V1 only did one of the two kinds of radios.
>
> Larry
Hi Larry,
With this patch included and pid the rate goes up to 24Mb/s, but the
connection is stable. Without this patch is is only up to 11Mb/s. The
connection is still unusable with minstrel, it goes up too fare. It
starts with 24Mb/s and the connection drops. After some time it goes up
to 54Mb/s, but then it goes down again and the connection is working
again for a minute till the procedure begins again.
What do you mean with rc_stats ?
Complete iwconfig output with minstrel (No connection):
wlan0 IEEE 802.11bg ESSID:"mehrtenswlan"
Mode:Managed Frequency:2.412 GHz Access Point:
00:1A:92:EA:73:12
Bit Rate=48 Mb/s Tx-Power=27 dBm
Retry min limit:7 RTS thr:off Fragment thr=2352 B
Power Management:off
Link Quality=57/100 Signal level:-52 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
dmesg |fgrep rtl shows the following:
phy0: hwaddr ffff8801399ac080, RTL8187vB (default) V1 + rtl8225z2
usbcore: registered new interface driver rtl8187
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 898 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [RFT V2] rtl8187: Fix OFDM power settings for RTL8187L
2009-01-27 19:24 ` Hauke Mehrtens
@ 2009-01-27 19:41 ` Hin-Tak Leung
2009-01-27 20:00 ` Larry Finger
1 sibling, 0 replies; 13+ messages in thread
From: Hin-Tak Leung @ 2009-01-27 19:41 UTC (permalink / raw)
To: Larry Finger, Hauke Mehrtens
Cc: John W. Linville, Herton Ronaldo Krzesinski, barreyromartin,
linux-wireless
--- On Tue, 27/1/09, Hauke Mehrtens <hauke@hauke-m.de> wrote:
> Hi Larry,
>
> With this patch included and pid the rate goes up to
> 24Mb/s, but the
> connection is stable. Without this patch is is only up to
> 11Mb/s. The
> connection is still unusable with minstrel, it goes up too
> fare. It
> starts with 24Mb/s and the connection drops. After some
> time it goes up
> to 54Mb/s, but then it goes down again and the connection
> is working
> again for a minute till the procedure begins again.
>
> What do you mean with rc_stats ?
if you have mac80211 debug switched on,
cat /sys/kernel/debug/ieee80211/phyXX/stations/<MAC ADDR>/rc_stats
shows some rc_stats info... where XX and <MAC_ADDRESS> differs depending on your config/setup.
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [RFT V2] rtl8187: Fix OFDM power settings for RTL8187L
2009-01-27 19:24 ` Hauke Mehrtens
2009-01-27 19:41 ` Hin-Tak Leung
@ 2009-01-27 20:00 ` Larry Finger
2009-01-30 21:28 ` Hauke Mehrtens
1 sibling, 1 reply; 13+ messages in thread
From: Larry Finger @ 2009-01-27 20:00 UTC (permalink / raw)
To: Hauke Mehrtens
Cc: John W. Linville, Herton Ronaldo Krzesinski, Hin-Tak Leung,
barreyromartin, linux-wireless
Hauke Mehrtens wrote:
> With this patch included and pid the rate goes up to 24Mb/s, but the
> connection is stable. Without this patch is is only up to 11Mb/s. The
> connection is still unusable with minstrel, it goes up too fare. It
> starts with 24Mb/s and the connection drops. After some time it goes up
> to 54Mb/s, but then it goes down again and the connection is working
> again for a minute till the procedure begins again.
>
> What do you mean with rc_stats ?
The statistics for the mistrel algorithn are presented in the /sys
tree in a file named rc_stats. The easy way to see that data is to do
the following:
STATS=$(find /sys -name rc_stats)
sudo cat $STATS
You will get output that looks like
rate throughput ewma prob this prob this succ/attempt
success attempts
1 0.9 99.9 100.0 0( 0) 855
873
2 1.8 95.7 100.0 0( 0) 11
11
P 5.5 5.0 99.9 100.0 0( 0) 77
77
11 9.1 95.9 100.0 0( 0) 14
16
6 5.4 95.6 100.0 0( 0) 16
19
9 8.0 95.7 100.0 0( 0) 11
11
12 10.6 95.7 100.0 0( 0) 11
11
18 15.5 95.7 100.0 0( 0) 11
11
24 20.4 96.0 100.0 0( 0) 276
279
36 5.9 96.0 100.0 0( 0) 76
78
t 48 6.5 76.5 100.0 0( 0) 2958
3034
T 54 20.0 99.9 100.0 1( 1) 6220
6400
Total packet count:: ideal 9216 lookaround 485
These data are for my RTL8187, which is running at 54 Mb/s (the line
with the T) and the success rate at this speed is 6220/6400 (97%).
Let the mistrel method go through several of those cycles that you
mention and then dump and post this table. Perhaps the experts will
see what is wrong.
Larry
Larry
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [RFT V2] rtl8187: Fix OFDM power settings for RTL8187L
2009-01-27 20:00 ` Larry Finger
@ 2009-01-30 21:28 ` Hauke Mehrtens
0 siblings, 0 replies; 13+ messages in thread
From: Hauke Mehrtens @ 2009-01-30 21:28 UTC (permalink / raw)
To: Larry Finger
Cc: John W. Linville, Herton Ronaldo Krzesinski, Hin-Tak Leung,
barreyromartin, linux-wireless
[-- Attachment #1: Type: text/plain, Size: 10741 bytes --]
Larry Finger schrieb:
> Hauke Mehrtens wrote:
>> With this patch included and pid the rate goes up to 24Mb/s, but the
>> connection is stable. Without this patch is is only up to 11Mb/s. The
>> connection is still unusable with minstrel, it goes up too fare. It
>> starts with 24Mb/s and the connection drops. After some time it goes up
>> to 54Mb/s, but then it goes down again and the connection is working
>> again for a minute till the procedure begins again.
>>
>> What do you mean with rc_stats ?
>
> The statistics for the mistrel algorithn are presented in the /sys
> tree in a file named rc_stats. The easy way to see that data is to do
> the following:
>
> STATS=$(find /sys -name rc_stats)
> sudo cat $STATS
>
> You will get output that looks like
>
> rate throughput ewma prob this prob this succ/attempt
> success attempts
> 1 0.9 99.9 100.0 0( 0) 855
> 873
> 2 1.8 95.7 100.0 0( 0) 11
> 11
> P 5.5 5.0 99.9 100.0 0( 0) 77
> 77
> 11 9.1 95.9 100.0 0( 0) 14
> 16
> 6 5.4 95.6 100.0 0( 0) 16
> 19
> 9 8.0 95.7 100.0 0( 0) 11
> 11
> 12 10.6 95.7 100.0 0( 0) 11
> 11
> 18 15.5 95.7 100.0 0( 0) 11
> 11
> 24 20.4 96.0 100.0 0( 0) 276
> 279
> 36 5.9 96.0 100.0 0( 0) 76
> 78
> t 48 6.5 76.5 100.0 0( 0) 2958
> 3034
> T 54 20.0 99.9 100.0 1( 1) 6220
> 6400
>
> Total packet count:: ideal 9216 lookaround 485
>
> These data are for my RTL8187, which is running at 54 Mb/s (the line
> with the T) and the success rate at this speed is 6220/6400 (97%).
>
> Let the mistrel method go through several of those cycles that you
> mention and then dump and post this table. Perhaps the experts will
> see what is wrong.
>
> Larry
Hi Larry,
I captured the rc_stats for my rtl8187 device. These stats are created with kernel
2.6.29-rc3-wl (master-2009-01-28). I tried to get traffic through the link, but I was almost
dead. Most of the time it showed me 54Mb/s in iwconfig.
Hauke
hauke@hauke-desktop:~/kamikaze/openwrt5$ sudo cat $STATS
rate throughput ewma prob this prob this succ/attempt success attempts
1 0.2 25.0 100.0 0( 0) 1 1
2 0.0 3.1 12.5 0( 0) 1 8
5.5 1.2 25.0 100.0 0( 0) 1 1
P 11 5.5 57.8 12.5 0( 0) 3924 4064
6 1.4 25.0 100.0 0( 0) 1 1
9 2.1 25.0 100.0 0( 0) 1 1
12 2.7 25.0 100.0 0( 0) 1 1
18 2.0 12.5 50.0 0( 0) 1 2
24 5.3 25.0 100.0 0( 0) 1 1
t 36 6.8 22.3 12.5 0( 0) 6 34
T 48 9.1 23.3 12.5 1( 8) 27 190
54 1.3 3.1 12.5 0( 0) 1 8
Total packet count:: ideal 212 lookaround 11
hauke@hauke-desktop:~/kamikaze/openwrt5$ sudo cat $STATS
rate throughput ewma prob this prob this succ/attempt success attempts
1 0.2 25.0 100.0 0( 0) 1 1
2 0.0 3.1 12.5 0( 0) 1 8
5.5 1.2 25.0 100.0 0( 0) 1 1
P 11 5.5 57.8 12.5 0( 0) 3924 4064
6 1.4 25.0 100.0 0( 0) 1 1
9 2.1 25.0 100.0 0( 0) 1 1
12 2.7 25.0 100.0 0( 0) 1 1
18 2.0 12.5 50.0 0( 0) 1 2
24 5.3 25.0 100.0 0( 0) 1 1
t 36 5.8 19.2 10.0 0( 0) 7 44
T 48 6.0 15.4 12.5 1( 8) 36 273
54 1.3 3.1 12.5 0( 0) 1 8
Total packet count:: ideal 222 lookaround 11
hauke@hauke-desktop:~/kamikaze/openwrt5$ sudo cat $STATS
rate throughput ewma prob this prob this succ/attempt success attempts
1 0.2 25.0 100.0 0( 0) 1 1
2 0.1 5.4 12.5 0( 0) 2 16
5.5 1.2 25.0 100.0 0( 0) 1 1
P 11 4.4 46.4 12.5 0( 0) 3925 4072
6 1.4 25.0 100.0 0( 0) 1 1
9 2.1 25.0 100.0 0( 0) 1 1
12 2.7 25.0 100.0 0( 0) 1 1
18 2.0 12.5 12.5 0( 0) 2 10
24 4.6 21.8 12.5 0( 0) 2 9
t 36 4.6 15.3 12.5 0( 0) 11 76
T 48 6.4 16.3 12.5 1( 8) 83 649
54 1.3 3.1 12.5 0( 0) 1 8
Total packet count:: ideal 274 lookaround 14
hauke@hauke-desktop:~/kamikaze/openwrt5$ sudo cat $STATS
rate throughput ewma prob this prob this succ/attempt success attempts
1 0.1 17.7 12.5 0( 0) 4 25
2 0.3 16.6 50.0 0( 0) 3 18
5.5 1.9 39.6 100.0 0( 0) 4 18
11 3.0 31.6 12.5 0( 0) 3927 4088
6 0.9 17.4 12.5 0( 0) 4 27
9 1.4 17.7 12.5 0( 0) 4 25
12 4.6 41.9 100.0 0( 0) 4 14
P 18 7.9 48.8 12.5 0( 0) 120 206
24 7.4 34.7 12.5 0( 0) 133 418
T 36 11.6 38.1 12.5 1( 8) 21 135
48 5.3 13.6 12.5 0( 0) 217 1684
t 54 8.3 19.2 12.5 0( 0) 139 963
Total packet count:: ideal 793 lookaround 41
hauke@hauke-desktop:~/kamikaze/openwrt5$ sudo cat $STATS
rate throughput ewma prob this prob this succ/attempt success attempts
1 0.1 17.7 12.5 0( 0) 4 25
2 0.3 16.6 50.0 0( 0) 3 18
5.5 1.9 39.6 100.0 0( 0) 4 18
11 3.0 31.6 12.5 0( 0) 3927 4088
6 0.9 17.4 12.5 0( 0) 4 27
9 1.4 17.7 12.5 0( 0) 4 25
12 4.6 41.9 100.0 0( 0) 4 14
P 18 7.9 48.8 12.5 0( 0) 120 206
24 7.4 34.7 12.5 0( 0) 133 418
T 36 11.6 38.1 12.5 1( 8) 21 135
48 5.3 13.6 12.5 0( 0) 217 1684
t 54 8.3 19.2 12.5 0( 0) 139 963
Total packet count:: ideal 793 lookaround 41
hauke@hauke-desktop:~/kamikaze/openwrt5$ sudo cat $STATS
rate throughput ewma prob this prob this succ/attempt success attempts
1 0.1 17.7 12.5 0( 0) 4 25
2 0.7 37.4 100.0 0( 0) 4 19
5.5 1.9 39.6 100.0 0( 0) 4 18
11 2.5 26.8 12.5 0( 0) 3928 4096
6 0.9 17.4 12.5 0( 0) 4 27
9 1.4 17.7 12.5 0( 0) 4 25
P 12 4.6 41.9 100.0 0( 0) 4 14
18 5.5 33.8 12.5 0( 0) 124 229
24 5.3 25.0 12.5 0( 0) 136 442
t 36 5.8 19.3 12.5 0( 0) 33 224
48 5.3 13.6 12.5 0( 0) 217 1684
T 54 6.7 15.5 12.5 1( 8) 153 1061
Total packet count:: ideal 826 lookaround 43
hauke@hauke-desktop:~/kamikaze/openwrt5$ sudo cat $STATS
rate throughput ewma prob this prob this succ/attempt success attempts
tP 1 0.7 81.8 50.0 0( 0) 21 23
2 0.0 0.0 0.0 0( 0) 0 0
5.5 0.0 0.0 0.0 0( 0) 0 0
11 0.0 0.0 0.0 0( 0) 0 0
6 0.0 0.0 0.0 0( 0) 0 0
9 0.0 0.0 0.0 0( 0) 0 0
12 0.0 0.0 0.0 0( 0) 0 0
18 0.0 0.0 0.0 0( 0) 0 0
24 0.0 0.0 0.0 0( 0) 0 0
T 36 4.5 14.8 12.5 1( 8) 15 106
48 0.0 0.0 0.0 0( 0) 0 0
54 0.0 0.0 0.0 0( 0) 0 0
Total packet count:: ideal 36 lookaround 1
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 898 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] rtl8187: Fix driver to return TX retry info for RTL8187L
2009-01-23 15:07 ` Hauke Mehrtens
2009-01-23 15:31 ` John W. Linville
@ 2009-01-23 15:34 ` Larry Finger
1 sibling, 0 replies; 13+ messages in thread
From: Larry Finger @ 2009-01-23 15:34 UTC (permalink / raw)
To: Hauke Mehrtens
Cc: John W Linville, Herton Ronaldo Krzesinski, Hin-Tak Leung,
barreyromartin, linux-wireless
Hauke Mehrtens wrote:
>
> I have tested this patch in compat-wireless-2009-01-23 (kernel 2.6.27,
> ubuntu) with my rtl8187 card (build on Asus P5B Delux Wifi, 0bda:8187
> Realtek Semiconductor Corp. RTL8187 Wireless Adapter) and for me it does
> not work.
>
> With this patch I get a connection to the AP, but the bandwidth is very
> low. After a reboot it was connected to the AP, but the connection was
> unusable for me, no traffic went through the connection at all.
What is your status without this patch? Is your connection stable at 1
Mb/s?
With the patch, what rate did iwconfig report, and which rate-setting
algorithm are you using?
Larry
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2009-01-30 21:28 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-23 0:03 [PATCH] rtl8187: Fix driver to return TX retry info for RTL8187L Larry Finger
2009-01-23 15:07 ` Hauke Mehrtens
2009-01-23 15:31 ` John W. Linville
2009-01-24 12:12 ` Hauke Mehrtens
2009-01-24 17:45 ` Larry Finger
2009-01-25 16:55 ` Larry Finger
2009-01-26 1:36 ` [RFT] rtl8187: Fix OFDM power settings " Larry Finger
2009-01-26 3:19 ` [RFT V2] " Larry Finger
2009-01-27 19:24 ` Hauke Mehrtens
2009-01-27 19:41 ` Hin-Tak Leung
2009-01-27 20:00 ` Larry Finger
2009-01-30 21:28 ` Hauke Mehrtens
2009-01-23 15:34 ` [PATCH] rtl8187: Fix driver to return TX retry info " Larry Finger
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).