• Johannes Berg's avatar
    iwlwifi: always copy first 16 bytes of commands · 8a964f44
    Johannes Berg authored
    The FH hardware will always write back to the scratch field
    in commands, even host commands not just TX commands, which
    can overwrite parts of the command. This is problematic if
    the command is re-used (with IWL_HCMD_DFL_NOCOPY) and can
    cause calibration issues.
    
    Address this problem by always putting at least the first
    16 bytes into the buffer we also use for the command header
    and therefore make the DMA engine write back into this.
    
    For commands that are smaller than 16 bytes also always map
    enough memory for the DMA engine to write back to.
    
    Cc: stable@vger.kernel.org
    Reviewed-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
    Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
    8a964f44
internal.h 14.2 KB