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
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"); } /*