* [PATCH] rt2x00: Disable link tuning in rt2500usb
@ 2008-08-03 14:57 Ivo van Doorn
2008-08-03 18:13 ` Stefanik Gábor
2008-08-03 21:36 ` [PATCH v2] " Ivo van Doorn
0 siblings, 2 replies; 4+ messages in thread
From: Ivo van Doorn @ 2008-08-03 14:57 UTC (permalink / raw)
To: John W. Linville; +Cc: linux-wireless, rt2400-devel
In the legacy rt2570 driver the link tuner was never
really called. And now the reason has finally become
apparent: It breaks TX capabilities
As soon as the device has been associated all following
TX frames will be queued in the hardware and never transmitted
to the air. Disabling sections of the link tuner did not
have the expected result, but completely disabling the
link tuner did have the right result (Both of my rt2570 devices
came back to life).
This should fix Fedora bug: 411481
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
---
John, please queue for 2.6.27 this fixes rt2500usb. :)
drivers/net/wireless/rt2x00/rt2500usb.c | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/drivers/net/wireless/rt2x00/rt2500usb.c b/drivers/net/wireless/rt2x00/rt2500usb.c
index c6f6eb6..5e6383d 100644
--- a/drivers/net/wireless/rt2x00/rt2500usb.c
+++ b/drivers/net/wireless/rt2x00/rt2500usb.c
@@ -633,6 +633,16 @@ static void rt2500usb_reset_tuner(struct rt2x00_dev *rt2x00dev)
rt2x00dev->link.vgc_level = value;
}
+/*
+ * NOTE: This function is directly ported from legacy driver, but
+ * despite it being declared it was never called. Although link tuning
+ * sounds like a good idea, and usually works well for the other drivers,
+ * it does _not_ work with rt2500usb. Enabling this function will result
+ * in TX capabilities only untill association kicks in. Immediately
+ * after the successfull association all TX frames will be kept in the
+ * hardware queue and never transmitted.
+ */
+#if 0
static void rt2500usb_link_tuner(struct rt2x00_dev *rt2x00dev)
{
int rssi = rt2x00_get_link_rssi(&rt2x00dev->link);
@@ -752,6 +762,9 @@ dynamic_cca_tune:
rt2x00dev->link.vgc_level = r17;
}
}
+#else
+#define rt2500usb_link_tuner NULL
+#endif
/*
* Initialization functions.
@@ -1737,6 +1750,7 @@ static int rt2500usb_probe_hw(struct rt2x00_dev *rt2x00dev)
__set_bit(DRIVER_REQUIRE_ATIM_QUEUE, &rt2x00dev->flags);
__set_bit(DRIVER_REQUIRE_BEACON_GUARD, &rt2x00dev->flags);
__set_bit(DRIVER_REQUIRE_SCHEDULED, &rt2x00dev->flags);
+ __set_bit(CONFIG_DISABLE_LINK_TUNING, &rt2x00dev->flags);
/*
* Set the rssi offset.
--
1.5.6.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] rt2x00: Disable link tuning in rt2500usb
2008-08-03 14:57 [PATCH] rt2x00: Disable link tuning in rt2500usb Ivo van Doorn
@ 2008-08-03 18:13 ` Stefanik Gábor
2008-08-03 21:34 ` Ivo van Doorn
2008-08-03 21:36 ` [PATCH v2] " Ivo van Doorn
1 sibling, 1 reply; 4+ messages in thread
From: Stefanik Gábor @ 2008-08-03 18:13 UTC (permalink / raw)
To: Ivo van Doorn; +Cc: John W. Linville, linux-wireless, rt2400-devel
On Sun, Aug 3, 2008 at 4:57 PM, Ivo van Doorn <ivdoorn@gmail.com> wrote:
> + * in TX capabilities only untill association kicks in. Immediately
typo - until
> + * after the successfull association all TX frames will be kept in the
typo - successful
--
Vista: [V]iruses, [I]ntruders, [S]pyware, [T]rojans and [A]dware. :-)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] rt2x00: Disable link tuning in rt2500usb
2008-08-03 18:13 ` Stefanik Gábor
@ 2008-08-03 21:34 ` Ivo van Doorn
0 siblings, 0 replies; 4+ messages in thread
From: Ivo van Doorn @ 2008-08-03 21:34 UTC (permalink / raw)
To: Stefanik Gábor; +Cc: John W. Linville, linux-wireless, rt2400-devel
On Sunday 03 August 2008, Stefanik G=E1bor wrote:
> On Sun, Aug 3, 2008 at 4:57 PM, Ivo van Doorn <ivdoorn@gmail.com> wro=
te:
> > + * in TX capabilities only untill association kicks in. Immediatel=
y
>=20
> typo - until
>=20
> > + * after the successfull association all TX frames will be kept in=
the
>=20
> typo - successful
Thanks, v2 coming up. :)
Ivo
--
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] 4+ messages in thread
* [PATCH v2] rt2x00: Disable link tuning in rt2500usb
2008-08-03 14:57 [PATCH] rt2x00: Disable link tuning in rt2500usb Ivo van Doorn
2008-08-03 18:13 ` Stefanik Gábor
@ 2008-08-03 21:36 ` Ivo van Doorn
1 sibling, 0 replies; 4+ messages in thread
From: Ivo van Doorn @ 2008-08-03 21:36 UTC (permalink / raw)
To: John W. Linville; +Cc: linux-wireless, rt2400-devel, Stefanik Gábor
>From 921724b82bebfbfe4b4f70940bba748923738cb4 Mon Sep 17 00:00:00 2001
From: Ivo van Doorn <IvDoorn@gmail.com>
Date: Sun, 3 Aug 2008 15:34:53 +0200
Subject: [PATCH] rt2x00: Disable link tuning in rt2500usb
In the legacy rt2570 driver the link tuner was never
really called. And now the reason has finally become
apparent: It breaks TX capabilities
As soon as the device has been associated all following
TX frames will be queued in the hardware and never transmitted
to the air. Disabling sections of the link tuner did not
have the expected result, but completely disabling the
link tuner did have the right result (Both of my rt2570 devices
came back to life).
This should fix Fedora bug: 411481
v2: Fix typos
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
---
drivers/net/wireless/rt2x00/rt2500usb.c | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/drivers/net/wireless/rt2x00/rt2500usb.c b/drivers/net/wireless/rt2x00/rt2500usb.c
index c6f6eb6..5e6383d 100644
--- a/drivers/net/wireless/rt2x00/rt2500usb.c
+++ b/drivers/net/wireless/rt2x00/rt2500usb.c
@@ -633,6 +633,16 @@ static void rt2500usb_reset_tuner(struct rt2x00_dev *rt2x00dev)
rt2x00dev->link.vgc_level = value;
}
+/*
+ * NOTE: This function is directly ported from legacy driver, but
+ * despite it being declared it was never called. Although link tuning
+ * sounds like a good idea, and usually works well for the other drivers,
+ * it does _not_ work with rt2500usb. Enabling this function will result
+ * in TX capabilities only until association kicks in. Immediately
+ * after the successful association all TX frames will be kept in the
+ * hardware queue and never transmitted.
+ */
+#if 0
static void rt2500usb_link_tuner(struct rt2x00_dev *rt2x00dev)
{
int rssi = rt2x00_get_link_rssi(&rt2x00dev->link);
@@ -752,6 +762,9 @@ dynamic_cca_tune:
rt2x00dev->link.vgc_level = r17;
}
}
+#else
+#define rt2500usb_link_tuner NULL
+#endif
/*
* Initialization functions.
@@ -1737,6 +1750,7 @@ static int rt2500usb_probe_hw(struct rt2x00_dev *rt2x00dev)
__set_bit(DRIVER_REQUIRE_ATIM_QUEUE, &rt2x00dev->flags);
__set_bit(DRIVER_REQUIRE_BEACON_GUARD, &rt2x00dev->flags);
__set_bit(DRIVER_REQUIRE_SCHEDULED, &rt2x00dev->flags);
+ __set_bit(CONFIG_DISABLE_LINK_TUNING, &rt2x00dev->flags);
/*
* Set the rssi offset.
--
1.5.6.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-08-03 21:12 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-03 14:57 [PATCH] rt2x00: Disable link tuning in rt2500usb Ivo van Doorn
2008-08-03 18:13 ` Stefanik Gábor
2008-08-03 21:34 ` Ivo van Doorn
2008-08-03 21:36 ` [PATCH v2] " Ivo van Doorn
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).