]> git.baikalelectronics.ru Git - kernel.git/commit
iwlwifi: fix wrapping when handling aggregated batches
authorDaniel Halperin <dhalperi@cs.washington.edu>
Tue, 25 May 2010 17:22:49 +0000 (10:22 -0700)
committerReinette Chatre <reinette.chatre@intel.com>
Sun, 6 Jun 2010 06:21:26 +0000 (23:21 -0700)
commit5c1f67b0832b18d097cb58f2cc4e10a7b0116b3f
treeb0d23bd8b858751b5e0af473c521945185cf9acf
parent928500e8519fca0445faeb479fb1cb77c8649fa0
iwlwifi: fix wrapping when handling aggregated batches

Fairly complex code in iwlagn_tx_status_reply_tx handle the status reports for
aggregated packet batches sent by the NIC. This code aims to handle the case
where the NIC retransmits failed packets from a previous batch; the status
information for these packets can sometimes be inserted in the middle of a
batch and are actually not in order by sequence number! (I verified this can
happen with printk's in the function.)

The code in question adaptively identifies the "first" frame of the batch,
taking into account that it may not be the one corresponding to the first agg
status report, and also handles the case when the set of sent packets wraps the
256-character entry buffer. It generates the agg->bitmap field of sent packets
which is later compared to the BlockAck response from the receiver to see which
frames of those sent in this batch were ACKed. A small logic error (wrapping by
0xff==255 instead of 0x100==256) was causing the agg->bitmap to be set
incorrectly.

Fix this wrapping code, and add extensive comments to clarify what is going on.

Signed-off-by: Daniel Halperin <dhalperi@cs.washington.edu>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
drivers/net/wireless/iwlwifi/iwl-agn-lib.c