iwlagn: fix stack corruption for temperature offset v2
authorWey-Yi Guy <wey-yi.w.guy@intel.com>
Thu, 15 Sep 2011 18:46:53 +0000 (11:46 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 19 Sep 2011 20:10:10 +0000 (16:10 -0400)
Same stack corruption problem as temperature offset

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlwifi/iwl-agn-ucode.c

index b5bae38eff83de21f22fc4020901f7372ddba116..3e40429fa5ef8fd60276632e319541917337eb0d 100644 (file)
@@ -187,9 +187,9 @@ static int iwlagn_set_temperature_offset_calib_v2(struct iwl_priv *priv)
        hdr = (struct iwl_eeprom_calib_hdr *)iwl_eeprom_query_addr(priv,
                                                        EEPROM_CALIB_ALL);
        memcpy(&cmd.radio_sensor_offset_high, offset_calib_high,
-               sizeof(offset_calib_high));
+               sizeof(*offset_calib_high));
        memcpy(&cmd.radio_sensor_offset_low, offset_calib_low,
-               sizeof(offset_calib_low));
+               sizeof(*offset_calib_low));
        if (!(cmd.radio_sensor_offset_low)) {
                IWL_DEBUG_CALIB(priv, "no info in EEPROM, use default\n");
                cmd.radio_sensor_offset_low = DEFAULT_RADIO_SENSOR_OFFSET;