Commit 2e277996 authored by Wey-Yi Guy's avatar Wey-Yi Guy
Browse files

iwlagn: radio sensor offset in le16 format

For temperature offset calibration, send radio sensor offset in le16 format
Signed-off-by: default avatarWey-Yi Guy <>
parent ad3f7124
......@@ -167,12 +167,12 @@ static int iwlagn_set_temperature_offset_calib(struct iwl_priv *priv)
memset(&cmd, 0, sizeof(cmd));
iwl_set_calib_hdr(&cmd.hdr, IWL_PHY_CALIBRATE_TEMP_OFFSET_CMD);
cmd.radio_sensor_offset = le16_to_cpu(offset_calib[1]);
memcpy(&cmd.radio_sensor_offset, offset_calib, sizeof(offset_calib));
if (!(cmd.radio_sensor_offset))
cmd.radio_sensor_offset = DEFAULT_RADIO_SENSOR_OFFSET;
IWL_DEBUG_CALIB(priv, "Radio sensor offset: %d\n",
return iwl_calib_set(&priv->calib_results[IWL_CALIB_TEMP_OFFSET],
(u8 *)&cmd, sizeof(cmd));
......@@ -3237,11 +3237,11 @@ struct iwl_calib_xtal_freq_cmd {
u8 pad[2];
} __packed;
#define DEFAULT_RADIO_SENSOR_OFFSET cpu_to_le16(2700)
struct iwl_calib_temperature_offset_cmd {
struct iwl_calib_hdr hdr;
s16 radio_sensor_offset;
s16 reserved;
__le16 radio_sensor_offset;
__le16 reserved;
} __packed;
Supports Markdown
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