From: Zhu Yi <yi.zhu@intel.com>
To: linville@tuxdriver.com
Cc: linux-wireless@vger.kernel.org,
Ron Rindjunsky <ron.rindjunsky@intel.com>,
Tomas Winkler <tomas.winkler@intel.com>,
Zhu Yi <yi.zhu@intel.com>
Subject: [PATCH 21/33] iwlwifi: control 11n capabilities through module param
Date: Mon, 30 Jun 2008 17:23:21 +0800 [thread overview]
Message-ID: <1214817813-17639-22-git-send-email-yi.zhu@intel.com> (raw)
In-Reply-To: <1214817813-17639-21-git-send-email-yi.zhu@intel.com>
From: Ron Rindjunsky <ron.rindjunsky@intel.com>
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>
---
drivers/net/wireless/iwlwifi/iwl-4965.c | 8 +++++++-
drivers/net/wireless/iwlwifi/iwl-5000.c | 2 ++
drivers/net/wireless/iwlwifi/iwl-core.c | 16 ++++++++++++----
drivers/net/wireless/iwlwifi/iwl-core.h | 1 +
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 7f6713f..e4eab51 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,
IWL_DEBUG_HT("A-MPDU action on addr %s tid %d\n",
print_mac(mac, addr), tid);
+ if (!(priv->cfg->sku & IWL_SKU_N))
+ return -EACCES;
+
switch (action) {
case IEEE80211_AMPDU_RX_START:
IWL_DEBUG_HT("start Rx\n");
@@ -2457,11 +2460,14 @@ MODULE_PARM_DESC(disable_hw_scan, "disable hardware scanning (default 0)");
module_param_named(queues_num, iwl4965_mod_params.num_of_queues, int, 0444);
MODULE_PARM_DESC(queues_num, "number of hw queues.");
-
/* QoS */
module_param_named(qos_enable, iwl4965_mod_params.enable_qos, int, 0444);
MODULE_PARM_DESC(qos_enable, "enable all QoS functionality");
+/* 11n */
+module_param_named(11n_disable, iwl4965_mod_params.disable_11n, int, 0444);
+MODULE_PARM_DESC(11n_disable, "disable 11n functionality");
module_param_named(amsdu_size_8K, iwl4965_mod_params.amsdu_size_8K, int, 0444);
MODULE_PARM_DESC(amsdu_size_8K, "enable 8K amsdu size");
+
module_param_named(fw_restart4965, iwl4965_mod_params.restart_fw, int, 0444);
MODULE_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 75283fb..099983f 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);
MODULE_PARM_DESC(queues_num50, "number of hw queues in 50xx series");
module_param_named(qos_enable50, iwl50_mod_params.enable_qos, int, 0444);
MODULE_PARM_DESC(qos_enable50, "enable all 50XX QoS functionality");
+module_param_named(11n_disable50, iwl50_mod_params.disable_11n, int, 0444);
+MODULE_PARM_DESC(11n_disable50, "disable 50XX 11n functionality");
module_param_named(amsdu_size_8K50, iwl50_mod_params.amsdu_size_8K, int, 0444);
MODULE_PARM_DESC(amsdu_size_8K50, "enable 8K amsdu size in 50XX series");
module_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 97447df..08a42a7 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)
sband->bitrates = &rates[IWL_FIRST_OFDM_RATE];
sband->n_bitrates = IWL_RATE_COUNT - IWL_FIRST_OFDM_RATE;
- iwlcore_init_ht_hw_capab(priv, &sband->ht_info, IEEE80211_BAND_5GHZ);
+ if (priv->cfg->sku & IWL_SKU_N)
+ iwlcore_init_ht_hw_capab(priv, &sband->ht_info,
+ IEEE80211_BAND_5GHZ);
sband = &priv->bands[IEEE80211_BAND_2GHZ];
sband->channels = channels;
@@ -503,7 +505,9 @@ static int iwlcore_init_geos(struct iwl_priv *priv)
sband->bitrates = rates;
sband->n_bitrates = IWL_RATE_COUNT;
- iwlcore_init_ht_hw_capab(priv, &sband->ht_info, IEEE80211_BAND_2GHZ);
+ if (priv->cfg->sku & IWL_SKU_N)
+ iwlcore_init_ht_hw_capab(priv, &sband->ht_info,
+ IEEE80211_BAND_2GHZ);
priv->ieee_channels = channels;
priv->ieee_rates = rates;
@@ -819,8 +823,9 @@ int iwl_setup_mac(struct iwl_priv *priv)
IEEE80211_HW_NOISE_DBM;
/* Default value; 4 EDCA QOS priorities */
hw->queues = 4;
- /* Enhanced value; more queues, to support 11n aggregation */
- hw->ampdu_queues = 12;
+ /* queues to support 11n aggregation */
+ if (priv->cfg->sku & IWL_SKU_N)
+ hw->ampdu_queues = 12;
hw->conf.beacon_int = 100;
@@ -853,6 +858,9 @@ int iwl_set_hw_params(struct iwl_priv *priv)
priv->hw_params.rx_buf_size = IWL_RX_BUF_SIZE_4K;
priv->hw_params.max_pkt_size = priv->hw_params.rx_buf_size - 256;
+ if (priv->cfg->mod_params->disable_11n)
+ priv->cfg->sku &= ~IWL_SKU_N;
+
/* Device-specific setup */
return priv->cfg->ops->lib->set_hw_params(priv);
}
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h
index f156d27..d7562c3 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 {
int disable_hw_scan; /* def: 0 = use h/w scan */
int num_of_queues; /* def: HW dependent */
int enable_qos; /* def: 1 = use quality of service */
+ int disable_11n; /* def: 0 = disable 11n capabilities */
int amsdu_size_8K; /* def: 1 = enable 8K amsdu size */
int antenna; /* def: 0 = both antennas (use diversity) */
int restart_fw; /* def: 1 = restart firmware */
--
1.5.3.6
next prev parent reply other threads:[~2008-06-30 9:27 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-30 9:23 [PATCH 00/33] iwlwifi driver 06/30 updates Zhu Yi
2008-06-30 9:23 ` [PATCH 01/33] iwlwifi: configure uCode to use open loop tx power algorithm Zhu Yi
2008-06-30 9:23 ` [PATCH 02/33] iwlwifi: Add eeprom version to the version file in sysfs Zhu Yi
2008-06-30 9:23 ` [PATCH 03/33] iwlwifi: better station table maintenance Zhu Yi
2008-06-30 9:23 ` [PATCH 04/33] iwlwifi: use iwl_is_associated when possible Zhu Yi
2008-06-30 9:23 ` [PATCH 05/33] iwlwifi: add REPLY_TX_POWER_DBM_CMD to get_cmd_string Zhu Yi
2008-06-30 9:23 ` [PATCH 06/33] iwlwifi: send ADD_STA before RXON with assoc bit Zhu Yi
2008-06-30 9:23 ` [PATCH 07/33] iwlwifi: move RX stats to core, and move temperature to handler Zhu Yi
2008-06-30 9:23 ` [PATCH 08/33] iwlwifi: don't send REPLY_REMOVE_ALL_STA upon exit Zhu Yi
2008-06-30 9:23 ` [PATCH 09/33] iwlwifi: move RX handlers to iwl-rx.c Zhu Yi
2008-06-30 9:23 ` [PATCH 10/33] iwlwifi: remove useless network and duplicate checking Zhu Yi
2008-06-30 9:23 ` [PATCH 11/33] iwlwifi: setup compressed BA handler Zhu Yi
2008-06-30 9:23 ` [PATCH 12/33] iwlwifi: move rx aggregation functions to iwl-rx.c Zhu Yi
2008-06-30 9:23 ` [PATCH 13/33] iwlwifi: remove obsolete lq_ready use Zhu Yi
2008-06-30 9:23 ` [PATCH 14/33] iwlwifi: fix IBSS association flow Zhu Yi
2008-06-30 9:23 ` [PATCH 15/33] iwlwifi: keep the STATUS_EXIT_PENDING flag till the end of down flow Zhu Yi
2008-06-30 9:23 ` [PATCH 16/33] mac80211: add beacon timestamp to beacon template in IBSS Zhu Yi
2008-06-30 9:23 ` [PATCH 17/33] iwlwifi: adjust TSF " Zhu Yi
2008-06-30 9:23 ` [PATCH 18/33] iwlwifi : Patch adds rfkill subsystem for 3945 Zhu Yi
2008-06-30 9:23 ` [PATCH 19/33] iwlwifi: don't bring up interface if RF-kill avoids radio Zhu Yi
2008-06-30 9:23 ` [PATCH 20/33] iwlwifi: unite common settings of HW params Zhu Yi
2008-06-30 9:23 ` Zhu Yi [this message]
2008-06-30 9:23 ` [PATCH 22/33] iwlwifi: Remove unnecessary code Zhu Yi
2008-06-30 9:23 ` [PATCH 23/33] iwlwifi: eliminate iwl4965_mac_get_tsf Zhu Yi
2008-06-30 9:23 ` [PATCH 24/33] iwlwifi: blocking mac_start until uCode is complete Zhu Yi
2008-06-30 9:23 ` [PATCH 25/33] iwlwifi: clean up HW RF-kill state machine and restarts Zhu Yi
2008-06-30 9:23 ` [PATCH 26/33] iwlwifi: fix 4965 uCode load Zhu Yi
2008-06-30 9:23 ` [PATCH 27/33] iwlwifi: fix incorrect 5GHz rates reported in monitor mode Zhu Yi
2008-06-30 9:23 ` [PATCH 28/33] iwlwifi: fix incorrect monitor mode operation Zhu Yi
2008-06-30 9:23 ` [PATCH 29/33] iwlwifi: drop skb silently for Tx request in monitor mode Zhu Yi
2008-06-30 9:23 ` [PATCH 30/33] iwlwifi: enable packet injection for iwl3945 Zhu Yi
2008-06-30 9:23 ` [PATCH 31/33] iwlwifi: fix iwl4965 temperature callback calibration issue Zhu Yi
2008-06-30 9:23 ` [PATCH 32/33] iwl3945: remove RFKILL_STATE_HARD_BLOCKED warnings Zhu Yi
2008-06-30 9:23 ` [PATCH 33/33] iwlwifi: remove the input device from rfkill_mngr Zhu Yi
2008-06-30 10:07 ` [PATCH 30/33] iwlwifi: enable packet injection for iwl3945 Stefanik Gábor
2008-06-30 10:22 ` [PATCH 29/33] iwlwifi: drop skb silently for Tx request in monitor mode Stefanik Gábor
2008-06-30 10:26 ` Michael Buesch
2008-06-30 10:28 ` Stefanik Gábor
2008-07-02 1:07 ` Zhu Yi
2008-06-30 9:56 ` [PATCH 00/33] iwlwifi driver 06/30 updates drago01
2008-07-02 3:05 ` Zhu Yi
2008-07-02 8:39 ` drago01
2008-07-02 8:41 ` Zhu Yi
2008-07-02 8:51 ` drago01
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1214817813-17639-22-git-send-email-yi.zhu@intel.com \
--to=yi.zhu@intel.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=ron.rindjunsky@intel.com \
--cc=tomas.winkler@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.