The Power Management Queue (PMQ) turns on and off packet caching for STAs in powersaving mode. Each time the Power Management Bitfield register (MMIO offset 0x140) is read, the MAC address is updated with this STA's MAC and the bits in the Power Management Bitfield are updated to reflect this STA's request. When the STA requests that Power Saving be turned on, packets are held on the AP until the STA turns off Power Saving. Once Power Saving is off, the packets are sent to the STA which then resumes normal activity.
Handling the Interrupt
Read the 32 bit Power Management Bitfield register (MMIO offset 0x140)
- If there are Queue Items Waiting (Bit 8 is set), loop until there are no more Queue Items Waiting (re-read the Power Management Bitfield once per loop)
- If this is an AP and either of the Power Saving request bits (0x10000 or 0x20000) are set in the Power Management Bitfield and we're keeping track of at least one STA in Power Saving Mode
- Read the MAC address for this item as shown below
- FIXME handle the PMQ Item
- If this is an AP and either of the Power Saving request bits (0x10000 or 0x20000) are set in the Power Management Bitfield and we're keeping track of at least one STA in Power Saving Mode
- If this isn't an AP or FIXME
Power Management Bitfield
The Power Management Bitfield corresponds to MMIO offset 0x140. It is 32 bits wide. Known offsets are provided below.
Mask |
Functionality |
0x00000002 |
PMQ Disabled (?) |
0x00000008 |
Queue Items Waiting |
0x00010000 |
Queue STA Turning Power Saving Off |
0x00020000 |
Queue STA Turning Power Saving On |
Power Management Queue Item MAC
The MAC address of the current Power Management Queue Item can be found in MMIO offsets 0x144 and 0x148. 2 bytes are unused.
0x144 |
0x148 |
||||||
31 - 24 |
23 - 16 |
15 - 8 |
7 - 0 |
31 - 24 |
23 - 16 |
15 - 8 |
7 - 0 |
Octet 3 |
Octet 2 |
Octet 1 |
Octet 0 |
Unused |
Unused |
Octet 5 |
Octet 4 |