diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl3945-base.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl3945-base.c | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index bd6a067b4881..221a875b0161 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c | |||
@@ -612,8 +612,8 @@ static int iwl3945_tx_skb(struct iwl_priv *priv, struct sk_buff *skb) | |||
612 | IWL_DEBUG_TX(priv, "sequence nr = 0X%x \n", | 612 | IWL_DEBUG_TX(priv, "sequence nr = 0X%x \n", |
613 | le16_to_cpu(out_cmd->hdr.sequence)); | 613 | le16_to_cpu(out_cmd->hdr.sequence)); |
614 | IWL_DEBUG_TX(priv, "tx_flags = 0X%x \n", le32_to_cpu(tx->tx_flags)); | 614 | IWL_DEBUG_TX(priv, "tx_flags = 0X%x \n", le32_to_cpu(tx->tx_flags)); |
615 | iwl_print_hex_dump(priv, IWL_DL_TX, tx, sizeof(*tx)); | 615 | iwl_print_hex_dump(IWL_DL_TX, tx, sizeof(*tx)); |
616 | iwl_print_hex_dump(priv, IWL_DL_TX, (u8 *)tx->hdr, | 616 | iwl_print_hex_dump(IWL_DL_TX, (u8 *)tx->hdr, |
617 | ieee80211_hdrlen(fc)); | 617 | ieee80211_hdrlen(fc)); |
618 | 618 | ||
619 | /* | 619 | /* |
@@ -1644,7 +1644,7 @@ static void iwl3945_irq_tasklet(struct iwl_priv *priv) | |||
1644 | iwl_write32(priv, CSR_FH_INT_STATUS, inta_fh); | 1644 | iwl_write32(priv, CSR_FH_INT_STATUS, inta_fh); |
1645 | 1645 | ||
1646 | #ifdef CONFIG_IWLWIFI_DEBUG | 1646 | #ifdef CONFIG_IWLWIFI_DEBUG |
1647 | if (priv->debug_level & IWL_DL_ISR) { | 1647 | if (iwl_debug_level & IWL_DL_ISR) { |
1648 | /* just for debug */ | 1648 | /* just for debug */ |
1649 | inta_mask = iwl_read32(priv, CSR_INT_MASK); | 1649 | inta_mask = iwl_read32(priv, CSR_INT_MASK); |
1650 | IWL_DEBUG_ISR(priv, "inta 0x%08x, enabled 0x%08x, fh 0x%08x\n", | 1650 | IWL_DEBUG_ISR(priv, "inta 0x%08x, enabled 0x%08x, fh 0x%08x\n", |
@@ -1679,7 +1679,7 @@ static void iwl3945_irq_tasklet(struct iwl_priv *priv) | |||
1679 | } | 1679 | } |
1680 | 1680 | ||
1681 | #ifdef CONFIG_IWLWIFI_DEBUG | 1681 | #ifdef CONFIG_IWLWIFI_DEBUG |
1682 | if (priv->debug_level & (IWL_DL_ISR)) { | 1682 | if (iwl_debug_level & (IWL_DL_ISR)) { |
1683 | /* NIC fires this, but we don't use it, redundant with WAKEUP */ | 1683 | /* NIC fires this, but we don't use it, redundant with WAKEUP */ |
1684 | if (inta & CSR_INT_BIT_SCD) { | 1684 | if (inta & CSR_INT_BIT_SCD) { |
1685 | IWL_DEBUG_ISR(priv, "Scheduler finished to transmit " | 1685 | IWL_DEBUG_ISR(priv, "Scheduler finished to transmit " |
@@ -1758,7 +1758,7 @@ static void iwl3945_irq_tasklet(struct iwl_priv *priv) | |||
1758 | iwl_enable_interrupts(priv); | 1758 | iwl_enable_interrupts(priv); |
1759 | 1759 | ||
1760 | #ifdef CONFIG_IWLWIFI_DEBUG | 1760 | #ifdef CONFIG_IWLWIFI_DEBUG |
1761 | if (priv->debug_level & (IWL_DL_ISR)) { | 1761 | if (iwl_debug_level & (IWL_DL_ISR)) { |
1762 | inta = iwl_read32(priv, CSR_INT); | 1762 | inta = iwl_read32(priv, CSR_INT); |
1763 | inta_mask = iwl_read32(priv, CSR_INT_MASK); | 1763 | inta_mask = iwl_read32(priv, CSR_INT_MASK); |
1764 | inta_fh = iwl_read32(priv, CSR_FH_INT_STATUS); | 1764 | inta_fh = iwl_read32(priv, CSR_FH_INT_STATUS); |
@@ -3308,13 +3308,15 @@ static int iwl3945_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, | |||
3308 | * used for controlling the debug level. | 3308 | * used for controlling the debug level. |
3309 | * | 3309 | * |
3310 | * See the level definitions in iwl for details. | 3310 | * See the level definitions in iwl for details. |
3311 | * | ||
3312 | * FIXME This file can be deprecated as the module parameter is | ||
3313 | * writable and users can thus also change the debug level | ||
3314 | * using the /sys/module/iwl3945/parameters/debug file. | ||
3311 | */ | 3315 | */ |
3312 | static ssize_t show_debug_level(struct device *d, | 3316 | static ssize_t show_debug_level(struct device *d, |
3313 | struct device_attribute *attr, char *buf) | 3317 | struct device_attribute *attr, char *buf) |
3314 | { | 3318 | { |
3315 | struct iwl_priv *priv = dev_get_drvdata(d); | 3319 | return sprintf(buf, "0x%08X\n", iwl_debug_level); |
3316 | |||
3317 | return sprintf(buf, "0x%08X\n", priv->debug_level); | ||
3318 | } | 3320 | } |
3319 | static ssize_t store_debug_level(struct device *d, | 3321 | static ssize_t store_debug_level(struct device *d, |
3320 | struct device_attribute *attr, | 3322 | struct device_attribute *attr, |
@@ -3328,7 +3330,7 @@ static ssize_t store_debug_level(struct device *d, | |||
3328 | if (ret) | 3330 | if (ret) |
3329 | IWL_INFO(priv, "%s is not in hex or decimal form.\n", buf); | 3331 | IWL_INFO(priv, "%s is not in hex or decimal form.\n", buf); |
3330 | else | 3332 | else |
3331 | priv->debug_level = val; | 3333 | iwl_debug_level = val; |
3332 | 3334 | ||
3333 | return strnlen(buf, count); | 3335 | return strnlen(buf, count); |
3334 | } | 3336 | } |
@@ -3966,7 +3968,6 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e | |||
3966 | priv->inta_mask = CSR_INI_SET_MASK; | 3968 | priv->inta_mask = CSR_INI_SET_MASK; |
3967 | 3969 | ||
3968 | #ifdef CONFIG_IWLWIFI_DEBUG | 3970 | #ifdef CONFIG_IWLWIFI_DEBUG |
3969 | priv->debug_level = iwl3945_mod_params.debug; | ||
3970 | atomic_set(&priv->restrict_refcnt, 0); | 3971 | atomic_set(&priv->restrict_refcnt, 0); |
3971 | #endif | 3972 | #endif |
3972 | 3973 | ||
@@ -4262,8 +4263,10 @@ MODULE_PARM_DESC(antenna, "select antenna (1=Main, 2=Aux, default 0 [both])"); | |||
4262 | module_param_named(swcrypto, iwl3945_mod_params.sw_crypto, int, 0444); | 4263 | module_param_named(swcrypto, iwl3945_mod_params.sw_crypto, int, 0444); |
4263 | MODULE_PARM_DESC(swcrypto, | 4264 | MODULE_PARM_DESC(swcrypto, |
4264 | "using software crypto (default 1 [software])\n"); | 4265 | "using software crypto (default 1 [software])\n"); |
4265 | module_param_named(debug, iwl3945_mod_params.debug, uint, 0444); | 4266 | #ifdef CONFIG_IWLWIFI_DEBUG |
4267 | module_param_named(debug, iwl_debug_level, uint, 0644); | ||
4266 | MODULE_PARM_DESC(debug, "debug output mask"); | 4268 | MODULE_PARM_DESC(debug, "debug output mask"); |
4269 | #endif | ||
4267 | module_param_named(disable_hw_scan, iwl3945_mod_params.disable_hw_scan, int, 0444); | 4270 | module_param_named(disable_hw_scan, iwl3945_mod_params.disable_hw_scan, int, 0444); |
4268 | MODULE_PARM_DESC(disable_hw_scan, "disable hardware scanning (default 0)"); | 4271 | MODULE_PARM_DESC(disable_hw_scan, "disable hardware scanning (default 0)"); |
4269 | module_param_named(fw_restart3945, iwl3945_mod_params.restart_fw, int, 0444); | 4272 | module_param_named(fw_restart3945, iwl3945_mod_params.restart_fw, int, 0444); |