diff options
author | Ron Rindjunsky <ron.rindjunsky@intel.com> | 2008-04-15 19:01:45 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-04-16 16:00:01 -0400 |
commit | dfe7d458408188718089f41d0e2330fed13697e2 (patch) | |
tree | 45a603ef533f0716e6875e0d2f26469c609b42d0 | |
parent | 77bab6024c69de781464c6ad094db6996d996938 (diff) |
iwlwifi: arrange max number of Tx queues
This patch increases the max possible number of Tx queues, but leaves
current used number of queues as HW dependent
Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-3945-hw.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-3945.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-4965-hw.h | 10 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-4965.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-4965.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl3945-base.c | 6 |
6 files changed, 17 insertions, 13 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945-hw.h b/drivers/net/wireless/iwlwifi/iwl-3945-hw.h index 368da9852aab..ad612a8719f4 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945-hw.h +++ b/drivers/net/wireless/iwlwifi/iwl-3945-hw.h | |||
@@ -456,7 +456,7 @@ struct iwl3945_eeprom { | |||
456 | /* Size of uCode instruction memory in bootstrap state machine */ | 456 | /* Size of uCode instruction memory in bootstrap state machine */ |
457 | #define IWL_MAX_BSM_SIZE ALM_RTC_INST_SIZE | 457 | #define IWL_MAX_BSM_SIZE ALM_RTC_INST_SIZE |
458 | 458 | ||
459 | #define IWL_MAX_NUM_QUEUES 8 | 459 | #define IWL39_MAX_NUM_QUEUES 8 |
460 | 460 | ||
461 | static inline int iwl3945_hw_valid_rtc_data_addr(u32 addr) | 461 | static inline int iwl3945_hw_valid_rtc_data_addr(u32 addr) |
462 | { | 462 | { |
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.h b/drivers/net/wireless/iwlwifi/iwl-3945.h index 3dc7f0fbf02f..45c1c5533bf0 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945.h +++ b/drivers/net/wireless/iwlwifi/iwl-3945.h | |||
@@ -687,6 +687,8 @@ enum { | |||
687 | 687 | ||
688 | #endif | 688 | #endif |
689 | 689 | ||
690 | #define IWL_MAX_NUM_QUEUES IWL39_MAX_NUM_QUEUES | ||
691 | |||
690 | struct iwl3945_priv { | 692 | struct iwl3945_priv { |
691 | 693 | ||
692 | /* ieee device used by generic ieee processing code */ | 694 | /* ieee device used by generic ieee processing code */ |
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965-hw.h b/drivers/net/wireless/iwlwifi/iwl-4965-hw.h index 3d098da25fc9..1a66b508a8ea 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965-hw.h +++ b/drivers/net/wireless/iwlwifi/iwl-4965-hw.h | |||
@@ -1385,10 +1385,10 @@ static inline __le32 iwl4965_hw_set_rate_n_flags(u8 rate, u16 flags) | |||
1385 | * up to 7 DMA channels (FIFOs). Each Tx queue is supported by a circular array | 1385 | * up to 7 DMA channels (FIFOs). Each Tx queue is supported by a circular array |
1386 | * in DRAM containing 256 Transmit Frame Descriptors (TFDs). | 1386 | * in DRAM containing 256 Transmit Frame Descriptors (TFDs). |
1387 | */ | 1387 | */ |
1388 | #define IWL4965_MAX_WIN_SIZE 64 | 1388 | #define IWL4965_MAX_WIN_SIZE 64 |
1389 | #define IWL4965_QUEUE_SIZE 256 | 1389 | #define IWL4965_QUEUE_SIZE 256 |
1390 | #define IWL4965_NUM_FIFOS 7 | 1390 | #define IWL4965_NUM_FIFOS 7 |
1391 | #define IWL_MAX_NUM_QUEUES 16 | 1391 | #define IWL4965_MAX_NUM_QUEUES 16 |
1392 | 1392 | ||
1393 | 1393 | ||
1394 | /** | 1394 | /** |
@@ -1553,7 +1553,7 @@ struct iwl4965_sched_queue_byte_cnt_tbl { | |||
1553 | */ | 1553 | */ |
1554 | struct iwl4965_shared { | 1554 | struct iwl4965_shared { |
1555 | struct iwl4965_sched_queue_byte_cnt_tbl | 1555 | struct iwl4965_sched_queue_byte_cnt_tbl |
1556 | queues_byte_cnt_tbls[IWL_MAX_NUM_QUEUES]; | 1556 | queues_byte_cnt_tbls[IWL4965_MAX_NUM_QUEUES]; |
1557 | __le32 rb_closed; | 1557 | __le32 rb_closed; |
1558 | 1558 | ||
1559 | /* __le32 rb_closed_stts_rb_num:12; */ | 1559 | /* __le32 rb_closed_stts_rb_num:12; */ |
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c index 2e747129f6b0..b072523c63ee 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965.c +++ b/drivers/net/wireless/iwlwifi/iwl-4965.c | |||
@@ -46,7 +46,7 @@ | |||
46 | 46 | ||
47 | /* module parameters */ | 47 | /* module parameters */ |
48 | static struct iwl_mod_params iwl4965_mod_params = { | 48 | static struct iwl_mod_params iwl4965_mod_params = { |
49 | .num_of_queues = IWL_MAX_NUM_QUEUES, | 49 | .num_of_queues = IWL4965_MAX_NUM_QUEUES, |
50 | .enable_qos = 1, | 50 | .enable_qos = 1, |
51 | .amsdu_size_8K = 1, | 51 | .amsdu_size_8K = 1, |
52 | /* the rest are 0 by default */ | 52 | /* the rest are 0 by default */ |
@@ -2021,10 +2021,10 @@ int iwl4965_alive_notify(struct iwl_priv *priv) | |||
2021 | int iwl4965_hw_set_hw_params(struct iwl_priv *priv) | 2021 | int iwl4965_hw_set_hw_params(struct iwl_priv *priv) |
2022 | { | 2022 | { |
2023 | 2023 | ||
2024 | if ((priv->cfg->mod_params->num_of_queues > IWL_MAX_NUM_QUEUES) || | 2024 | if ((priv->cfg->mod_params->num_of_queues > IWL4965_MAX_NUM_QUEUES) || |
2025 | (priv->cfg->mod_params->num_of_queues < IWL_MIN_NUM_QUEUES)) { | 2025 | (priv->cfg->mod_params->num_of_queues < IWL_MIN_NUM_QUEUES)) { |
2026 | IWL_ERROR("invalid queues_num, should be between %d and %d\n", | 2026 | IWL_ERROR("invalid queues_num, should be between %d and %d\n", |
2027 | IWL_MIN_NUM_QUEUES, IWL_MAX_NUM_QUEUES); | 2027 | IWL_MIN_NUM_QUEUES, IWL4965_MAX_NUM_QUEUES); |
2028 | return -EINVAL; | 2028 | return -EINVAL; |
2029 | } | 2029 | } |
2030 | 2030 | ||
@@ -4362,7 +4362,7 @@ static void iwl4965_rx_reply_compressed_ba(struct iwl_priv *priv, | |||
4362 | * (in Tx queue's circular buffer) of first TFD/frame in window */ | 4362 | * (in Tx queue's circular buffer) of first TFD/frame in window */ |
4363 | u16 ba_resp_scd_ssn = le16_to_cpu(ba_resp->scd_ssn); | 4363 | u16 ba_resp_scd_ssn = le16_to_cpu(ba_resp->scd_ssn); |
4364 | 4364 | ||
4365 | if (scd_flow >= ARRAY_SIZE(priv->txq)) { | 4365 | if (scd_flow >= priv->hw_params.max_txq_num) { |
4366 | IWL_ERROR("BUG_ON scd_flow is bigger than number of queues"); | 4366 | IWL_ERROR("BUG_ON scd_flow is bigger than number of queues"); |
4367 | return; | 4367 | return; |
4368 | } | 4368 | } |
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.h b/drivers/net/wireless/iwlwifi/iwl-4965.h index ddcbad59092b..9ed13cb0a2a9 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965.h +++ b/drivers/net/wireless/iwlwifi/iwl-4965.h | |||
@@ -941,6 +941,8 @@ enum { | |||
941 | 941 | ||
942 | #endif | 942 | #endif |
943 | 943 | ||
944 | #define IWL_MAX_NUM_QUEUES 20 /* FIXME: do dynamic allocation */ | ||
945 | |||
944 | struct iwl_priv { | 946 | struct iwl_priv { |
945 | 947 | ||
946 | /* ieee device used by generic ieee processing code */ | 948 | /* ieee device used by generic ieee processing code */ |
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index 29a9ecdcbf35..1a5678fe4224 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c | |||
@@ -70,7 +70,7 @@ static int iwl3945_param_disable; /* def: 0 = enable radio */ | |||
70 | static int iwl3945_param_antenna; /* def: 0 = both antennas (use diversity) */ | 70 | static int iwl3945_param_antenna; /* def: 0 = both antennas (use diversity) */ |
71 | int iwl3945_param_hwcrypto; /* def: 0 = use software encryption */ | 71 | int iwl3945_param_hwcrypto; /* def: 0 = use software encryption */ |
72 | static int iwl3945_param_qos_enable = 1; /* def: 1 = use quality of service */ | 72 | static int iwl3945_param_qos_enable = 1; /* def: 1 = use quality of service */ |
73 | int iwl3945_param_queues_num = IWL_MAX_NUM_QUEUES; /* def: 8 Tx queues */ | 73 | int iwl3945_param_queues_num = IWL39_MAX_NUM_QUEUES; /* def: 8 Tx queues */ |
74 | 74 | ||
75 | /* | 75 | /* |
76 | * module name, copyright, version, etc. | 76 | * module name, copyright, version, etc. |
@@ -7974,10 +7974,10 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e | |||
7974 | iwl3945_hw_ops.hw_scan = NULL; | 7974 | iwl3945_hw_ops.hw_scan = NULL; |
7975 | } | 7975 | } |
7976 | 7976 | ||
7977 | if ((iwl3945_param_queues_num > IWL_MAX_NUM_QUEUES) || | 7977 | if ((iwl3945_param_queues_num > IWL39_MAX_NUM_QUEUES) || |
7978 | (iwl3945_param_queues_num < IWL_MIN_NUM_QUEUES)) { | 7978 | (iwl3945_param_queues_num < IWL_MIN_NUM_QUEUES)) { |
7979 | IWL_ERROR("invalid queues_num, should be between %d and %d\n", | 7979 | IWL_ERROR("invalid queues_num, should be between %d and %d\n", |
7980 | IWL_MIN_NUM_QUEUES, IWL_MAX_NUM_QUEUES); | 7980 | IWL_MIN_NUM_QUEUES, IWL39_MAX_NUM_QUEUES); |
7981 | err = -EINVAL; | 7981 | err = -EINVAL; |
7982 | goto out; | 7982 | goto out; |
7983 | } | 7983 | } |