From: Ivo van Doorn <ivdoorn@gmail.com>
To: Antonio Marques <froz@icix.org>
Cc: Andrey Yurovsky <andrey@cozybit.com>, linux-wireless@vger.kernel.org
Subject: Re: rt2x00 mesh support
Date: Tue, 17 Mar 2009 10:31:41 +0100 [thread overview]
Message-ID: <200903171031.41302.IvDoorn@gmail.com> (raw)
In-Reply-To: <A1AF7AF9-047F-41A1-829F-94F58821DB09@icix.org>
[-- Attachment #1: Type: text/plain, Size: 1244 bytes --]
On Monday 16 March 2009, Antonio Marques wrote:
> On Mar 16, 2009, at 14:58 , Ivo van Doorn wrote:
> > On Monday 16 March 2009, António Marques wrote:
> >>
> >> As requested, I have attached the output of the script run before and
> >> after
> >> running 'iwlist mesh scan'. Unfortunately there seems to be no
> >> change in
> >> the output. I have also included the queue statistics as these do
> >> change from
> >> one state to the next. Any further pointers to help debug this? I'll
> >> gladly test
> >> any patches that try to address this issue.
> >
> > The dumps aren't correct, I had forgotten to update the script on
> > the website
> > after some API for the rt2x00 debugfs interface changes recently.
> > Attached is the correct patch.
> >
> > Ivo
> > <rt2x00_regdump.sh>
>
> Fixed, new dumps are attached.
Thanks for the dumps, the reason why the beaconing isn't working
is (fortunately) very obvious from the registers point of view.
The "generate beacons" bit is simply not enabled. However the reason
why this bit has not been set escapes me. Could you apply the attached
patch? This will add extra debug messages to the driver to see when the
beacon generation bit is set.
Thanks,
Ivo
[-- Attachment #2: rt73usb.beacon.diff --]
[-- Type: text/x-diff, Size: 4176 bytes --]
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c
index 24fdfdf..0824e15 100644
--- a/drivers/net/wireless/rt2x00/rt73usb.c
+++ b/drivers/net/wireless/rt2x00/rt73usb.c
@@ -519,6 +519,7 @@ static void rt73usb_config_intf(struct rt2x00_dev *rt2x00dev,
{
unsigned int beacon_base;
u32 reg;
+ u32 reg2;
if (flags & CONFIG_UPDATE_TYPE) {
/*
@@ -538,6 +539,8 @@ static void rt73usb_config_intf(struct rt2x00_dev *rt2x00dev,
rt2x00_set_field32(®, TXRX_CSR9_TSF_SYNC, conf->sync);
rt2x00_set_field32(®, TXRX_CSR9_TBTT_ENABLE, 1);
rt2x00usb_register_write(rt2x00dev, TXRX_CSR9, reg);
+ rt2x00usb_register_read(rt2x00dev, TXRX_CSR9, ®2);
+ ERROR(rt2x00dev, "TXRX_CSR9 WRITE: 0x%.08x, READ: 0x%.08x\n", reg, reg2);
}
if (flags & CONFIG_UPDATE_MAC) {
@@ -838,6 +841,7 @@ static void rt73usb_config_duration(struct rt2x00_dev *rt2x00dev,
struct rt2x00lib_conf *libconf)
{
u32 reg;
+ u32 reg2;
rt2x00usb_register_read(rt2x00dev, TXRX_CSR0, ®);
rt2x00_set_field32(®, TXRX_CSR0_TSF_OFFSET, IEEE80211_HEADER);
@@ -851,6 +855,8 @@ static void rt73usb_config_duration(struct rt2x00_dev *rt2x00dev,
rt2x00_set_field32(®, TXRX_CSR9_BEACON_INTERVAL,
libconf->conf->beacon_int * 16);
rt2x00usb_register_write(rt2x00dev, TXRX_CSR9, reg);
+ rt2x00usb_register_read(rt2x00dev, TXRX_CSR9, ®2);
+ ERROR(rt2x00dev, "TXRX_CSR9 WRITE: 0x%.08x, READ: 0x%.08x\n", reg, reg2);
}
static void rt73usb_config_ps(struct rt2x00_dev *rt2x00dev,
@@ -1139,6 +1145,7 @@ static int rt73usb_load_firmware(struct rt2x00_dev *rt2x00dev,
static int rt73usb_init_registers(struct rt2x00_dev *rt2x00dev)
{
u32 reg;
+ u32 reg2;
rt2x00usb_register_read(rt2x00dev, TXRX_CSR0, ®);
rt2x00_set_field32(®, TXRX_CSR0_AUTO_TX_SEQ, 1);
@@ -1205,6 +1212,8 @@ static int rt73usb_init_registers(struct rt2x00_dev *rt2x00dev)
rt2x00_set_field32(®, TXRX_CSR9_BEACON_GEN, 0);
rt2x00_set_field32(®, TXRX_CSR9_TIMESTAMP_COMPENSATE, 0);
rt2x00usb_register_write(rt2x00dev, TXRX_CSR9, reg);
+ rt2x00usb_register_read(rt2x00dev, TXRX_CSR9, ®2);
+ ERROR(rt2x00dev, "TXRX_CSR9 WRITE: 0x%.08x, READ: 0x%.08x\n", reg, reg2);
rt2x00usb_register_write(rt2x00dev, TXRX_CSR15, 0x0000000f);
@@ -1375,12 +1384,16 @@ static int rt73usb_enable_radio(struct rt2x00_dev *rt2x00dev)
static void rt73usb_disable_radio(struct rt2x00_dev *rt2x00dev)
{
+ u32 reg2;
+
rt2x00usb_register_write(rt2x00dev, MAC_CSR10, 0x00001818);
/*
* Disable synchronisation.
*/
rt2x00usb_register_write(rt2x00dev, TXRX_CSR9, 0);
+ rt2x00usb_register_read(rt2x00dev, TXRX_CSR9, ®2);
+ ERROR(rt2x00dev, "TXRX_CSR9 WRITE: 0x%.08x, READ: 0x%.08x\n", 0, reg2);
rt2x00usb_disable_radio(rt2x00dev);
}
@@ -1532,6 +1545,7 @@ static void rt73usb_write_beacon(struct queue_entry *entry)
struct skb_frame_desc *skbdesc = get_skb_frame_desc(entry->skb);
unsigned int beacon_base;
u32 reg;
+ u32 reg2;
/*
* Add the descriptor in front of the skb.
@@ -1549,6 +1563,8 @@ static void rt73usb_write_beacon(struct queue_entry *entry)
rt2x00_set_field32(®, TXRX_CSR9_TBTT_ENABLE, 0);
rt2x00_set_field32(®, TXRX_CSR9_BEACON_GEN, 0);
rt2x00usb_register_write(rt2x00dev, TXRX_CSR9, reg);
+ rt2x00usb_register_read(rt2x00dev, TXRX_CSR9, ®2);
+ ERROR(rt2x00dev, "TXRX_CSR9 WRITE: 0x%.08x, READ: 0x%.08x\n", reg, reg2);
/*
* Write entire beacon with descriptor to register.
@@ -1584,6 +1600,7 @@ static void rt73usb_kick_tx_queue(struct rt2x00_dev *rt2x00dev,
const enum data_queue_qid queue)
{
u32 reg;
+ u32 reg2;
if (queue != QID_BEACON) {
rt2x00usb_kick_tx_queue(rt2x00dev, queue);
@@ -1602,7 +1619,10 @@ static void rt73usb_kick_tx_queue(struct rt2x00_dev *rt2x00dev,
rt2x00_set_field32(®, TXRX_CSR9_TBTT_ENABLE, 1);
rt2x00_set_field32(®, TXRX_CSR9_BEACON_GEN, 1);
rt2x00usb_register_write(rt2x00dev, TXRX_CSR9, reg);
- }
+ rt2x00usb_register_read(rt2x00dev, TXRX_CSR9, ®2);
+ ERROR(rt2x00dev, "TXRX_CSR9 WRITE: 0x%.08x, READ: 0x%.08x\n", reg, reg2);
+ } else
+ ERROR(rt2x00dev, "TXRX_CSR9 WRITE: Beacon generation already enabled\n");
}
/*
next prev parent reply other threads:[~2009-03-17 9:31 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-23 18:58 rt2x00 mesh support Antonio Marques
2009-01-23 19:02 ` Andrey Yurovsky
2009-01-24 11:40 ` António Marques
2009-03-15 11:54 ` Antonio Marques
2009-03-15 13:45 ` Ivo van Doorn
2009-03-16 1:58 ` Pat Erley
2009-03-16 13:29 ` Antonio Marques
2009-03-16 13:22 ` António Marques
2009-03-16 14:58 ` Ivo van Doorn
2009-03-16 19:12 ` Antonio Marques
2009-03-17 9:31 ` Ivo van Doorn [this message]
2009-03-17 14:11 ` Johannes Berg
2009-03-17 20:10 ` Johannes Berg
2009-03-17 21:50 ` Ivo van Doorn
2009-03-17 21:53 ` Johannes Berg
2009-03-17 22:04 ` Ivo van Doorn
2009-03-17 22:35 ` Johannes Berg
2009-03-17 23:01 ` Ivo van Doorn
2009-03-17 23:04 ` Johannes Berg
2009-03-18 10:02 ` Ivo van Doorn
2009-03-18 12:26 ` Antonio Marques
2009-03-18 12:48 ` Ivo van Doorn
2009-03-18 13:12 ` Johannes Berg
2009-03-18 13:31 ` Ivo van Doorn
2009-03-18 13:36 ` Johannes Berg
2009-03-19 21:55 ` Antonio Marques
2009-03-17 19:38 ` Antonio Marques
2009-03-17 22:03 ` Ivo van Doorn
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=200903171031.41302.IvDoorn@gmail.com \
--to=ivdoorn@gmail.com \
--cc=andrey@cozybit.com \
--cc=froz@icix.org \
--cc=linux-wireless@vger.kernel.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).