diff options
author | reinette chatre <reinette.chatre@intel.com> | 2009-07-21 12:29:07 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-07-27 15:19:35 -0400 |
commit | 45f5fa32b130b2a59f9b726be45ce7fa73fb834c (patch) | |
tree | d90e0840c0d1be4d84578ec45efac01181419eda /drivers | |
parent | 3995bd9332a51b626237d6671cfeb7235e6c1305 (diff) |
iwlagn: fix minimum number of queues setting
We need to provide a reasonable minimum that will result in a
working setup if used. Set minimum to be 10 to provide for
4 standard TX queues + 1 command queue + 2 (unused) HCCA queues +
4 HT queues (one per AC).
We allow the user to change the number of queues used via a module
parameter and use this minimum value to check if it is valid. Without
this patch a user can select a value for the number of queues that
will result in a failing setup.
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Reviewed-by: Tomas Winkler <tomas.winkler@intel.com>
Acked-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-3945.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-dev.h | 6 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl3945-base.c | 4 |
3 files changed, 7 insertions, 5 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.h b/drivers/net/wireless/iwlwifi/iwl-3945.h index fbb3a573463e..2de6471d4be9 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945.h +++ b/drivers/net/wireless/iwlwifi/iwl-3945.h | |||
@@ -112,7 +112,7 @@ enum iwl3945_antenna { | |||
112 | #define IWL_TX_FIFO_NONE 7 | 112 | #define IWL_TX_FIFO_NONE 7 |
113 | 113 | ||
114 | /* Minimum number of queues. MAX_NUM is defined in hw specific files */ | 114 | /* Minimum number of queues. MAX_NUM is defined in hw specific files */ |
115 | #define IWL_MIN_NUM_QUEUES 4 | 115 | #define IWL39_MIN_NUM_QUEUES 4 |
116 | 116 | ||
117 | #define IEEE80211_DATA_LEN 2304 | 117 | #define IEEE80211_DATA_LEN 2304 |
118 | #define IEEE80211_4ADDR_LEN 30 | 118 | #define IEEE80211_4ADDR_LEN 30 |
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h index e2d620f0b6e8..650e20af20fa 100644 --- a/drivers/net/wireless/iwlwifi/iwl-dev.h +++ b/drivers/net/wireless/iwlwifi/iwl-dev.h | |||
@@ -258,8 +258,10 @@ struct iwl_channel_info { | |||
258 | #define IWL_TX_FIFO_HCCA_2 6 | 258 | #define IWL_TX_FIFO_HCCA_2 6 |
259 | #define IWL_TX_FIFO_NONE 7 | 259 | #define IWL_TX_FIFO_NONE 7 |
260 | 260 | ||
261 | /* Minimum number of queues. MAX_NUM is defined in hw specific files */ | 261 | /* Minimum number of queues. MAX_NUM is defined in hw specific files. |
262 | #define IWL_MIN_NUM_QUEUES 4 | 262 | * Set the minimum to accommodate the 4 standard TX queues, 1 command |
263 | * queue, 2 (unused) HCCA queues, and 4 HT queues (one for each AC) */ | ||
264 | #define IWL_MIN_NUM_QUEUES 10 | ||
263 | 265 | ||
264 | /* Power management (not Tx power) structures */ | 266 | /* Power management (not Tx power) structures */ |
265 | 267 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index 956798f2c80c..2f50ab60bfdf 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c | |||
@@ -4018,10 +4018,10 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e | |||
4018 | SET_IEEE80211_DEV(hw, &pdev->dev); | 4018 | SET_IEEE80211_DEV(hw, &pdev->dev); |
4019 | 4019 | ||
4020 | if ((iwl3945_mod_params.num_of_queues > IWL39_MAX_NUM_QUEUES) || | 4020 | if ((iwl3945_mod_params.num_of_queues > IWL39_MAX_NUM_QUEUES) || |
4021 | (iwl3945_mod_params.num_of_queues < IWL_MIN_NUM_QUEUES)) { | 4021 | (iwl3945_mod_params.num_of_queues < IWL39_MIN_NUM_QUEUES)) { |
4022 | IWL_ERR(priv, | 4022 | IWL_ERR(priv, |
4023 | "invalid queues_num, should be between %d and %d\n", | 4023 | "invalid queues_num, should be between %d and %d\n", |
4024 | IWL_MIN_NUM_QUEUES, IWL39_MAX_NUM_QUEUES); | 4024 | IWL39_MIN_NUM_QUEUES, IWL39_MAX_NUM_QUEUES); |
4025 | err = -EINVAL; | 4025 | err = -EINVAL; |
4026 | goto out_ieee80211_free_hw; | 4026 | goto out_ieee80211_free_hw; |
4027 | } | 4027 | } |