The "power management queue" is a mechanism to watch associated STA's sleep transitions. It is also used to suppress frames to a STA that went to sleep that were queued on the DMA queues before that STA went to sleep. These will be reported with a corresponding suppression reason in the transmit status.
Driver Use
The PMQ is used in the following ways.
If the PMQ is not used, the driver can set the "Discard PMQ" MAC control bit to stop the microcode from inserting entries into the PMQ.
"Power Management Queue Entries Available" Interrupt
When this interrupt comes in, the driver can read new entries from the PMQ by reading the PMQ host status register (32 bits). The read word has the following fields:
Bit mask |
Meaning |
0xFFFF0000 |
PMQ data (from ucode register 0x07EA) |
0x00100000 |
power management entry for BSS config (not supported by all microcodes, multi-BSS related?) |
0x00080000 |
STA didn't acknowledge ATIM |
0x00040000 |
STA disassociated/deauthenticated |
0x00020000 |
STA entered sleep |
0x00010000 |
STA woke up |
0x0000FFFF |
PMQ control bits, can be written via "PMQ control" register |
0x00000008 |
PMQ not empty |
0x00000004 |
PMQ overflowed |
0x00000002 |
delete entries head..current read pointer - 1 |
0x00000001 |
delete head entry |
When reading a word, first check whether there is any data by checking the "PMQ not empty" bit. If this bit is set, then the PMQ data is valid and the corresponding MAC address can be read from the "PMQ pattern" registers, the address is contained in the 4 bytes of the low and lower 2 bytes of the high register.
In order to delete all entries, read the PMQ host status register until the bit 0x0008 shuts off (READ pointer now points to the entry after the last!) and then write 0x0002 to the PMQ control register to delete all entries.
[TBC after lunch or so]