From: Tomas Winkler <tomas.winkler@xxxxxxxxx> This patch fixes endinianity and style issuse in ct kill host command. Signed-off-by: Tomas Winkler <tomas.winkler@xxxxxxxxx> Signed-off-by: Zhu Yi <yi.zhu@xxxxxxxxx> --- drivers/net/wireless/iwl-4965.c | 12 ++++++------ drivers/net/wireless/iwl-commands.h | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/net/wireless/iwl-4965.c b/drivers/net/wireless/iwl-4965.c index eca9eed..6b6ab52 100644 --- a/drivers/net/wireless/iwl-4965.c +++ b/drivers/net/wireless/iwl-4965.c @@ -713,8 +713,9 @@ static void iwl4965_bg_statistics_work(struct work_struct *work) void iwl4965_rf_kill_ct_config(struct iwl_priv *priv) { struct iwl_ct_kill_config cmd; - u32 R1 = 0, R2 = 0, R3 = 0; - u32 temp_th = 0; + u32 R1, R2, R3; + u32 temp_th; + u32 crit_temperature; unsigned long flags; int rc = 0; @@ -735,15 +736,14 @@ void iwl4965_rf_kill_ct_config(struct iwl_priv *priv) temp_th = CELSIUS_TO_KELVIN(TM_CT_KILL_THRESHOLD); - cmd.critical_temperature_R = ((temp_th * (R3-R1))/CT_LIMIT_CONST) + R2; + crit_temperature = ((temp_th * (R3-R1))/CT_LIMIT_CONST) + R2; + cmd.critical_temperature_R = cpu_to_le32(crit_temperature); rc = iwl_send_cmd_pdu(priv, REPLY_CT_KILL_CONFIG_CMD, sizeof(cmd), &cmd); if (rc) IWL_ERROR("REPLY_CT_KILL_CONFIG_CMD failed\n"); else - IWL_WARNING("REPLY_CT_KILL_CONFIG_CMD succeeded\n"); - - return; + IWL_DEBUG_INFO("REPLY_CT_KILL_CONFIG_CMD succeeded\n"); } #ifdef CONFIG_IWLWIFI_SENSITIVITY diff --git a/drivers/net/wireless/iwl-commands.h b/drivers/net/wireless/iwl-commands.h index 2327ec3..1d2c091 100644 --- a/drivers/net/wireless/iwl-commands.h +++ b/drivers/net/wireless/iwl-commands.h @@ -560,9 +560,9 @@ struct iwl_missed_beacon_notif { } __attribute__ ((packed)); struct iwl_ct_kill_config { - u32 reserved; - u32 critical_temperature_M; - u32 critical_temperature_R; + __le32 reserved; + __le32 critical_temperature_M; + __le32 critical_temperature_R; } __attribute__ ((packed)); /* * Add/Modify Station Command & Response -- 1.5.2 - To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html