From: Emmanuel Grumbach <emmanuel.grumbach@xxxxxxxxx> This patch solves a bug in calibration. We get three results from the initial microcode, but we freed all the results upon each reception leading to zero two of them, only the last one survived. This fix is user visible in HT rates. This patch simplifed version for 2.6.27 and will create conflict with 86316f2fe474b019cc445211980f5394977b34d5 iwlwifi: generic init calibrations framework Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@xxxxxxxxx> Signed-off-by: Tomas Winkler <tomas.winkler@xxxxxxxxx> --- Note this patch effects only 5000 HW (nor 3946 or 4965) so doesn't resolve or create any regression. Anyhow it was thoroughly tested. drivers/net/wireless/iwlwifi/iwl-5000.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c index b08036a..0d027c1 100644 --- a/drivers/net/wireless/iwlwifi/iwl-5000.c +++ b/drivers/net/wireless/iwlwifi/iwl-5000.c @@ -512,23 +512,24 @@ static void iwl5000_rx_calib_result(struct iwl_priv *priv, struct iwl5000_calib_hdr *hdr = (struct iwl5000_calib_hdr *)pkt->u.raw; int len = le32_to_cpu(pkt->len) & FH_RSCSR_FRAME_SIZE_MSK; - iwl_free_calib_results(priv); - /* reduce the size of the length field itself */ len -= 4; switch (hdr->op_code) { case IWL5000_PHY_CALIBRATE_LO_CMD: + kfree(priv->calib_results.lo_res); priv->calib_results.lo_res = kzalloc(len, GFP_ATOMIC); priv->calib_results.lo_res_len = len; memcpy(priv->calib_results.lo_res, pkt->u.raw, len); break; case IWL5000_PHY_CALIBRATE_TX_IQ_CMD: + kfree(priv->calib_results.tx_iq_res); priv->calib_results.tx_iq_res = kzalloc(len, GFP_ATOMIC); priv->calib_results.tx_iq_res_len = len; memcpy(priv->calib_results.tx_iq_res, pkt->u.raw, len); break; case IWL5000_PHY_CALIBRATE_TX_IQ_PERD_CMD: + kfree(priv->calib_results.tx_iq_perd_res); priv->calib_results.tx_iq_perd_res = kzalloc(len, GFP_ATOMIC); priv->calib_results.tx_iq_perd_res_len = len; memcpy(priv->calib_results.tx_iq_perd_res, pkt->u.raw, len); -- 1.5.4.3 --------------------------------------------------------------------- Intel Israel (74) Limited This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. -- 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