• Shanyu Zhao's avatar
    iwlagn: fix default calibration table size · 642454cc
    Shanyu Zhao authored
    iwlagn driver uses the IWL_MAX_STANDARD_PHY_CALIBRATE_TBL_SIZE
    as the chain noise reset calibration index and
    IWL_MAX_STANDARD_PHY_CALIBRATE_TBL_SIZE+1 as the chain noise gain
    calibration index, if not specified by the TLV value in the new
    firmware format.
    
    However, this is broken if we need to add more calibrations like
    the temperature offset calibration because we increased
    IWL_MAX_STANDARD_PHY_CALIBRATE_TBL_SIZE by 1.
    
    To fix this issue, define IWL_DEFAULT_STANDARD_PHY_CALIBRATE_TBL_SIZE
    and use it as the calibration index instead. We still keep the
    IWL_MAX_STANDARD_PHY_CALIBRATE_TBL_SIZE as a sanity check for
    the TLV value given by ucode.
    Signed-off-by: default avatarShanyu Zhao <shanyu.zhao@intel.com>
    Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
    Signed-off-by: default avatarWey-Yi Guy <wey-yi.w.guy@intel.com>
    642454cc
iwl-agn.c 142 KB