WARP Project Forums - Wireless Open-Access Research Platform

You are not logged in.

#1 2016-Aug-01 11:06:06

kirchhof
Member
From: Aachen
Registered: 2016-Jul-13
Posts: 4

Minor issue with backoff register retrieval

Hi,

while reading about the backoff mechanism, I think I found a little error in the retrieval macro in wlan_mac_low.h in line 366 and 367.

The comment says you want to devide the register in two 16 bit blocks and use one for FSM A and the other for FSM C. But actually, your code seems to use only the lower 8 bits for FSM A and no bits at all for FSM C (as you are shifting by 16 instead of 8 and therefore always return 0).
Therefore, I think 0x000000FF should be replaced by 0x0000FFFF and 0x0000FF00 should be replaced by 0xFFFF0000 to match the comment.

Have a nice day :-)

Offline

 

#2 2016-Aug-02 16:43:45

murphpo
Administrator
From: Mango Communications
Registered: 2006-Jul-03
Posts: 5159

Re: Minor issue with backoff register retrieval

Yep, that's a bug. I just committed the fix. Fortunately this bug won't break any MAC behaviors. The ref code only uses wlan_mac_get_backoff_count_A() for recording pre-Tx backoff values for TX_LOW log entries. This bug will record bad values for slot counts >255 (rare, but definitely possible). The actual MAC state machine will implement the correct backoff in these cases.

Thank you for taking the time to point out bugs as you find them. Ideally we would have no bugs (maybe someday...). Until then, we definitely appreciate the bug reports.

Offline

 

Board footer