diff options
author | Assaf Krauss <assaf.krauss@intel.com> | 2008-03-18 17:57:50 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-03-25 16:41:58 -0400 |
commit | 1ea8739648cfff4027c3db0f4cee5de87bfd3886 (patch) | |
tree | adc59885cb8b89596b1392a816da1d476f5ac4e2 /drivers/net/wireless/iwlwifi/iwl4965-base.c | |
parent | 83f7d57c37e83ab11009d58565e1010597b88db6 (diff) |
iwlwifi: Completing the parameter packaging
This patch completes the changes regarding the packaging of user
parameters.
Signed-off-by: Assaf Krauss <assaf.krauss@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl4965-base.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl4965-base.c | 46 |
1 files changed, 8 insertions, 38 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c index 8fe09e893279..44cfd0274976 100644 --- a/drivers/net/wireless/iwlwifi/iwl4965-base.c +++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c | |||
@@ -59,14 +59,6 @@ static int iwl4965_tx_queue_update_write_ptr(struct iwl_priv *priv, | |||
59 | * | 59 | * |
60 | ******************************************************************************/ | 60 | ******************************************************************************/ |
61 | 61 | ||
62 | /* module parameters */ | ||
63 | struct iwl_mod_params iwl4965_mod_params = { | ||
64 | .num_of_queues = IWL_MAX_NUM_QUEUES, | ||
65 | .enable_qos = 1, | ||
66 | .amsdu_size_8K = 1, | ||
67 | /* the rest are 0 by default */ | ||
68 | }; | ||
69 | |||
70 | /* | 62 | /* |
71 | * module name, copyright, version, etc. | 63 | * module name, copyright, version, etc. |
72 | * NOTE: DRV_NAME is defined in iwlwifi.h for use by iwl-debug.h and printk | 64 | * NOTE: DRV_NAME is defined in iwlwifi.h for use by iwl-debug.h and printk |
@@ -4933,7 +4925,7 @@ int iwl4965_init_geos(struct iwl_priv *priv) | |||
4933 | sband->bitrates = &rates[IWL_FIRST_OFDM_RATE]; | 4925 | sband->bitrates = &rates[IWL_FIRST_OFDM_RATE]; |
4934 | sband->n_bitrates = IWL_RATE_COUNT - IWL_FIRST_OFDM_RATE; | 4926 | sband->n_bitrates = IWL_RATE_COUNT - IWL_FIRST_OFDM_RATE; |
4935 | 4927 | ||
4936 | iwl4965_init_ht_hw_capab(&sband->ht_info, IEEE80211_BAND_5GHZ); | 4928 | iwl4965_init_ht_hw_capab(priv, &sband->ht_info, IEEE80211_BAND_5GHZ); |
4937 | 4929 | ||
4938 | sband = &priv->bands[IEEE80211_BAND_2GHZ]; | 4930 | sband = &priv->bands[IEEE80211_BAND_2GHZ]; |
4939 | sband->channels = channels; | 4931 | sband->channels = channels; |
@@ -4941,7 +4933,7 @@ int iwl4965_init_geos(struct iwl_priv *priv) | |||
4941 | sband->bitrates = rates; | 4933 | sband->bitrates = rates; |
4942 | sband->n_bitrates = IWL_RATE_COUNT; | 4934 | sband->n_bitrates = IWL_RATE_COUNT; |
4943 | 4935 | ||
4944 | iwl4965_init_ht_hw_capab(&sband->ht_info, IEEE80211_BAND_2GHZ); | 4936 | iwl4965_init_ht_hw_capab(priv, &sband->ht_info, IEEE80211_BAND_2GHZ); |
4945 | 4937 | ||
4946 | priv->ieee_channels = channels; | 4938 | priv->ieee_channels = channels; |
4947 | priv->ieee_rates = rates; | 4939 | priv->ieee_rates = rates; |
@@ -6614,7 +6606,7 @@ static int iwl4965_mac_config(struct ieee80211_hw *hw, struct ieee80211_conf *co | |||
6614 | goto out; | 6606 | goto out; |
6615 | } | 6607 | } |
6616 | 6608 | ||
6617 | if (unlikely(!iwl4965_mod_params.disable_hw_scan && | 6609 | if (unlikely(!priv->cfg->mod_params->disable_hw_scan && |
6618 | test_bit(STATUS_SCANNING, &priv->status))) { | 6610 | test_bit(STATUS_SCANNING, &priv->status))) { |
6619 | IWL_DEBUG_MAC80211("leave - scanning\n"); | 6611 | IWL_DEBUG_MAC80211("leave - scanning\n"); |
6620 | set_bit(STATUS_CONF_PENDING, &priv->status); | 6612 | set_bit(STATUS_CONF_PENDING, &priv->status); |
@@ -7050,7 +7042,7 @@ static int iwl4965_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, | |||
7050 | 7042 | ||
7051 | IWL_DEBUG_MAC80211("enter\n"); | 7043 | IWL_DEBUG_MAC80211("enter\n"); |
7052 | 7044 | ||
7053 | if (!iwl4965_mod_params.hw_crypto) { | 7045 | if (!priv->cfg->mod_params->hw_crypto) { |
7054 | IWL_DEBUG_MAC80211("leave - hwcrypto disabled\n"); | 7046 | IWL_DEBUG_MAC80211("leave - hwcrypto disabled\n"); |
7055 | return -EOPNOTSUPP; | 7047 | return -EOPNOTSUPP; |
7056 | } | 7048 | } |
@@ -8008,7 +8000,7 @@ static int iwl4965_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e | |||
8008 | 8000 | ||
8009 | /* Disabling hardware scan means that mac80211 will perform scans | 8001 | /* Disabling hardware scan means that mac80211 will perform scans |
8010 | * "the hard way", rather than using device's scan. */ | 8002 | * "the hard way", rather than using device's scan. */ |
8011 | if (iwl4965_mod_params.disable_hw_scan) { | 8003 | if (cfg->mod_params->disable_hw_scan) { |
8012 | IWL_DEBUG_INFO("Disabling hw_scan\n"); | 8004 | IWL_DEBUG_INFO("Disabling hw_scan\n"); |
8013 | iwl4965_hw_ops.hw_scan = NULL; | 8005 | iwl4965_hw_ops.hw_scan = NULL; |
8014 | } | 8006 | } |
@@ -8028,7 +8020,7 @@ static int iwl4965_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e | |||
8028 | priv->pci_dev = pdev; | 8020 | priv->pci_dev = pdev; |
8029 | 8021 | ||
8030 | #ifdef CONFIG_IWLWIFI_DEBUG | 8022 | #ifdef CONFIG_IWLWIFI_DEBUG |
8031 | iwl_debug_level = iwl4965_mod_params.debug; | 8023 | iwl_debug_level = priv->cfg->mod_params->debug; |
8032 | atomic_set(&priv->restrict_refcnt, 0); | 8024 | atomic_set(&priv->restrict_refcnt, 0); |
8033 | #endif | 8025 | #endif |
8034 | 8026 | ||
@@ -8126,12 +8118,12 @@ static int iwl4965_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e | |||
8126 | **********************************/ | 8118 | **********************************/ |
8127 | 8119 | ||
8128 | /* Disable radio (SW RF KILL) via parameter when loading driver */ | 8120 | /* Disable radio (SW RF KILL) via parameter when loading driver */ |
8129 | if (iwl4965_mod_params.disable) { | 8121 | if (priv->cfg->mod_params->disable) { |
8130 | set_bit(STATUS_RF_KILL_SW, &priv->status); | 8122 | set_bit(STATUS_RF_KILL_SW, &priv->status); |
8131 | IWL_DEBUG_INFO("Radio disabled.\n"); | 8123 | IWL_DEBUG_INFO("Radio disabled.\n"); |
8132 | } | 8124 | } |
8133 | 8125 | ||
8134 | if (iwl4965_mod_params.enable_qos) | 8126 | if (priv->cfg->mod_params->enable_qos) |
8135 | priv->qos_data.qos_enable = 1; | 8127 | priv->qos_data.qos_enable = 1; |
8136 | 8128 | ||
8137 | /******************** | 8129 | /******************** |
@@ -8322,27 +8314,5 @@ static void __exit iwl4965_exit(void) | |||
8322 | pci_unregister_driver(&iwl4965_driver); | 8314 | pci_unregister_driver(&iwl4965_driver); |
8323 | } | 8315 | } |
8324 | 8316 | ||
8325 | module_param_named(antenna, iwl4965_mod_params.antenna, int, 0444); | ||
8326 | MODULE_PARM_DESC(antenna, "select antenna (1=Main, 2=Aux, default 0 [both])"); | ||
8327 | module_param_named(disable, iwl4965_mod_params.disable, int, 0444); | ||
8328 | MODULE_PARM_DESC(disable, "manually disable the radio (default 0 [radio on])"); | ||
8329 | module_param_named(hwcrypto, iwl4965_mod_params.hw_crypto, int, 0444); | ||
8330 | MODULE_PARM_DESC(hwcrypto, | ||
8331 | "using hardware crypto engine (default 0 [software])\n"); | ||
8332 | module_param_named(debug, iwl4965_mod_params.debug, int, 0444); | ||
8333 | MODULE_PARM_DESC(debug, "debug output mask"); | ||
8334 | module_param_named( | ||
8335 | disable_hw_scan, iwl4965_mod_params.disable_hw_scan, int, 0444); | ||
8336 | MODULE_PARM_DESC(disable_hw_scan, "disable hardware scanning (default 0)"); | ||
8337 | |||
8338 | module_param_named(queues_num, iwl4965_mod_params.num_of_queues, int, 0444); | ||
8339 | MODULE_PARM_DESC(queues_num, "number of hw queues."); | ||
8340 | |||
8341 | /* QoS */ | ||
8342 | module_param_named(qos_enable, iwl4965_mod_params.enable_qos, int, 0444); | ||
8343 | MODULE_PARM_DESC(qos_enable, "enable all QoS functionality"); | ||
8344 | module_param_named(amsdu_size_8K, iwl4965_mod_params.amsdu_size_8K, int, 0444); | ||
8345 | MODULE_PARM_DESC(amsdu_size_8K, "enable 8K amsdu size"); | ||
8346 | |||
8347 | module_exit(iwl4965_exit); | 8317 | module_exit(iwl4965_exit); |
8348 | module_init(iwl4965_init); | 8318 | module_init(iwl4965_init); |