aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2008-07-10 23:53:35 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-07-14 14:52:59 -0400
commit9f17b318a1e2335b45cf35ad6509b90e972c0e6b (patch)
treed1e532523043f46c72f81d620ff3578e6330e0c3
parent1ff50bda6eef4466366e197541508fc69af0f0c0 (diff)
iwlwifi: differentiate 4965 and 5000 hw ampdu queues number
This patch asks to allocate the correct amount of sw queues according to hw ampdu queues number. Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-4965-hw.h1
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-4965.c19
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-5000-hw.h1
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-5000.c19
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.c2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.h1
6 files changed, 30 insertions, 13 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965-hw.h b/drivers/net/wireless/iwlwifi/iwl-4965-hw.h
index 10f630e1afa6..fce950f4163c 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965-hw.h
+++ b/drivers/net/wireless/iwlwifi/iwl-4965-hw.h
@@ -819,6 +819,7 @@ enum {
819#define IWL49_NUM_FIFOS 7 819#define IWL49_NUM_FIFOS 7
820#define IWL49_CMD_FIFO_NUM 4 820#define IWL49_CMD_FIFO_NUM 4
821#define IWL49_NUM_QUEUES 16 821#define IWL49_NUM_QUEUES 16
822#define IWL49_NUM_AMPDU_QUEUES 8
822 823
823/** 824/**
824 * struct iwl_tfd_frame_data 825 * struct iwl_tfd_frame_data
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c
index e0e43bdb05e0..a20adab6163a 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
@@ -52,6 +52,7 @@ static int iwl4965_hw_get_temperature(const struct iwl_priv *priv);
52/* module parameters */ 52/* module parameters */
53static struct iwl_mod_params iwl4965_mod_params = { 53static struct iwl_mod_params iwl4965_mod_params = {
54 .num_of_queues = IWL49_NUM_QUEUES, 54 .num_of_queues = IWL49_NUM_QUEUES,
55 .num_of_ampdu_queues = IWL49_NUM_AMPDU_QUEUES,
55 .enable_qos = 1, 56 .enable_qos = 1,
56 .amsdu_size_8K = 1, 57 .amsdu_size_8K = 1,
57 .restart_fw = 1, 58 .restart_fw = 1,
@@ -1943,9 +1944,11 @@ static int iwl4965_txq_agg_disable(struct iwl_priv *priv, u16 txq_id,
1943{ 1944{
1944 int ret = 0; 1945 int ret = 0;
1945 1946
1946 if (IWL49_FIRST_AMPDU_QUEUE > txq_id) { 1947 if ((IWL49_FIRST_AMPDU_QUEUE > txq_id) ||
1947 IWL_WARNING("queue number too small: %d, must be > %d\n", 1948 (IWL49_FIRST_AMPDU_QUEUE + IWL49_NUM_AMPDU_QUEUES <= txq_id)) {
1948 txq_id, IWL49_FIRST_AMPDU_QUEUE); 1949 IWL_WARNING("queue number out of range: %d, must be %d to %d\n",
1950 txq_id, IWL49_FIRST_AMPDU_QUEUE,
1951 IWL49_FIRST_AMPDU_QUEUE + IWL49_NUM_AMPDU_QUEUES - 1);
1949 return -EINVAL; 1952 return -EINVAL;
1950 } 1953 }
1951 1954
@@ -2012,9 +2015,13 @@ static int iwl4965_txq_agg_enable(struct iwl_priv *priv, int txq_id,
2012 int ret; 2015 int ret;
2013 u16 ra_tid; 2016 u16 ra_tid;
2014 2017
2015 if (IWL49_FIRST_AMPDU_QUEUE > txq_id) 2018 if ((IWL49_FIRST_AMPDU_QUEUE > txq_id) ||
2016 IWL_WARNING("queue number too small: %d, must be > %d\n", 2019 (IWL49_FIRST_AMPDU_QUEUE + IWL49_NUM_AMPDU_QUEUES <= txq_id)) {
2017 txq_id, IWL49_FIRST_AMPDU_QUEUE); 2020 IWL_WARNING("queue number out of range: %d, must be %d to %d\n",
2021 txq_id, IWL49_FIRST_AMPDU_QUEUE,
2022 IWL49_FIRST_AMPDU_QUEUE + IWL49_NUM_AMPDU_QUEUES - 1);
2023 return -EINVAL;
2024 }
2018 2025
2019 ra_tid = BUILD_RAxTID(sta_id, tid); 2026 ra_tid = BUILD_RAxTID(sta_id, tid);
2020 2027
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000-hw.h b/drivers/net/wireless/iwlwifi/iwl-5000-hw.h
index 4efe0c06b5b2..17d4f31c5934 100644
--- a/drivers/net/wireless/iwlwifi/iwl-5000-hw.h
+++ b/drivers/net/wireless/iwlwifi/iwl-5000-hw.h
@@ -81,6 +81,7 @@
81#define IWL50_QUEUE_SIZE 256 81#define IWL50_QUEUE_SIZE 256
82#define IWL50_CMD_FIFO_NUM 7 82#define IWL50_CMD_FIFO_NUM 7
83#define IWL50_NUM_QUEUES 20 83#define IWL50_NUM_QUEUES 20
84#define IWL50_NUM_AMPDU_QUEUES 10
84#define IWL50_FIRST_AMPDU_QUEUE 10 85#define IWL50_FIRST_AMPDU_QUEUE 10
85 86
86#define IWL_sta_id_POS 12 87#define IWL_sta_id_POS 12
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c
index b518792c7231..878d6193b232 100644
--- a/drivers/net/wireless/iwlwifi/iwl-5000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-5000.c
@@ -1016,9 +1016,13 @@ static int iwl5000_txq_agg_enable(struct iwl_priv *priv, int txq_id,
1016 int ret; 1016 int ret;
1017 u16 ra_tid; 1017 u16 ra_tid;
1018 1018
1019 if (IWL50_FIRST_AMPDU_QUEUE > txq_id) 1019 if ((IWL50_FIRST_AMPDU_QUEUE > txq_id) ||
1020 IWL_WARNING("queue number too small: %d, must be > %d\n", 1020 (IWL50_FIRST_AMPDU_QUEUE + IWL50_NUM_AMPDU_QUEUES <= txq_id)) {
1021 txq_id, IWL50_FIRST_AMPDU_QUEUE); 1021 IWL_WARNING("queue number out of range: %d, must be %d to %d\n",
1022 txq_id, IWL50_FIRST_AMPDU_QUEUE,
1023 IWL50_FIRST_AMPDU_QUEUE + IWL50_NUM_AMPDU_QUEUES - 1);
1024 return -EINVAL;
1025 }
1022 1026
1023 ra_tid = BUILD_RAxTID(sta_id, tid); 1027 ra_tid = BUILD_RAxTID(sta_id, tid);
1024 1028
@@ -1077,9 +1081,11 @@ static int iwl5000_txq_agg_disable(struct iwl_priv *priv, u16 txq_id,
1077{ 1081{
1078 int ret; 1082 int ret;
1079 1083
1080 if (IWL50_FIRST_AMPDU_QUEUE > txq_id) { 1084 if ((IWL50_FIRST_AMPDU_QUEUE > txq_id) ||
1081 IWL_WARNING("queue number too small: %d, must be > %d\n", 1085 (IWL50_FIRST_AMPDU_QUEUE + IWL50_NUM_AMPDU_QUEUES <= txq_id)) {
1082 txq_id, IWL50_FIRST_AMPDU_QUEUE); 1086 IWL_WARNING("queue number out of range: %d, must be %d to %d\n",
1087 txq_id, IWL50_FIRST_AMPDU_QUEUE,
1088 IWL50_FIRST_AMPDU_QUEUE + IWL50_NUM_AMPDU_QUEUES - 1);
1083 return -EINVAL; 1089 return -EINVAL;
1084 } 1090 }
1085 1091
@@ -1501,6 +1507,7 @@ static struct iwl_ops iwl5000_ops = {
1501 1507
1502static struct iwl_mod_params iwl50_mod_params = { 1508static struct iwl_mod_params iwl50_mod_params = {
1503 .num_of_queues = IWL50_NUM_QUEUES, 1509 .num_of_queues = IWL50_NUM_QUEUES,
1510 .num_of_ampdu_queues = IWL50_NUM_AMPDU_QUEUES,
1504 .enable_qos = 1, 1511 .enable_qos = 1,
1505 .amsdu_size_8K = 1, 1512 .amsdu_size_8K = 1,
1506 .restart_fw = 1, 1513 .restart_fw = 1,
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index eee220cf52a2..a44188bf4459 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -825,7 +825,7 @@ int iwl_setup_mac(struct iwl_priv *priv)
825 hw->queues = 4; 825 hw->queues = 4;
826 /* queues to support 11n aggregation */ 826 /* queues to support 11n aggregation */
827 if (priv->cfg->sku & IWL_SKU_N) 827 if (priv->cfg->sku & IWL_SKU_N)
828 hw->ampdu_queues = 12; 828 hw->ampdu_queues = priv->cfg->mod_params->num_of_ampdu_queues;
829 829
830 hw->conf.beacon_int = 100; 830 hw->conf.beacon_int = 100;
831 831
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h
index 8d18227dc4b6..0293ae91c350 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.h
+++ b/drivers/net/wireless/iwlwifi/iwl-core.h
@@ -159,6 +159,7 @@ struct iwl_mod_params {
159 int debug; /* def: 0 = minimal debug log messages */ 159 int debug; /* def: 0 = minimal debug log messages */
160 int disable_hw_scan; /* def: 0 = use h/w scan */ 160 int disable_hw_scan; /* def: 0 = use h/w scan */
161 int num_of_queues; /* def: HW dependent */ 161 int num_of_queues; /* def: HW dependent */
162 int num_of_ampdu_queues;/* def: HW dependent */
162 int enable_qos; /* def: 1 = use quality of service */ 163 int enable_qos; /* def: 1 = use quality of service */
163 int disable_11n; /* def: 0 = disable 11n capabilities */ 164 int disable_11n; /* def: 0 = disable 11n capabilities */
164 int amsdu_size_8K; /* def: 1 = enable 8K amsdu size */ 165 int amsdu_size_8K; /* def: 1 = enable 8K amsdu size */