[rt2x00-users] Question about starting up an AP

Helmut Schaa helmut.schaa at googlemail.com
Tue Oct 26 09:35:31 UTC 2010


Am Freitag 15 Oktober 2010 schrieb Helmut Schaa:
> Am Donnerstag 14 Oktober 2010 schrieb Joshua Smith:
> > Not sure how you want to proceed with this, but this is the code that makes my AP work:
> > 
> >  nl compat-wireless-2010-09-20/drivers/net/wireless/rt2x00/rt2800lib.c | grep -C 10 1000/
> > 
> >    225	int rt2800_wait_wpdma_ready(struct rt2x00_dev *rt2x00dev)
> >    226	{
> >    227		unsigned int i;
> >    228		u32 reg;
> >        
> >    229		for (i = 0; i < 1000/*REGISTER_BUSY_COUNT*/; i++) {
> >    230			rt2800_register_read(rt2x00dev, WPDMA_GLO_CFG, &reg);
> >    231			if (!rt2x00_get_field32(reg, WPDMA_GLO_CFG_TX_DMA_BUSY) &&
> >    232			    !rt2x00_get_field32(reg, WPDMA_GLO_CFG_RX_DMA_BUSY))
> >    233				return 0;
> >        
> >    234			msleep(1);
> >    235		}
> >        
> >    236		ERROR(rt2x00dev, "WPDMA TX/RX busy, aborting.\n");
> >    237		return -EACCES;
> 
> I'll let Ivo decide on this. At least if we really want to wait more then one
> second for DMA to be ready we should increase the msleep(1) to msleep(10) and
> keep the maximum number of retries at 100.

Ping.

Ivo, do we want to add the excessive waiting (up to one second) for DMA on
rt2800 as it fixes Joshuas device? At the moment we're waiting 100ms.

Helmut



More information about the users mailing list