diff options
author | Johannes Berg <johannes.berg@intel.com> | 2011-12-13 03:07:40 -0500 |
---|---|---|
committer | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2011-12-19 16:17:55 -0500 |
commit | 7428994d7991c662d77fc5212a9e42de34c05335 (patch) | |
tree | 28ec4e480501be449494deaf08ca85a6671b5553 | |
parent | b80667eee2af9c1a36ec45a06f9ff85dd8768412 (diff) |
iwlagn: finer-grained HT disable
At least while debugging, a lot of people use
11n_disable=1 to disable HT completely. To be
able to figure out what parts of HT cause the
problems we see, make the parameter a bitmap,
allowing to disable all of HT and aggregation
(TX/RX) separately.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 7 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-mac80211.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-shared.h | 9 |
3 files changed, 15 insertions, 5 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index b2d95e867131..9daa4d970d02 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -1668,7 +1668,7 @@ static int iwl_set_hw_params(struct iwl_priv *priv) | |||
1668 | hw_params(priv).rx_page_order = | 1668 | hw_params(priv).rx_page_order = |
1669 | get_order(IWL_RX_BUF_SIZE_4K); | 1669 | get_order(IWL_RX_BUF_SIZE_4K); |
1670 | 1670 | ||
1671 | if (iwlagn_mod_params.disable_11n) | 1671 | if (iwlagn_mod_params.disable_11n & IWL_DISABLE_HT_ALL) |
1672 | cfg(priv)->sku &= ~EEPROM_SKU_CAP_11N_ENABLE; | 1672 | cfg(priv)->sku &= ~EEPROM_SKU_CAP_11N_ENABLE; |
1673 | 1673 | ||
1674 | hw_params(priv).num_ampdu_queues = | 1674 | hw_params(priv).num_ampdu_queues = |
@@ -1995,8 +1995,9 @@ module_param_named(swcrypto, iwlagn_mod_params.sw_crypto, int, S_IRUGO); | |||
1995 | MODULE_PARM_DESC(swcrypto, "using crypto in software (default 0 [hardware])"); | 1995 | MODULE_PARM_DESC(swcrypto, "using crypto in software (default 0 [hardware])"); |
1996 | module_param_named(queues_num, iwlagn_mod_params.num_of_queues, int, S_IRUGO); | 1996 | module_param_named(queues_num, iwlagn_mod_params.num_of_queues, int, S_IRUGO); |
1997 | MODULE_PARM_DESC(queues_num, "number of hw queues."); | 1997 | MODULE_PARM_DESC(queues_num, "number of hw queues."); |
1998 | module_param_named(11n_disable, iwlagn_mod_params.disable_11n, int, S_IRUGO); | 1998 | module_param_named(11n_disable, iwlagn_mod_params.disable_11n, uint, S_IRUGO); |
1999 | MODULE_PARM_DESC(11n_disable, "disable 11n functionality"); | 1999 | MODULE_PARM_DESC(11n_disable, |
2000 | "disable 11n functionality, bitmap: 1: full, 2: agg TX, 4: agg RX"); | ||
2000 | module_param_named(amsdu_size_8K, iwlagn_mod_params.amsdu_size_8K, | 2001 | module_param_named(amsdu_size_8K, iwlagn_mod_params.amsdu_size_8K, |
2001 | int, S_IRUGO); | 2002 | int, S_IRUGO); |
2002 | MODULE_PARM_DESC(amsdu_size_8K, "enable 8K amsdu size"); | 2003 | MODULE_PARM_DESC(amsdu_size_8K, "enable 8K amsdu size"); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-mac80211.c b/drivers/net/wireless/iwlwifi/iwl-mac80211.c index da689582af63..8dc50dd0b36f 100644 --- a/drivers/net/wireless/iwlwifi/iwl-mac80211.c +++ b/drivers/net/wireless/iwlwifi/iwl-mac80211.c | |||
@@ -633,6 +633,8 @@ static int iwlagn_mac_ampdu_action(struct ieee80211_hw *hw, | |||
633 | 633 | ||
634 | switch (action) { | 634 | switch (action) { |
635 | case IEEE80211_AMPDU_RX_START: | 635 | case IEEE80211_AMPDU_RX_START: |
636 | if (iwlagn_mod_params.disable_11n & IWL_DISABLE_HT_RXAGG) | ||
637 | break; | ||
636 | IWL_DEBUG_HT(priv, "start Rx\n"); | 638 | IWL_DEBUG_HT(priv, "start Rx\n"); |
637 | ret = iwl_sta_rx_agg_start(priv, sta, tid, *ssn); | 639 | ret = iwl_sta_rx_agg_start(priv, sta, tid, *ssn); |
638 | break; | 640 | break; |
@@ -643,6 +645,8 @@ static int iwlagn_mac_ampdu_action(struct ieee80211_hw *hw, | |||
643 | ret = 0; | 645 | ret = 0; |
644 | break; | 646 | break; |
645 | case IEEE80211_AMPDU_TX_START: | 647 | case IEEE80211_AMPDU_TX_START: |
648 | if (iwlagn_mod_params.disable_11n & IWL_DISABLE_HT_TXAGG) | ||
649 | break; | ||
646 | IWL_DEBUG_HT(priv, "start Tx\n"); | 650 | IWL_DEBUG_HT(priv, "start Tx\n"); |
647 | ret = iwlagn_tx_agg_start(priv, vif, sta, tid, ssn); | 651 | ret = iwlagn_tx_agg_start(priv, vif, sta, tid, ssn); |
648 | break; | 652 | break; |
diff --git a/drivers/net/wireless/iwlwifi/iwl-shared.h b/drivers/net/wireless/iwlwifi/iwl-shared.h index 8cf877e43521..66c62580b63c 100644 --- a/drivers/net/wireless/iwlwifi/iwl-shared.h +++ b/drivers/net/wireless/iwlwifi/iwl-shared.h | |||
@@ -107,6 +107,10 @@ struct iwl_trans_ops; | |||
107 | 107 | ||
108 | extern struct iwl_mod_params iwlagn_mod_params; | 108 | extern struct iwl_mod_params iwlagn_mod_params; |
109 | 109 | ||
110 | #define IWL_DISABLE_HT_ALL BIT(0) | ||
111 | #define IWL_DISABLE_HT_TXAGG BIT(1) | ||
112 | #define IWL_DISABLE_HT_RXAGG BIT(2) | ||
113 | |||
110 | /** | 114 | /** |
111 | * struct iwl_mod_params | 115 | * struct iwl_mod_params |
112 | * | 116 | * |
@@ -114,7 +118,8 @@ extern struct iwl_mod_params iwlagn_mod_params; | |||
114 | * | 118 | * |
115 | * @sw_crypto: using hardware encryption, default = 0 | 119 | * @sw_crypto: using hardware encryption, default = 0 |
116 | * @num_of_queues: number of tx queue, HW dependent | 120 | * @num_of_queues: number of tx queue, HW dependent |
117 | * @disable_11n: 11n capabilities enabled, default = 0 | 121 | * @disable_11n: disable 11n capabilities, default = 0, |
122 | * use IWL_DISABLE_HT_* constants | ||
118 | * @amsdu_size_8K: enable 8K amsdu size, default = 1 | 123 | * @amsdu_size_8K: enable 8K amsdu size, default = 1 |
119 | * @antenna: both antennas (use diversity), default = 0 | 124 | * @antenna: both antennas (use diversity), default = 0 |
120 | * @restart_fw: restart firmware, default = 1 | 125 | * @restart_fw: restart firmware, default = 1 |
@@ -135,7 +140,7 @@ extern struct iwl_mod_params iwlagn_mod_params; | |||
135 | struct iwl_mod_params { | 140 | struct iwl_mod_params { |
136 | int sw_crypto; | 141 | int sw_crypto; |
137 | int num_of_queues; | 142 | int num_of_queues; |
138 | int disable_11n; | 143 | unsigned int disable_11n; |
139 | int amsdu_size_8K; | 144 | int amsdu_size_8K; |
140 | int antenna; | 145 | int antenna; |
141 | int restart_fw; | 146 | int restart_fw; |