]> git.karo-electronics.de Git - karo-tx-linux.git/commit
iwlwifi: traverse linklist to find the valid OTP block
authorWey-Yi Guy <wey-yi.w.guy@intel.com>
Wed, 30 Sep 2009 22:36:15 +0000 (15:36 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 5 Oct 2009 16:33:11 +0000 (09:33 -0700)
commitb23b04f4aff630b45fd0f87bd233197822500e5a
tree919348c0cd89e0ec87a9dbe5a4bff1fc9b1e3ac6
parenta6a74787f29219a213c435cadf5482b213a99b33
iwlwifi: traverse linklist to find the valid OTP block

commit 415e49936b4b29b34c2fb561eeab867d41fc43a6 upstream.

For devices using OTP memory, EEPROM image can start from
any one of the OTP blocks. If shadow RAM is disabled, we need to
traverse link list to find the last valid block, then start the EEPROM
image reading.

If OTP is not full, the valid block is the block _before_ the last block
on the link list; the last block on the link list is the empty block
ready for next OTP refresh/update.

If OTP is full, then the last block is the valid block to be used for
configure the device.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/net/wireless/iwlwifi/iwl-1000.c
drivers/net/wireless/iwlwifi/iwl-6000.c
drivers/net/wireless/iwlwifi/iwl-core.h
drivers/net/wireless/iwlwifi/iwl-dev.h
drivers/net/wireless/iwlwifi/iwl-eeprom.c
drivers/net/wireless/iwlwifi/iwl-eeprom.h