iwlwifi: fix calibration parser

The firmware TLV for calibration data isn't
really a u64, but two u32 values. Define a
struct for that and change the parser.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
Johannes Berg
2013-01-24 14:12:07 +01:00
父節點 4a4ee1010d
當前提交 aa2b177083
共有 2 個文件被更改,包括 20 次插入3 次删除

查看文件

@@ -268,7 +268,7 @@ struct fw_sec_parsing {
*/
struct iwl_tlv_calib_data {
__le32 ucode_type;
__le64 calib;
struct iwl_tlv_calib_ctrl calib;
} __packed;
struct iwl_firmware_pieces {
@@ -358,7 +358,11 @@ static int iwl_set_default_calib(struct iwl_drv *drv, const u8 *data)
ucode_type);
return -EINVAL;
}
drv->fw.default_calib[ucode_type] = le64_to_cpu(def_calib->calib);
drv->fw.default_calib[ucode_type].flow_trigger =
def_calib->calib.flow_trigger;
drv->fw.default_calib[ucode_type].event_trigger =
def_calib->calib.event_trigger;
return 0;
}