From 15b1687cb4f45b87ddbe4dfc7759ff5bb69497d2 Mon Sep 17 00:00:00 2001 From: "Winkler, Tomas" Date: Fri, 19 Dec 2008 10:37:33 +0800 Subject: iwlwifi: replace IWL_ERROR with IWL_ERR IWL_ERR doesn't use hidden priv pointer. Signed-off-by: Tomas Winkler Signed-off-by: Zhu Yi Signed-off-by: John W. Linville --- drivers/net/wireless/iwlwifi/iwl-eeprom.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'drivers/net/wireless/iwlwifi/iwl-eeprom.c') diff --git a/drivers/net/wireless/iwlwifi/iwl-eeprom.c b/drivers/net/wireless/iwlwifi/iwl-eeprom.c index ce2f47306ce..59abac09a78 100644 --- a/drivers/net/wireless/iwlwifi/iwl-eeprom.c +++ b/drivers/net/wireless/iwlwifi/iwl-eeprom.c @@ -145,7 +145,7 @@ int iwlcore_eeprom_verify_signature(struct iwl_priv *priv) { u32 gp = iwl_read32(priv, CSR_EEPROM_GP); if ((gp & CSR_EEPROM_GP_VALID_MSK) == CSR_EEPROM_GP_BAD_SIGNATURE) { - IWL_ERROR("EEPROM not found, EEPROM_GP=0x%08x\n", gp); + IWL_ERR(priv, "EEPROM not found, EEPROM_GP=0x%08x\n", gp); return -ENOENT; } return 0; @@ -223,7 +223,7 @@ int iwl_eeprom_init(struct iwl_priv *priv) ret = priv->cfg->ops->lib->eeprom_ops.verify_signature(priv); if (ret < 0) { - IWL_ERROR("EEPROM not found, EEPROM_GP=0x%08x\n", gp); + IWL_ERR(priv, "EEPROM not found, EEPROM_GP=0x%08x\n", gp); ret = -ENOENT; goto err; } @@ -231,7 +231,7 @@ int iwl_eeprom_init(struct iwl_priv *priv) /* Make sure driver (instead of uCode) is allowed to read EEPROM */ ret = priv->cfg->ops->lib->eeprom_ops.acquire_semaphore(priv); if (ret < 0) { - IWL_ERROR("Failed to acquire EEPROM semaphore.\n"); + IWL_ERR(priv, "Failed to acquire EEPROM semaphore.\n"); ret = -ENOENT; goto err; } @@ -247,7 +247,7 @@ int iwl_eeprom_init(struct iwl_priv *priv) CSR_EEPROM_REG_READ_VALID_MSK, IWL_EEPROM_ACCESS_TIMEOUT); if (ret < 0) { - IWL_ERROR("Time out reading EEPROM[%d]\n", addr); + IWL_ERR(priv, "Time out reading EEPROM[%d]\n", addr); goto done; } r = _iwl_read_direct32(priv, CSR_EEPROM_REG); @@ -285,7 +285,7 @@ int iwl_eeprom_check_version(struct iwl_priv *priv) return 0; err: - IWL_ERROR("Unsupported EEPROM VER=0x%x < 0x%x CALIB=0x%x < 0x%x\n", + IWL_ERR(priv, "Unsupported EEPROM VER=0x%x < 0x%x CALIB=0x%x < 0x%x\n", eeprom_ver, priv->cfg->eeprom_ver, calib_ver, priv->cfg->eeprom_calib_ver); return -EINVAL; @@ -450,7 +450,7 @@ int iwl_init_channel_map(struct iwl_priv *priv) priv->channel_info = kzalloc(sizeof(struct iwl_channel_info) * priv->channel_count, GFP_KERNEL); if (!priv->channel_info) { - IWL_ERROR("Could not allocate channel_info\n"); + IWL_ERR(priv, "Could not allocate channel_info\n"); priv->channel_count = 0; return -ENOMEM; } -- cgit v1.2.3 From 01f8162a854df7f9c259c839ad3c1168ac13b7b8 Mon Sep 17 00:00:00 2001 From: Reinette Chatre Date: Thu, 8 Jan 2009 10:20:02 -0800 Subject: iwlwifi: update copyright year to 2009 Signed-off-by: Reinette Chatre Signed-off-by: John W. Linville --- drivers/net/wireless/iwlwifi/iwl-eeprom.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/net/wireless/iwlwifi/iwl-eeprom.c') diff --git a/drivers/net/wireless/iwlwifi/iwl-eeprom.c b/drivers/net/wireless/iwlwifi/iwl-eeprom.c index 59abac09a78..c8afcd1ed2c 100644 --- a/drivers/net/wireless/iwlwifi/iwl-eeprom.c +++ b/drivers/net/wireless/iwlwifi/iwl-eeprom.c @@ -5,7 +5,7 @@ * * GPL LICENSE SUMMARY * - * Copyright(c) 2008 Intel Corporation. All rights reserved. + * Copyright(c) 2008 - 2009 Intel Corporation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as @@ -30,7 +30,7 @@ * * BSD LICENSE * - * Copyright(c) 2005 - 2008 Intel Corporation. All rights reserved. + * Copyright(c) 2005 - 2009 Intel Corporation. All rights reserved. * All rights reserved. * * Redistribution and use in source and binary forms, with or without -- cgit v1.2.3 From 62ea9c5b9e531dbf6b2601e6c9e2705a56983b6e Mon Sep 17 00:00:00 2001 From: "Winkler, Tomas" Date: Mon, 19 Jan 2009 15:30:29 -0800 Subject: iwlwifi: remove unused or twice defined members in iwl_priv This patch removes user_txpower_limit and max_channel_txpower_limit and use tx_power_user_lmt and tx_power_channel_lmt instead call_post_assoc_from_beacon is not used Signed-off-by: Tomas Winkler Signed-off-by: Reinette Chatre Signed-off-by: John W. Linville --- drivers/net/wireless/iwlwifi/iwl-eeprom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/net/wireless/iwlwifi/iwl-eeprom.c') diff --git a/drivers/net/wireless/iwlwifi/iwl-eeprom.c b/drivers/net/wireless/iwlwifi/iwl-eeprom.c index c8afcd1ed2c..cebfb8fa5da 100644 --- a/drivers/net/wireless/iwlwifi/iwl-eeprom.c +++ b/drivers/net/wireless/iwlwifi/iwl-eeprom.c @@ -520,7 +520,7 @@ int iwl_init_channel_map(struct iwl_priv *priv) flags & EEPROM_CHANNEL_RADAR)) ? "" : "not "); - /* Set the user_txpower_limit to the highest power + /* Set the tx_power_user_lmt to the highest power * supported by any channel */ if (eeprom_ch_info[ch].max_power_avg > priv->tx_power_user_lmt) -- cgit v1.2.3 From e6148917db2c223fa7edd3dfb64d99756a86b452 Mon Sep 17 00:00:00 2001 From: Samuel Ortiz Date: Fri, 23 Jan 2009 13:45:15 -0800 Subject: iwl3945: Use iwl-eeprom.c routines By adding the eeprom ops to the 3945 code, we can now use the iwlcore eeprom routines (defined in iwl-eeprom.c). We also removed the heavy eeprom39 reference from iwl_priv and use the eeprom pointer instead. Signed-off-by: Samuel Ortiz Signed-off-by: Reinette Chatre Signed-off-by: John W. Linville --- drivers/net/wireless/iwlwifi/iwl-eeprom.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'drivers/net/wireless/iwlwifi/iwl-eeprom.c') diff --git a/drivers/net/wireless/iwlwifi/iwl-eeprom.c b/drivers/net/wireless/iwlwifi/iwl-eeprom.c index cebfb8fa5da..eaa658f9e54 100644 --- a/drivers/net/wireless/iwlwifi/iwl-eeprom.c +++ b/drivers/net/wireless/iwlwifi/iwl-eeprom.c @@ -531,6 +531,13 @@ int iwl_init_channel_map(struct iwl_priv *priv) } } + /* Check if we do have FAT channels */ + if (priv->cfg->ops->lib->eeprom_ops.regulatory_bands[5] >= + priv->cfg->eeprom_size && + priv->cfg->ops->lib->eeprom_ops.regulatory_bands[6] >= + priv->cfg->eeprom_size) + return 0; + /* Two additional EEPROM bands for 2.4 and 5 GHz FAT channels */ for (band = 6; band <= 7; band++) { enum ieee80211_band ieeeband; @@ -582,6 +589,7 @@ void iwl_free_channel_map(struct iwl_priv *priv) kfree(priv->channel_info); priv->channel_count = 0; } +EXPORT_SYMBOL(iwl_free_channel_map); /** * iwl_get_channel_info - Find driver's private channel info -- cgit v1.2.3 From e1623446bb1de1834ff1c57b3e8ed341d5d4a927 Mon Sep 17 00:00:00 2001 From: Tomas Winkler Date: Tue, 27 Jan 2009 14:27:56 -0800 Subject: iwlwifi: don't use implicit priv in IWL_DEBUG Call IWL_DEBUG macro with explicit priv argument. Signed-off-by: Tomas Winkler Acked-by: Samuel Ortiz Signed-off-by: Reinette Chatre Signed-off-by: John W. Linville --- drivers/net/wireless/iwlwifi/iwl-eeprom.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'drivers/net/wireless/iwlwifi/iwl-eeprom.c') diff --git a/drivers/net/wireless/iwlwifi/iwl-eeprom.c b/drivers/net/wireless/iwlwifi/iwl-eeprom.c index eaa658f9e54..d1d1d9bcfea 100644 --- a/drivers/net/wireless/iwlwifi/iwl-eeprom.c +++ b/drivers/net/wireless/iwlwifi/iwl-eeprom.c @@ -173,7 +173,7 @@ int iwlcore_eeprom_acquire_semaphore(struct iwl_priv *priv) CSR_HW_IF_CONFIG_REG_BIT_EEPROM_OWN_SEM, EEPROM_SEM_TIMEOUT); if (ret >= 0) { - IWL_DEBUG_IO("Acquired semaphore after %d tries.\n", + IWL_DEBUG_IO(priv, "Acquired semaphore after %d tries.\n", count+1); return ret; } @@ -390,7 +390,7 @@ static int iwl_set_fat_chan_info(struct iwl_priv *priv, if (!is_channel_valid(ch_info)) return -1; - IWL_DEBUG_INFO("FAT Ch. %d [%sGHz] %s%s%s%s%s(0x%02x %ddBm):" + IWL_DEBUG_INFO(priv, "FAT Ch. %d [%sGHz] %s%s%s%s%s(0x%02x %ddBm):" " Ad-Hoc %ssupported\n", ch_info->channel, is_channel_a_band(ch_info) ? @@ -432,11 +432,11 @@ int iwl_init_channel_map(struct iwl_priv *priv) struct iwl_channel_info *ch_info; if (priv->channel_count) { - IWL_DEBUG_INFO("Channel map already initialized.\n"); + IWL_DEBUG_INFO(priv, "Channel map already initialized.\n"); return 0; } - IWL_DEBUG_INFO("Initializing regulatory info from EEPROM\n"); + IWL_DEBUG_INFO(priv, "Initializing regulatory info from EEPROM\n"); priv->channel_count = ARRAY_SIZE(iwl_eeprom_band_1) + @@ -445,7 +445,7 @@ int iwl_init_channel_map(struct iwl_priv *priv) ARRAY_SIZE(iwl_eeprom_band_4) + ARRAY_SIZE(iwl_eeprom_band_5); - IWL_DEBUG_INFO("Parsing data for %d channels.\n", priv->channel_count); + IWL_DEBUG_INFO(priv, "Parsing data for %d channels.\n", priv->channel_count); priv->channel_info = kzalloc(sizeof(struct iwl_channel_info) * priv->channel_count, GFP_KERNEL); @@ -485,7 +485,7 @@ int iwl_init_channel_map(struct iwl_priv *priv) IEEE80211_CHAN_NO_FAT_BELOW); if (!(is_channel_valid(ch_info))) { - IWL_DEBUG_INFO("Ch. %d Flags %x [%sGHz] - " + IWL_DEBUG_INFO(priv, "Ch. %d Flags %x [%sGHz] - " "No traffic\n", ch_info->channel, ch_info->flags, @@ -501,7 +501,7 @@ int iwl_init_channel_map(struct iwl_priv *priv) ch_info->scan_power = eeprom_ch_info[ch].max_power_avg; ch_info->min_power = 0; - IWL_DEBUG_INFO("Ch. %d [%sGHz] %s%s%s%s%s%s(0x%02x %ddBm):" + IWL_DEBUG_INFO(priv, "Ch. %d [%sGHz] %s%s%s%s%s%s(0x%02x %ddBm):" " Ad-Hoc %ssupported\n", ch_info->channel, is_channel_a_band(ch_info) ? -- cgit v1.2.3 From a89d03c4230beb50756c98d2d1ba036c83da7680 Mon Sep 17 00:00:00 2001 From: Reinette Chatre Date: Tue, 10 Feb 2009 15:19:04 -0800 Subject: iwlwifi: fix FAT channel config for 5000 series The test to find out if we have FAT channels do not consider that the value of regulatory_bands for the 5000 series is larger than its eeprom size. Using the eeprom size is strange in itself. Use a new EEPROM_REGULATORY_BAND_NO_FAT to indicate no FAT support and test for that explicitly. Signed-off-by: Reinette Chatre Acked-by: Samuel Ortiz Tested-by: Johannes Berg Signed-off-by: John W. Linville --- drivers/net/wireless/iwlwifi/iwl-eeprom.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'drivers/net/wireless/iwlwifi/iwl-eeprom.c') diff --git a/drivers/net/wireless/iwlwifi/iwl-eeprom.c b/drivers/net/wireless/iwlwifi/iwl-eeprom.c index d1d1d9bcfea..75517d05df0 100644 --- a/drivers/net/wireless/iwlwifi/iwl-eeprom.c +++ b/drivers/net/wireless/iwlwifi/iwl-eeprom.c @@ -532,10 +532,10 @@ int iwl_init_channel_map(struct iwl_priv *priv) } /* Check if we do have FAT channels */ - if (priv->cfg->ops->lib->eeprom_ops.regulatory_bands[5] >= - priv->cfg->eeprom_size && - priv->cfg->ops->lib->eeprom_ops.regulatory_bands[6] >= - priv->cfg->eeprom_size) + if (priv->cfg->ops->lib->eeprom_ops.regulatory_bands[5] == + EEPROM_REGULATORY_BAND_NO_FAT && + priv->cfg->ops->lib->eeprom_ops.regulatory_bands[6] == + EEPROM_REGULATORY_BAND_NO_FAT) return 0; /* Two additional EEPROM bands for 2.4 and 5 GHz FAT channels */ -- cgit v1.2.3