aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-5000.c
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 /drivers/net/wireless/iwlwifi/iwl-5000.c
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>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-5000.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-5000.c19
1 files changed, 13 insertions, 6 deletions
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,