]> git.karo-electronics.de Git - karo-tx-linux.git/commit
iwlagn: fix default calibration table size
authorShanyu Zhao <shanyu.zhao@intel.com>
Tue, 21 Sep 2010 19:06:18 +0000 (12:06 -0700)
committerWey-Yi Guy <wey-yi.w.guy@intel.com>
Thu, 7 Oct 2010 22:53:49 +0000 (15:53 -0700)
commit642454cc0774e0774bc1ccb4292d6dc0abd06d20
treef42e1d93e0ba197735982b5323142d435586fd63
parent65cccfb03d0dc99fd213d57be5f60f8ca6a60824
iwlagn: fix default calibration table size

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: Shanyu Zhao <shanyu.zhao@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
drivers/net/wireless/iwlwifi/iwl-agn.c
drivers/net/wireless/iwlwifi/iwl-commands.h