From: Ivo van Doorn Date: Sat, 2 Oct 2010 09:32:43 +0000 (+0200) Subject: rt2x00: Improve TX status entry validation X-Git-Tag: v2.6.37-rc1~147^2~191^2^2~51 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bc8a979e2d85c2bdd507a8b6b09fdafc11ebd73a;p=pandora-kernel.git rt2x00: Improve TX status entry validation The TX_STA_FIFO contains some information for identifying a outgoing frame, however matching by WCID and ACK status is not sufficient to 100% identify the macthing queue_entry structure (containing the SKB buffer) which belongs to the status report. Within TX_STA_FIFO we have a 4-bit field named PACKETID, which is currently used to encode the queue id. The queue ID is however limited to values from 0 to 3, which means 2 bits are sufficient to encode the value. With the remaining 2 bits we can encode a partial queue_entry index number. The value of PACKETID is not allowed to become 0, with the queue ID ranging from 0 to 3, at least one of the bits for the entry identification must be 1. That leaves us with 3 possible values we can still encode in the bits. Altough this doesn't allow 100% accurate matching of the TX_STA_FIFO queue to a queue_entry structure, it at least improves the accuracy. This allows us to better detect if we have missed the TX_STA_FIFO report, which in turn reduces the number of watchdog warnings regarding the TX status timeout. Signed-off-by: Ivo van Doorn Signed-off-by: John W. Linville --- Reading git-diff-tree failed