aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi
diff options
context:
space:
mode:
authorRon Rindjunsky <ron.rindjunsky@intel.com>2008-06-30 05:23:21 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-06-30 17:37:43 -0400
commit4977929304306b1b0712f9b99e3cbf95f75c31ea (patch)
treeb0ab378f5108da3f85dcd5b3f2fbd55ad06ce341 /drivers/net/wireless/iwlwifi
parentda154e306eb04426a3693c947588d82c3da05337 (diff)
iwlwifi: control 11n capabilities through module param
This patch adds module param 11n_disable to allow configuration of 11n capabilities. The default value of this param is 11n enabled (value 0). 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')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-4965.c8
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-5000.c2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.c16
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.h1
4 files changed, 22 insertions, 5 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c
index 7f6713f32c98..e4eab5196b7f 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
@@ -2075,6 +2075,9 @@ int iwl4965_mac_ampdu_action(struct ieee80211_hw *hw,
2075 IWL_DEBUG_HT("A-MPDU action on addr %s tid %d\n", 2075 IWL_DEBUG_HT("A-MPDU action on addr %s tid %d\n",
2076 print_mac(mac, addr), tid); 2076 print_mac(mac, addr), tid);
2077 2077
2078 if (!(priv->cfg->sku & IWL_SKU_N))
2079 return -EACCES;
2080
2078 switch (action) { 2081 switch (action) {
2079 case IEEE80211_AMPDU_RX_START: 2082 case IEEE80211_AMPDU_RX_START:
2080 IWL_DEBUG_HT("start Rx\n"); 2083 IWL_DEBUG_HT("start Rx\n");
@@ -2457,11 +2460,14 @@ MODULE_PARM_DESC(disable_hw_scan, "disable hardware scanning (default 0)");
2457 2460
2458module_param_named(queues_num, iwl4965_mod_params.num_of_queues, int, 0444); 2461module_param_named(queues_num, iwl4965_mod_params.num_of_queues, int, 0444);
2459MODULE_PARM_DESC(queues_num, "number of hw queues."); 2462MODULE_PARM_DESC(queues_num, "number of hw queues.");
2460
2461/* QoS */ 2463/* QoS */
2462module_param_named(qos_enable, iwl4965_mod_params.enable_qos, int, 0444); 2464module_param_named(qos_enable, iwl4965_mod_params.enable_qos, int, 0444);
2463MODULE_PARM_DESC(qos_enable, "enable all QoS functionality"); 2465MODULE_PARM_DESC(qos_enable, "enable all QoS functionality");
2466/* 11n */
2467module_param_named(11n_disable, iwl4965_mod_params.disable_11n, int, 0444);
2468MODULE_PARM_DESC(11n_disable, "disable 11n functionality");
2464module_param_named(amsdu_size_8K, iwl4965_mod_params.amsdu_size_8K, int, 0444); 2469module_param_named(amsdu_size_8K, iwl4965_mod_params.amsdu_size_8K, int, 0444);
2465MODULE_PARM_DESC(amsdu_size_8K, "enable 8K amsdu size"); 2470MODULE_PARM_DESC(amsdu_size_8K, "enable 8K amsdu size");
2471
2466module_param_named(fw_restart4965, iwl4965_mod_params.restart_fw, int, 0444); 2472module_param_named(fw_restart4965, iwl4965_mod_params.restart_fw, int, 0444);
2467MODULE_PARM_DESC(fw_restart4965, "restart firmware in case of error"); 2473MODULE_PARM_DESC(fw_restart4965, "restart firmware in case of error");
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c
index 75283fb9d5a8..099983f7306a 100644
--- a/drivers/net/wireless/iwlwifi/iwl-5000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-5000.c
@@ -1540,6 +1540,8 @@ module_param_named(queues_num50, iwl50_mod_params.num_of_queues, int, 0444);
1540MODULE_PARM_DESC(queues_num50, "number of hw queues in 50xx series"); 1540MODULE_PARM_DESC(queues_num50, "number of hw queues in 50xx series");
1541module_param_named(qos_enable50, iwl50_mod_params.enable_qos, int, 0444); 1541module_param_named(qos_enable50, iwl50_mod_params.enable_qos, int, 0444);
1542MODULE_PARM_DESC(qos_enable50, "enable all 50XX QoS functionality"); 1542MODULE_PARM_DESC(qos_enable50, "enable all 50XX QoS functionality");
1543module_param_named(11n_disable50, iwl50_mod_params.disable_11n, int, 0444);
1544MODULE_PARM_DESC(11n_disable50, "disable 50XX 11n functionality");
1543module_param_named(amsdu_size_8K50, iwl50_mod_params.amsdu_size_8K, int, 0444); 1545module_param_named(amsdu_size_8K50, iwl50_mod_params.amsdu_size_8K, int, 0444);
1544MODULE_PARM_DESC(amsdu_size_8K50, "enable 8K amsdu size in 50XX series"); 1546MODULE_PARM_DESC(amsdu_size_8K50, "enable 8K amsdu size in 50XX series");
1545module_param_named(fw_restart50, iwl50_mod_params.restart_fw, int, 0444); 1547module_param_named(fw_restart50, iwl50_mod_params.restart_fw, int, 0444);
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index 97447df94d14..08a42a70962e 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -495,7 +495,9 @@ static int iwlcore_init_geos(struct iwl_priv *priv)
495 sband->bitrates = &rates[IWL_FIRST_OFDM_RATE]; 495 sband->bitrates = &rates[IWL_FIRST_OFDM_RATE];
496 sband->n_bitrates = IWL_RATE_COUNT - IWL_FIRST_OFDM_RATE; 496 sband->n_bitrates = IWL_RATE_COUNT - IWL_FIRST_OFDM_RATE;
497 497
498 iwlcore_init_ht_hw_capab(priv, &sband->ht_info, IEEE80211_BAND_5GHZ); 498 if (priv->cfg->sku & IWL_SKU_N)
499 iwlcore_init_ht_hw_capab(priv, &sband->ht_info,
500 IEEE80211_BAND_5GHZ);
499 501
500 sband = &priv->bands[IEEE80211_BAND_2GHZ]; 502 sband = &priv->bands[IEEE80211_BAND_2GHZ];
501 sband->channels = channels; 503 sband->channels = channels;
@@ -503,7 +505,9 @@ static int iwlcore_init_geos(struct iwl_priv *priv)
503 sband->bitrates = rates; 505 sband->bitrates = rates;
504 sband->n_bitrates = IWL_RATE_COUNT; 506 sband->n_bitrates = IWL_RATE_COUNT;
505 507
506 iwlcore_init_ht_hw_capab(priv, &sband->ht_info, IEEE80211_BAND_2GHZ); 508 if (priv->cfg->sku & IWL_SKU_N)
509 iwlcore_init_ht_hw_capab(priv, &sband->ht_info,
510 IEEE80211_BAND_2GHZ);
507 511
508 priv->ieee_channels = channels; 512 priv->ieee_channels = channels;
509 priv->ieee_rates = rates; 513 priv->ieee_rates = rates;
@@ -819,8 +823,9 @@ int iwl_setup_mac(struct iwl_priv *priv)
819 IEEE80211_HW_NOISE_DBM; 823 IEEE80211_HW_NOISE_DBM;
820 /* Default value; 4 EDCA QOS priorities */ 824 /* Default value; 4 EDCA QOS priorities */
821 hw->queues = 4; 825 hw->queues = 4;
822 /* Enhanced value; more queues, to support 11n aggregation */ 826 /* queues to support 11n aggregation */
823 hw->ampdu_queues = 12; 827 if (priv->cfg->sku & IWL_SKU_N)
828 hw->ampdu_queues = 12;
824 829
825 hw->conf.beacon_int = 100; 830 hw->conf.beacon_int = 100;
826 831
@@ -853,6 +858,9 @@ int iwl_set_hw_params(struct iwl_priv *priv)
853 priv->hw_params.rx_buf_size = IWL_RX_BUF_SIZE_4K; 858 priv->hw_params.rx_buf_size = IWL_RX_BUF_SIZE_4K;
854 priv->hw_params.max_pkt_size = priv->hw_params.rx_buf_size - 256; 859 priv->hw_params.max_pkt_size = priv->hw_params.rx_buf_size - 256;
855 860
861 if (priv->cfg->mod_params->disable_11n)
862 priv->cfg->sku &= ~IWL_SKU_N;
863
856 /* Device-specific setup */ 864 /* Device-specific setup */
857 return priv->cfg->ops->lib->set_hw_params(priv); 865 return priv->cfg->ops->lib->set_hw_params(priv);
858} 866}
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h
index f156d27ee9a0..d7562c39dda7 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 disable_hw_scan; /* def: 0 = use h/w scan */ 159 int disable_hw_scan; /* def: 0 = use h/w scan */
160 int num_of_queues; /* def: HW dependent */ 160 int num_of_queues; /* def: HW dependent */
161 int enable_qos; /* def: 1 = use quality of service */ 161 int enable_qos; /* def: 1 = use quality of service */
162 int disable_11n; /* def: 0 = disable 11n capabilities */
162 int amsdu_size_8K; /* def: 1 = enable 8K amsdu size */ 163 int amsdu_size_8K; /* def: 1 = enable 8K amsdu size */
163 int antenna; /* def: 0 = both antennas (use diversity) */ 164 int antenna; /* def: 0 = both antennas (use diversity) */
164 int restart_fw; /* def: 1 = restart firmware */ 165 int restart_fw; /* def: 1 = restart firmware */