Skip to content
Commit 2facba76 authored by Jay Sternberg's avatar Jay Sternberg Committed by John W. Linville
Browse files

iwlwifi: incorrect method used for finding valid OTP blocks



The address stored in the next link address is a word address but when
reading the OTP blocks, a byte address is used. Also if the blocks are
full and the last link pointer is not zero, then none of the blocks are
valid so return an error.

The algorithm is simply valid blocks have a next address and that
address's contents is zero.

Using the wrong address for the next link address gets arbitrary data,
obviously. In cases seen, the first block is considered valid when it is not.

If the block has in fact been invalidated there may be old data or
there may be no data, bad data, or partial data, there is no way of
telling. Without this patch it is possible that a device with valid OTP data
is unable to work.

Signed-off-by: default avatarJay Sternberg <jay.e.sternberg@intel.com>
Signed-off-by: default avatarReinette Chatre <reinette.chatre@intel.com>
CC: stable@kernel.org
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent fbc44bf7
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment