aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2008-12-18 21:37:09 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-01-29 15:58:56 -0500
commita3139c5956702c9ff957ac9fe2d902de355b063e (patch)
tree50df5afc7b5867b13421c6be19ff1e020c18c745 /drivers
parent40b8ec0bfa2d96c9feae2bc1596e9b427c77b8da (diff)
iwl3945: Remove DRV_NAME dependenies
As DRV_NAME is defined in 2 different header files, including both is not possible. This patch defines this constant from iwl3945-base.c and iwl-agn.c. It also redefines the IWL_ERROR and IWL_WARNING macros to use dev_printk, as the IWL_DEBUG_* macros do. Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com> Acked-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-3945.h1
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-4965.c6
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-hcmd-check.c3
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-rs.c9
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c11
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-commands.h4
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.c21
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-debug.h6
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-dev.h1
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-rx.c4
-rw-r--r--drivers/net/wireless/iwlwifi/iwl3945-base.c31
11 files changed, 55 insertions, 42 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.h b/drivers/net/wireless/iwlwifi/iwl-3945.h
index d5154ecbe898..7e9ba5449c56 100644
--- a/drivers/net/wireless/iwlwifi/iwl-3945.h
+++ b/drivers/net/wireless/iwlwifi/iwl-3945.h
@@ -43,7 +43,6 @@
43/* Hardware specific file defines the PCI IDs table for that hardware module */ 43/* Hardware specific file defines the PCI IDs table for that hardware module */
44extern struct pci_device_id iwl3945_hw_card_ids[]; 44extern struct pci_device_id iwl3945_hw_card_ids[];
45 45
46#define DRV_NAME "iwl3945"
47#include "iwl-csr.h" 46#include "iwl-csr.h"
48#include "iwl-prph.h" 47#include "iwl-prph.h"
49#include "iwl-3945-hw.h" 48#include "iwl-3945-hw.h"
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c
index 5a72bc0377de..bb9617092c4e 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
@@ -902,7 +902,6 @@ static s32 iwl4965_get_tx_atten_grp(u16 channel)
902 channel <= CALIB_IWL_TX_ATTEN_GR4_LCH) 902 channel <= CALIB_IWL_TX_ATTEN_GR4_LCH)
903 return CALIB_CH_GROUP_4; 903 return CALIB_CH_GROUP_4;
904 904
905 IWL_ERROR("Can't find txatten group for channel %d.\n", channel);
906 return -1; 905 return -1;
907} 906}
908 907
@@ -1319,8 +1318,11 @@ static int iwl4965_fill_txpower_tbl(struct iwl_priv *priv, u8 band, u16 channel,
1319 /* get txatten group, used to select 1) thermal txpower adjustment 1318 /* get txatten group, used to select 1) thermal txpower adjustment
1320 * and 2) mimo txpower balance between Tx chains. */ 1319 * and 2) mimo txpower balance between Tx chains. */
1321 txatten_grp = iwl4965_get_tx_atten_grp(channel); 1320 txatten_grp = iwl4965_get_tx_atten_grp(channel);
1322 if (txatten_grp < 0) 1321 if (txatten_grp < 0) {
1322 IWL_ERROR("Can't find txatten group for channel %d.\n",
1323 channel);
1323 return -EINVAL; 1324 return -EINVAL;
1325 }
1324 1326
1325 IWL_DEBUG_TXPOWER("channel %d belongs to txatten group %d\n", 1327 IWL_DEBUG_TXPOWER("channel %d belongs to txatten group %d\n",
1326 channel, txatten_grp); 1328 channel, txatten_grp);
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-hcmd-check.c b/drivers/net/wireless/iwlwifi/iwl-agn-hcmd-check.c
index b8137eeae1db..392d96df0b6c 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-hcmd-check.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-hcmd-check.c
@@ -40,10 +40,11 @@
40 * be #ifdef'd out once the driver is stable and folks aren't actively 40 * be #ifdef'd out once the driver is stable and folks aren't actively
41 * making changes 41 * making changes
42 */ 42 */
43int iwl_agn_check_rxon_cmd(struct iwl_rxon_cmd *rxon) 43int iwl_agn_check_rxon_cmd(struct iwl_priv *priv)
44{ 44{
45 int error = 0; 45 int error = 0;
46 int counter = 1; 46 int counter = 1;
47 struct iwl_rxon_cmd *rxon = &priv->staging_rxon;
47 48
48 if (rxon->flags & RXON_FLG_BAND_24G_MSK) { 49 if (rxon->flags & RXON_FLG_BAND_24G_MSK) {
49 error |= le32_to_cpu(rxon->flags & 50 error |= le32_to_cpu(rxon->flags &
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
index 27f50471aed8..19dd9fd9c09a 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
@@ -475,7 +475,8 @@ static u32 rate_n_flags_from_tbl(struct iwl_scale_tbl_info *tbl,
475 475
476 } else if (is_Ht(tbl->lq_type)) { 476 } else if (is_Ht(tbl->lq_type)) {
477 if (index > IWL_LAST_OFDM_RATE) { 477 if (index > IWL_LAST_OFDM_RATE) {
478 IWL_ERROR("invalid HT rate index %d\n", index); 478 printk(KERN_ERR RS_NAME": Invalid HT rate index %d\n",
479 index);
479 index = IWL_LAST_OFDM_RATE; 480 index = IWL_LAST_OFDM_RATE;
480 } 481 }
481 rate_n_flags = RATE_MCS_HT_MSK; 482 rate_n_flags = RATE_MCS_HT_MSK;
@@ -487,7 +488,8 @@ static u32 rate_n_flags_from_tbl(struct iwl_scale_tbl_info *tbl,
487 else 488 else
488 rate_n_flags |= iwl_rates[index].plcp_mimo3; 489 rate_n_flags |= iwl_rates[index].plcp_mimo3;
489 } else { 490 } else {
490 IWL_ERROR("Invalid tbl->lq_type %d\n", tbl->lq_type); 491 printk(KERN_ERR RS_NAME": Invalid tbl->lq_type %d\n",
492 tbl->lq_type);
491 } 493 }
492 494
493 rate_n_flags |= ((tbl->ant_type << RATE_MCS_ANT_POS) & 495 rate_n_flags |= ((tbl->ant_type << RATE_MCS_ANT_POS) &
@@ -507,7 +509,8 @@ static u32 rate_n_flags_from_tbl(struct iwl_scale_tbl_info *tbl,
507 rate_n_flags |= RATE_MCS_GF_MSK; 509 rate_n_flags |= RATE_MCS_GF_MSK;
508 if (is_siso(tbl->lq_type) && tbl->is_SGI) { 510 if (is_siso(tbl->lq_type) && tbl->is_SGI) {
509 rate_n_flags &= ~RATE_MCS_SGI_MSK; 511 rate_n_flags &= ~RATE_MCS_SGI_MSK;
510 IWL_ERROR("GF was set with SGI:SISO\n"); 512 printk(KERN_ERR RS_NAME
513 ": GF was set with SGI:SISO\n");
511 } 514 }
512 } 515 }
513 } 516 }
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index 1e5aadd9e6ad..24e906f75ea9 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -44,6 +44,8 @@
44 44
45#include <asm/div64.h> 45#include <asm/div64.h>
46 46
47#define DRV_NAME "iwlagn"
48
47#include "iwl-eeprom.h" 49#include "iwl-eeprom.h"
48#include "iwl-dev.h" 50#include "iwl-dev.h"
49#include "iwl-core.h" 51#include "iwl-core.h"
@@ -61,9 +63,7 @@
61 63
62/* 64/*
63 * module name, copyright, version, etc. 65 * module name, copyright, version, etc.
64 * NOTE: DRV_NAME is defined in iwlwifi.h for use by iwl-debug.h and printk
65 */ 66 */
66
67#define DRV_DESCRIPTION "Intel(R) Wireless WiFi Link AGN driver for Linux" 67#define DRV_DESCRIPTION "Intel(R) Wireless WiFi Link AGN driver for Linux"
68 68
69#ifdef CONFIG_IWLWIFI_DEBUG 69#ifdef CONFIG_IWLWIFI_DEBUG
@@ -179,7 +179,7 @@ static int iwl_commit_rxon(struct iwl_priv *priv)
179 * 5000, but will not damage 4965 */ 179 * 5000, but will not damage 4965 */
180 priv->staging_rxon.flags |= RXON_FLG_SELF_CTS_EN; 180 priv->staging_rxon.flags |= RXON_FLG_SELF_CTS_EN;
181 181
182 ret = iwl_agn_check_rxon_cmd(&priv->staging_rxon); 182 ret = iwl_agn_check_rxon_cmd(priv);
183 if (ret) { 183 if (ret) {
184 IWL_ERROR("Invalid RXON configuration. Not committing.\n"); 184 IWL_ERROR("Invalid RXON configuration. Not committing.\n");
185 return -EINVAL; 185 return -EINVAL;
@@ -4077,13 +4077,14 @@ static int __init iwl_init(void)
4077 4077
4078 ret = iwlagn_rate_control_register(); 4078 ret = iwlagn_rate_control_register();
4079 if (ret) { 4079 if (ret) {
4080 IWL_ERROR("Unable to register rate control algorithm: %d\n", ret); 4080 printk(KERN_ERR DRV_NAME
4081 "Unable to register rate control algorithm: %d\n", ret);
4081 return ret; 4082 return ret;
4082 } 4083 }
4083 4084
4084 ret = pci_register_driver(&iwl_driver); 4085 ret = pci_register_driver(&iwl_driver);
4085 if (ret) { 4086 if (ret) {
4086 IWL_ERROR("Unable to initialize PCI module\n"); 4087 printk(KERN_ERR DRV_NAME "Unable to initialize PCI module\n");
4087 goto error_register; 4088 goto error_register;
4088 } 4089 }
4089 4090
diff --git a/drivers/net/wireless/iwlwifi/iwl-commands.h b/drivers/net/wireless/iwlwifi/iwl-commands.h
index 958c4a70d515..6a2445da22ff 100644
--- a/drivers/net/wireless/iwlwifi/iwl-commands.h
+++ b/drivers/net/wireless/iwlwifi/iwl-commands.h
@@ -69,6 +69,8 @@
69#ifndef __iwl_commands_h__ 69#ifndef __iwl_commands_h__
70#define __iwl_commands_h__ 70#define __iwl_commands_h__
71 71
72struct iwl_priv;
73
72/* uCode version contains 4 values: Major/Minor/API/Serial */ 74/* uCode version contains 4 values: Major/Minor/API/Serial */
73#define IWL_UCODE_MAJOR(ver) (((ver) & 0xFF000000) >> 24) 75#define IWL_UCODE_MAJOR(ver) (((ver) & 0xFF000000) >> 24)
74#define IWL_UCODE_MINOR(ver) (((ver) & 0x00FF0000) >> 16) 76#define IWL_UCODE_MINOR(ver) (((ver) & 0x00FF0000) >> 16)
@@ -3455,6 +3457,6 @@ struct iwl_rx_packet {
3455 } u; 3457 } u;
3456} __attribute__ ((packed)); 3458} __attribute__ ((packed));
3457 3459
3458int iwl_agn_check_rxon_cmd(struct iwl_rxon_cmd *rxon); 3460int iwl_agn_check_rxon_cmd(struct iwl_priv *priv);
3459 3461
3460#endif /* __iwl_commands_h__ */ 3462#endif /* __iwl_commands_h__ */
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index 313976b29dab..327d1bd4ff0f 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -170,7 +170,8 @@ struct ieee80211_hw *iwl_alloc_all(struct iwl_cfg *cfg,
170 struct ieee80211_hw *hw = 170 struct ieee80211_hw *hw =
171 ieee80211_alloc_hw(sizeof(struct iwl_priv), hw_ops); 171 ieee80211_alloc_hw(sizeof(struct iwl_priv), hw_ops);
172 if (hw == NULL) { 172 if (hw == NULL) {
173 IWL_ERROR("Can not allocate network device\n"); 173 printk(KERN_ERR "%s: Can not allocate network device\n",
174 cfg->name);
174 goto out; 175 goto out;
175 } 176 }
176 177
@@ -510,18 +511,18 @@ static int iwlcore_init_geos(struct iwl_priv *priv)
510 511
511 if ((priv->bands[IEEE80211_BAND_5GHZ].n_channels == 0) && 512 if ((priv->bands[IEEE80211_BAND_5GHZ].n_channels == 0) &&
512 priv->cfg->sku & IWL_SKU_A) { 513 priv->cfg->sku & IWL_SKU_A) {
513 printk(KERN_INFO DRV_NAME 514 dev_printk(KERN_INFO, &(priv->hw->wiphy->dev),
514 ": Incorrectly detected BG card as ABG. Please send " 515 "Incorrectly detected BG card as ABG. Please send "
515 "your PCI ID 0x%04X:0x%04X to maintainer.\n", 516 "your PCI ID 0x%04X:0x%04X to maintainer.\n",
516 priv->pci_dev->device, priv->pci_dev->subsystem_device); 517 priv->pci_dev->device,
518 priv->pci_dev->subsystem_device);
517 priv->cfg->sku &= ~IWL_SKU_A; 519 priv->cfg->sku &= ~IWL_SKU_A;
518 } 520 }
519 521
520 printk(KERN_INFO DRV_NAME 522 dev_printk(KERN_INFO, &(priv->hw->wiphy->dev),
521 ": Tunable channels: %d 802.11bg, %d 802.11a channels\n", 523 "Tunable channels: %d 802.11bg, %d 802.11a channels\n",
522 priv->bands[IEEE80211_BAND_2GHZ].n_channels, 524 priv->bands[IEEE80211_BAND_2GHZ].n_channels,
523 priv->bands[IEEE80211_BAND_5GHZ].n_channels); 525 priv->bands[IEEE80211_BAND_5GHZ].n_channels);
524
525 526
526 set_bit(STATUS_GEO_CONFIGURED, &priv->status); 527 set_bit(STATUS_GEO_CONFIGURED, &priv->status);
527 528
diff --git a/drivers/net/wireless/iwlwifi/iwl-debug.h b/drivers/net/wireless/iwlwifi/iwl-debug.h
index f98921880abf..9c209d635d5a 100644
--- a/drivers/net/wireless/iwlwifi/iwl-debug.h
+++ b/drivers/net/wireless/iwlwifi/iwl-debug.h
@@ -160,8 +160,10 @@ static inline void iwl_dbgfs_unregister(struct iwl_priv *priv)
160#define IWL_DL_TX_REPLY (1 << 30) 160#define IWL_DL_TX_REPLY (1 << 30)
161#define IWL_DL_QOS (1 << 31) 161#define IWL_DL_QOS (1 << 31)
162 162
163#define IWL_ERROR(f, a...) printk(KERN_ERR DRV_NAME ": " f, ## a) 163#define IWL_ERROR(f, a...) dev_printk(KERN_ERR, \
164#define IWL_WARNING(f, a...) printk(KERN_WARNING DRV_NAME ": " f, ## a) 164 &(priv->hw->wiphy->dev), f, ## a)
165#define IWL_WARNING(f, a...) dev_printk(KERN_WARNING, \
166 &(priv->hw->wiphy->dev), f, ## a)
165#define IWL_DEBUG_INFO(f, a...) IWL_DEBUG(IWL_DL_INFO, f, ## a) 167#define IWL_DEBUG_INFO(f, a...) IWL_DEBUG(IWL_DL_INFO, f, ## a)
166 168
167#define IWL_DEBUG_MAC80211(f, a...) IWL_DEBUG(IWL_DL_MAC80211, f, ## a) 169#define IWL_DEBUG_MAC80211(f, a...) IWL_DEBUG(IWL_DL_MAC80211, f, ## a)
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h
index 0468fcc1ea98..73a0b6c53e18 100644
--- a/drivers/net/wireless/iwlwifi/iwl-dev.h
+++ b/drivers/net/wireless/iwlwifi/iwl-dev.h
@@ -36,7 +36,6 @@
36#include <linux/kernel.h> 36#include <linux/kernel.h>
37#include <net/ieee80211_radiotap.h> 37#include <net/ieee80211_radiotap.h>
38 38
39#define DRV_NAME "iwlagn"
40#include "iwl-rfkill.h" 39#include "iwl-rfkill.h"
41#include "iwl-eeprom.h" 40#include "iwl-eeprom.h"
42#include "iwl-4965-hw.h" 41#include "iwl-4965-hw.h"
diff --git a/drivers/net/wireless/iwlwifi/iwl-rx.c b/drivers/net/wireless/iwlwifi/iwl-rx.c
index c5f1aa0feac8..610a7c2b0ada 100644
--- a/drivers/net/wireless/iwlwifi/iwl-rx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-rx.c
@@ -262,8 +262,8 @@ void iwl_rx_allocate(struct iwl_priv *priv)
262 rxb->skb = alloc_skb(priv->hw_params.rx_buf_size + 256, 262 rxb->skb = alloc_skb(priv->hw_params.rx_buf_size + 256,
263 GFP_KERNEL); 263 GFP_KERNEL);
264 if (!rxb->skb) { 264 if (!rxb->skb) {
265 printk(KERN_CRIT DRV_NAME 265 dev_printk(KERN_CRIT, &(priv->hw->wiphy->dev),
266 "Can not allocate SKB buffers\n"); 266 "Can not allocate SKB buffers\n");
267 /* We don't reschedule replenish work here -- we will 267 /* We don't reschedule replenish work here -- we will
268 * call the restock method and if it still needs 268 * call the restock method and if it still needs
269 * more buffers it will schedule replenish */ 269 * more buffers it will schedule replenish */
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index c706ccff159b..c2e0152108d3 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -46,6 +46,8 @@
46 46
47#include <asm/div64.h> 47#include <asm/div64.h>
48 48
49#define DRV_NAME "iwl3945"
50
49#include "iwl-3945-core.h" 51#include "iwl-3945-core.h"
50#include "iwl-commands.h" 52#include "iwl-commands.h"
51#include "iwl-3945.h" 53#include "iwl-3945.h"
@@ -71,7 +73,6 @@ int iwl3945_param_queues_num = IWL39_MAX_NUM_QUEUES; /* def: 8 Tx queues */
71 73
72/* 74/*
73 * module name, copyright, version, etc. 75 * module name, copyright, version, etc.
74 * NOTE: DRV_NAME is defined in iwlwifi.h for use by iwl-debug.h and printk
75 */ 76 */
76 77
77#define DRV_DESCRIPTION \ 78#define DRV_DESCRIPTION \
@@ -847,10 +848,11 @@ static int iwl3945_set_rxon_channel(struct iwl3945_priv *priv,
847 * be #ifdef'd out once the driver is stable and folks aren't actively 848 * be #ifdef'd out once the driver is stable and folks aren't actively
848 * making changes 849 * making changes
849 */ 850 */
850static int iwl3945_check_rxon_cmd(struct iwl3945_rxon_cmd *rxon) 851static int iwl3945_check_rxon_cmd(struct iwl3945_priv *priv)
851{ 852{
852 int error = 0; 853 int error = 0;
853 int counter = 1; 854 int counter = 1;
855 struct iwl3945_rxon_cmd *rxon = &priv->staging_rxon;
854 856
855 if (rxon->flags & RXON_FLG_BAND_24G_MSK) { 857 if (rxon->flags & RXON_FLG_BAND_24G_MSK) {
856 error |= le32_to_cpu(rxon->flags & 858 error |= le32_to_cpu(rxon->flags &
@@ -1031,7 +1033,7 @@ static int iwl3945_commit_rxon(struct iwl3945_priv *priv)
1031 ~(RXON_FLG_DIS_DIV_MSK | RXON_FLG_ANT_SEL_MSK); 1033 ~(RXON_FLG_DIS_DIV_MSK | RXON_FLG_ANT_SEL_MSK);
1032 priv->staging_rxon.flags |= iwl3945_get_antenna_flags(priv); 1034 priv->staging_rxon.flags |= iwl3945_get_antenna_flags(priv);
1033 1035
1034 rc = iwl3945_check_rxon_cmd(&priv->staging_rxon); 1036 rc = iwl3945_check_rxon_cmd(priv);
1035 if (rc) { 1037 if (rc) {
1036 IWL_ERROR("Invalid RXON configuration. Not committing.\n"); 1038 IWL_ERROR("Invalid RXON configuration. Not committing.\n");
1037 return -EINVAL; 1039 return -EINVAL;
@@ -7803,19 +7805,11 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
7803 * 1. Allocating HW data 7805 * 1. Allocating HW data
7804 * ********************/ 7806 * ********************/
7805 7807
7806 if ((iwl3945_param_queues_num > IWL39_MAX_NUM_QUEUES) ||
7807 (iwl3945_param_queues_num < IWL_MIN_NUM_QUEUES)) {
7808 IWL_ERROR("invalid queues_num, should be between %d and %d\n",
7809 IWL_MIN_NUM_QUEUES, IWL39_MAX_NUM_QUEUES);
7810 err = -EINVAL;
7811 goto out;
7812 }
7813
7814 /* mac80211 allocates memory for this device instance, including 7808 /* mac80211 allocates memory for this device instance, including
7815 * space for this driver's private structure */ 7809 * space for this driver's private structure */
7816 hw = ieee80211_alloc_hw(sizeof(struct iwl3945_priv), &iwl3945_hw_ops); 7810 hw = ieee80211_alloc_hw(sizeof(struct iwl3945_priv), &iwl3945_hw_ops);
7817 if (hw == NULL) { 7811 if (hw == NULL) {
7818 IWL_ERROR("Can not allocate network device\n"); 7812 printk(KERN_ERR DRV_NAME "Can not allocate network device\n");
7819 err = -ENOMEM; 7813 err = -ENOMEM;
7820 goto out; 7814 goto out;
7821 } 7815 }
@@ -7827,6 +7821,14 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
7827 priv->pci_dev = pdev; 7821 priv->pci_dev = pdev;
7828 priv->cfg = cfg; 7822 priv->cfg = cfg;
7829 7823
7824 if ((iwl3945_param_queues_num > IWL39_MAX_NUM_QUEUES) ||
7825 (iwl3945_param_queues_num < IWL_MIN_NUM_QUEUES)) {
7826 IWL_ERROR("invalid queues_num, should be between %d and %d\n",
7827 IWL_MIN_NUM_QUEUES, IWL39_MAX_NUM_QUEUES);
7828 err = -EINVAL;
7829 goto out;
7830 }
7831
7830 /* Disabling hardware scan means that mac80211 will perform scans 7832 /* Disabling hardware scan means that mac80211 will perform scans
7831 * "the hard way", rather than using device's scan. */ 7833 * "the hard way", rather than using device's scan. */
7832 if (iwl3945_param_disable_hw_scan) { 7834 if (iwl3945_param_disable_hw_scan) {
@@ -8293,13 +8295,14 @@ static int __init iwl3945_init(void)
8293 8295
8294 ret = iwl3945_rate_control_register(); 8296 ret = iwl3945_rate_control_register();
8295 if (ret) { 8297 if (ret) {
8296 IWL_ERROR("Unable to register rate control algorithm: %d\n", ret); 8298 printk(KERN_ERR DRV_NAME
8299 "Unable to register rate control algorithm: %d\n", ret);
8297 return ret; 8300 return ret;
8298 } 8301 }
8299 8302
8300 ret = pci_register_driver(&iwl3945_driver); 8303 ret = pci_register_driver(&iwl3945_driver);
8301 if (ret) { 8304 if (ret) {
8302 IWL_ERROR("Unable to initialize PCI module\n"); 8305 printk(KERN_ERR DRV_NAME "Unable to initialize PCI module\n");
8303 goto error_register; 8306 goto error_register;
8304 } 8307 }
8305 8308