iwlwifi: get the correct HCMD in the response handler
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Mon, 23 Jul 2012 22:58:32 +0000 (01:58 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 26 Jul 2012 07:03:21 +0000 (09:03 +0200)
commit9679142291f51515bd1bf492535e8a12515558e9
treeb8ba2153cf6a9890eb8022e705b013a8676f1a2c
parentebdfb7a144c53d0b8e771a738f058bc11f0e187f
iwlwifi: get the correct HCMD in the response handler

Until now, the response handler of a Host Command got the
exact same pointer that was also given to the DMA engine.
We almost never need to the Host Command that was sent while
handling its response, but when we do need it, we see that
the command has been modified.

This mystery has been elucidated. The FH (our DMA engine)
writes its meta data on the buffer in the DRAM. Of course it
copies the buffer to the NIC first. This was known to happen
for Tx command, but as a matter of fact, it happens to all
TFD brought by the FH which doesn't care much about what it
brings from DRAM to internal SRAM.

So copy the Host Command to yet another buffer so that we
can properly pass the buffer that was sent originally to the
fw. Do that only if it was request by the user since very
few flows need to get the HCMD sent in the response handler.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/iwlwifi/dvm/sta.c
drivers/net/wireless/iwlwifi/iwl-trans.h
drivers/net/wireless/iwlwifi/pcie/internal.h
drivers/net/wireless/iwlwifi/pcie/rx.c
drivers/net/wireless/iwlwifi/pcie/trans.c
drivers/net/wireless/iwlwifi/pcie/tx.c
This page took 0.025467 seconds and 5 git commands to generate.