diff options
author | Assaf Krauss <assaf.krauss@intel.com> | 2008-03-14 13:38:47 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-03-25 16:41:51 -0400 |
commit | 00acbc91354f7c548ce12a9ebb7fd25c4c3861ae (patch) | |
tree | a1ed43f204a1a3ab4a05187ffa36d8f720d0b190 /drivers/net/wireless/iwlwifi/iwl4965-base.c | |
parent | 316c30d9dddc1bd5b586a6cf9808018746372cc9 (diff) |
iwlwifi: Packing all 4965 parameters
This patch defines a package struct for iwlwifi parameters, and uses a
single instance of this struct to group all iwl4965 module parameters
together.
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 | 45 |
1 files changed, 22 insertions, 23 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c index a2ee34e40b20..465918cf77f1 100644 --- a/drivers/net/wireless/iwlwifi/iwl4965-base.c +++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c | |||
@@ -60,14 +60,12 @@ static int iwl4965_tx_queue_update_write_ptr(struct iwl_priv *priv, | |||
60 | ******************************************************************************/ | 60 | ******************************************************************************/ |
61 | 61 | ||
62 | /* module parameters */ | 62 | /* module parameters */ |
63 | static int iwl4965_param_disable_hw_scan; /* def: 0 = use 4965's h/w scan */ | 63 | struct iwl_mod_params iwl4965_mod_params = { |
64 | static int iwl4965_param_debug; /* def: 0 = minimal debug log messages */ | 64 | .num_of_queues = IWL_MAX_NUM_QUEUES, |
65 | static int iwl4965_param_disable; /* def: enable radio */ | 65 | .enable_qos = 1, |
66 | static int iwl4965_param_antenna; /* def: 0 = both antennas (use diversity) */ | 66 | .amsdu_size_8K = 1, |
67 | int iwl4965_param_hwcrypto; /* def: using software encryption */ | 67 | /* the rest are 0 by default */ |
68 | static int iwl4965_param_qos_enable = 1; /* def: 1 = use quality of service */ | 68 | }; |
69 | int iwl4965_param_queues_num = IWL_MAX_NUM_QUEUES; /* def: 16 Tx queues */ | ||
70 | int iwl4965_param_amsdu_size_8K; /* def: enable 8K amsdu size */ | ||
71 | 69 | ||
72 | /* | 70 | /* |
73 | * module name, copyright, version, etc. | 71 | * module name, copyright, version, etc. |
@@ -7186,7 +7184,7 @@ static int iwl4965_mac_config(struct ieee80211_hw *hw, struct ieee80211_conf *co | |||
7186 | goto out; | 7184 | goto out; |
7187 | } | 7185 | } |
7188 | 7186 | ||
7189 | if (unlikely(!iwl4965_param_disable_hw_scan && | 7187 | if (unlikely(!iwl4965_mod_params.disable_hw_scan && |
7190 | test_bit(STATUS_SCANNING, &priv->status))) { | 7188 | test_bit(STATUS_SCANNING, &priv->status))) { |
7191 | IWL_DEBUG_MAC80211("leave - scanning\n"); | 7189 | IWL_DEBUG_MAC80211("leave - scanning\n"); |
7192 | set_bit(STATUS_CONF_PENDING, &priv->status); | 7190 | set_bit(STATUS_CONF_PENDING, &priv->status); |
@@ -7571,7 +7569,7 @@ static int iwl4965_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, | |||
7571 | 7569 | ||
7572 | IWL_DEBUG_MAC80211("enter\n"); | 7570 | IWL_DEBUG_MAC80211("enter\n"); |
7573 | 7571 | ||
7574 | if (!iwl4965_param_hwcrypto) { | 7572 | if (!iwl4965_mod_params.hw_crypto) { |
7575 | IWL_DEBUG_MAC80211("leave - hwcrypto disabled\n"); | 7573 | IWL_DEBUG_MAC80211("leave - hwcrypto disabled\n"); |
7576 | return -EOPNOTSUPP; | 7574 | return -EOPNOTSUPP; |
7577 | } | 7575 | } |
@@ -8528,7 +8526,7 @@ static int iwl4965_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e | |||
8528 | 8526 | ||
8529 | /* Disabling hardware scan means that mac80211 will perform scans | 8527 | /* Disabling hardware scan means that mac80211 will perform scans |
8530 | * "the hard way", rather than using device's scan. */ | 8528 | * "the hard way", rather than using device's scan. */ |
8531 | if (iwl4965_param_disable_hw_scan) { | 8529 | if (iwl4965_mod_params.disable_hw_scan) { |
8532 | IWL_DEBUG_INFO("Disabling hw_scan\n"); | 8530 | IWL_DEBUG_INFO("Disabling hw_scan\n"); |
8533 | iwl4965_hw_ops.hw_scan = NULL; | 8531 | iwl4965_hw_ops.hw_scan = NULL; |
8534 | } | 8532 | } |
@@ -8551,7 +8549,7 @@ static int iwl4965_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e | |||
8551 | priv->pci_dev = pdev; | 8549 | priv->pci_dev = pdev; |
8552 | 8550 | ||
8553 | #ifdef CONFIG_IWLWIFI_DEBUG | 8551 | #ifdef CONFIG_IWLWIFI_DEBUG |
8554 | iwl_debug_level = iwl4965_param_debug; | 8552 | iwl_debug_level = iwl4965_mod_params.debug; |
8555 | atomic_set(&priv->restrict_refcnt, 0); | 8553 | atomic_set(&priv->restrict_refcnt, 0); |
8556 | #endif | 8554 | #endif |
8557 | 8555 | ||
@@ -8659,7 +8657,7 @@ static int iwl4965_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e | |||
8659 | #endif /* CONFIG_IWL4965_HT */ | 8657 | #endif /* CONFIG_IWL4965_HT */ |
8660 | 8658 | ||
8661 | hw->rate_control_algorithm = "iwl-4965-rs"; | 8659 | hw->rate_control_algorithm = "iwl-4965-rs"; |
8662 | priv->antenna = (enum iwl4965_antenna)iwl4965_param_antenna; | 8660 | priv->antenna = (enum iwl4965_antenna)iwl4965_mod_params.antenna; |
8663 | priv->retry_rate = 1; | 8661 | priv->retry_rate = 1; |
8664 | priv->ibss_beacon = NULL; | 8662 | priv->ibss_beacon = NULL; |
8665 | 8663 | ||
@@ -8732,12 +8730,12 @@ static int iwl4965_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e | |||
8732 | **********************************/ | 8730 | **********************************/ |
8733 | 8731 | ||
8734 | /* Disable radio (SW RF KILL) via parameter when loading driver */ | 8732 | /* Disable radio (SW RF KILL) via parameter when loading driver */ |
8735 | if (iwl4965_param_disable) { | 8733 | if (iwl4965_mod_params.disable) { |
8736 | set_bit(STATUS_RF_KILL_SW, &priv->status); | 8734 | set_bit(STATUS_RF_KILL_SW, &priv->status); |
8737 | IWL_DEBUG_INFO("Radio disabled.\n"); | 8735 | IWL_DEBUG_INFO("Radio disabled.\n"); |
8738 | } | 8736 | } |
8739 | 8737 | ||
8740 | if (iwl4965_param_qos_enable) | 8738 | if (iwl4965_mod_params.enable_qos) |
8741 | priv->qos_data.qos_enable = 1; | 8739 | priv->qos_data.qos_enable = 1; |
8742 | 8740 | ||
8743 | /******************** | 8741 | /******************** |
@@ -8932,25 +8930,26 @@ static void __exit iwl4965_exit(void) | |||
8932 | pci_unregister_driver(&iwl4965_driver); | 8930 | pci_unregister_driver(&iwl4965_driver); |
8933 | } | 8931 | } |
8934 | 8932 | ||
8935 | module_param_named(antenna, iwl4965_param_antenna, int, 0444); | 8933 | module_param_named(antenna, iwl4965_mod_params.antenna, int, 0444); |
8936 | MODULE_PARM_DESC(antenna, "select antenna (1=Main, 2=Aux, default 0 [both])"); | 8934 | MODULE_PARM_DESC(antenna, "select antenna (1=Main, 2=Aux, default 0 [both])"); |
8937 | module_param_named(disable, iwl4965_param_disable, int, 0444); | 8935 | module_param_named(disable, iwl4965_mod_params.disable, int, 0444); |
8938 | MODULE_PARM_DESC(disable, "manually disable the radio (default 0 [radio on])"); | 8936 | MODULE_PARM_DESC(disable, "manually disable the radio (default 0 [radio on])"); |
8939 | module_param_named(hwcrypto, iwl4965_param_hwcrypto, int, 0444); | 8937 | module_param_named(hwcrypto, iwl4965_mod_params.hw_crypto, int, 0444); |
8940 | MODULE_PARM_DESC(hwcrypto, | 8938 | MODULE_PARM_DESC(hwcrypto, |
8941 | "using hardware crypto engine (default 0 [software])\n"); | 8939 | "using hardware crypto engine (default 0 [software])\n"); |
8942 | module_param_named(debug, iwl4965_param_debug, int, 0444); | 8940 | module_param_named(debug, iwl4965_mod_params.debug, int, 0444); |
8943 | MODULE_PARM_DESC(debug, "debug output mask"); | 8941 | MODULE_PARM_DESC(debug, "debug output mask"); |
8944 | module_param_named(disable_hw_scan, iwl4965_param_disable_hw_scan, int, 0444); | 8942 | module_param_named( |
8943 | disable_hw_scan, iwl4965_mod_params.disable_hw_scan, int, 0444); | ||
8945 | MODULE_PARM_DESC(disable_hw_scan, "disable hardware scanning (default 0)"); | 8944 | MODULE_PARM_DESC(disable_hw_scan, "disable hardware scanning (default 0)"); |
8946 | 8945 | ||
8947 | module_param_named(queues_num, iwl4965_param_queues_num, int, 0444); | 8946 | module_param_named(queues_num, iwl4965_mod_params.num_of_queues, int, 0444); |
8948 | MODULE_PARM_DESC(queues_num, "number of hw queues."); | 8947 | MODULE_PARM_DESC(queues_num, "number of hw queues."); |
8949 | 8948 | ||
8950 | /* QoS */ | 8949 | /* QoS */ |
8951 | module_param_named(qos_enable, iwl4965_param_qos_enable, int, 0444); | 8950 | module_param_named(qos_enable, iwl4965_mod_params.enable_qos, int, 0444); |
8952 | MODULE_PARM_DESC(qos_enable, "enable all QoS functionality"); | 8951 | MODULE_PARM_DESC(qos_enable, "enable all QoS functionality"); |
8953 | module_param_named(amsdu_size_8K, iwl4965_param_amsdu_size_8K, int, 0444); | 8952 | module_param_named(amsdu_size_8K, iwl4965_mod_params.amsdu_size_8K, int, 0444); |
8954 | MODULE_PARM_DESC(amsdu_size_8K, "enable 8K amsdu size"); | 8953 | MODULE_PARM_DESC(amsdu_size_8K, "enable 8K amsdu size"); |
8955 | 8954 | ||
8956 | module_exit(iwl4965_exit); | 8955 | module_exit(iwl4965_exit); |