• Emmanuel Grumbach's avatar
    iwlwifi: get the correct HCMD in the response handler · 96791422
    Emmanuel Grumbach authored
    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: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
    Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
    96791422
rx.c 32 KB