• Johannes Berg's avatar
    iwlwifi: always copy first 16 bytes of commands · 81745233
    Johannes Berg authored
    commit 8a964f44 upstream.
    
    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.
    Reviewed-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
    Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
    [bwh: Backported to 3.2:
     - Adjust context
     - Drop the IWL_HCMD_DFL_DUP handling
     - Fix descriptor addresses and lengths for tracepoint, but otherwise
       leave it unchanged]
    Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
    81745233
iwl-trans-pcie-int.h 13.7 KB