aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl4965-base.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl4965-base.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl4965-base.c36
1 files changed, 23 insertions, 13 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c
index 8427bc9a9bbc..9f51d3a61f36 100644
--- a/drivers/net/wireless/iwlwifi/iwl4965-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c
@@ -145,6 +145,7 @@ static const char *iwl4965_escape_essid(const char *essid, u8 essid_len)
145 return escaped; 145 return escaped;
146} 146}
147 147
148
148/*************** DMA-QUEUE-GENERAL-FUNCTIONS ***** 149/*************** DMA-QUEUE-GENERAL-FUNCTIONS *****
149 * DMA services 150 * DMA services
150 * 151 *
@@ -1914,7 +1915,7 @@ static int iwl4965_get_sta_id(struct iwl_priv *priv,
1914 IWL_DEBUG_DROP("Station %s not in station map. " 1915 IWL_DEBUG_DROP("Station %s not in station map. "
1915 "Defaulting to broadcast...\n", 1916 "Defaulting to broadcast...\n",
1916 print_mac(mac, hdr->addr1)); 1917 print_mac(mac, hdr->addr1));
1917 iwl_print_hex_dump(IWL_DL_DROP, (u8 *) hdr, sizeof(*hdr)); 1918 iwl_print_hex_dump(priv, IWL_DL_DROP, (u8 *) hdr, sizeof(*hdr));
1918 return priv->hw_params.bcast_sta_id; 1919 return priv->hw_params.bcast_sta_id;
1919 1920
1920 default: 1921 default:
@@ -2130,10 +2131,10 @@ static int iwl4965_tx_skb(struct iwl_priv *priv,
2130 txq->need_update = 0; 2131 txq->need_update = 0;
2131 } 2132 }
2132 2133
2133 iwl_print_hex_dump(IWL_DL_TX, out_cmd->cmd.payload, 2134 iwl_print_hex_dump(priv, IWL_DL_TX, out_cmd->cmd.payload,
2134 sizeof(out_cmd->cmd.tx)); 2135 sizeof(out_cmd->cmd.tx));
2135 2136
2136 iwl_print_hex_dump(IWL_DL_TX, (u8 *)out_cmd->cmd.tx.hdr, 2137 iwl_print_hex_dump(priv, IWL_DL_TX, (u8 *)out_cmd->cmd.tx.hdr,
2137 ieee80211_get_hdrlen(fc)); 2138 ieee80211_get_hdrlen(fc));
2138 2139
2139 /* Set up entry for this TFD in Tx byte-count array */ 2140 /* Set up entry for this TFD in Tx byte-count array */
@@ -2911,7 +2912,7 @@ static void iwl4965_rx_pm_debug_statistics_notif(struct iwl_priv *priv,
2911 IWL_DEBUG_RADIO("Dumping %d bytes of unhandled " 2912 IWL_DEBUG_RADIO("Dumping %d bytes of unhandled "
2912 "notification for %s:\n", 2913 "notification for %s:\n",
2913 le32_to_cpu(pkt->len), get_cmd_string(pkt->hdr.cmd)); 2914 le32_to_cpu(pkt->len), get_cmd_string(pkt->hdr.cmd));
2914 iwl_print_hex_dump(IWL_DL_RADIO, pkt->u.raw, le32_to_cpu(pkt->len)); 2915 iwl_print_hex_dump(priv, IWL_DL_RADIO, pkt->u.raw, le32_to_cpu(pkt->len));
2915} 2916}
2916 2917
2917static void iwl4965_bg_beacon_update(struct work_struct *work) 2918static void iwl4965_bg_beacon_update(struct work_struct *work)
@@ -3484,12 +3485,13 @@ static int iwl4965_tx_queue_update_write_ptr(struct iwl_priv *priv,
3484} 3485}
3485 3486
3486#ifdef CONFIG_IWLWIFI_DEBUG 3487#ifdef CONFIG_IWLWIFI_DEBUG
3487static void iwl4965_print_rx_config_cmd(struct iwl4965_rxon_cmd *rxon) 3488static void iwl4965_print_rx_config_cmd(struct iwl_priv *priv)
3488{ 3489{
3490 struct iwl4965_rxon_cmd *rxon = &priv->staging_rxon;
3489 DECLARE_MAC_BUF(mac); 3491 DECLARE_MAC_BUF(mac);
3490 3492
3491 IWL_DEBUG_RADIO("RX CONFIG:\n"); 3493 IWL_DEBUG_RADIO("RX CONFIG:\n");
3492 iwl_print_hex_dump(IWL_DL_RADIO, (u8 *) rxon, sizeof(*rxon)); 3494 iwl_print_hex_dump(priv, IWL_DL_RADIO, (u8 *) rxon, sizeof(*rxon));
3493 IWL_DEBUG_RADIO("u16 channel: 0x%x\n", le16_to_cpu(rxon->channel)); 3495 IWL_DEBUG_RADIO("u16 channel: 0x%x\n", le16_to_cpu(rxon->channel));
3494 IWL_DEBUG_RADIO("u32 flags: 0x%08X\n", le32_to_cpu(rxon->flags)); 3496 IWL_DEBUG_RADIO("u32 flags: 0x%08X\n", le32_to_cpu(rxon->flags));
3495 IWL_DEBUG_RADIO("u32 filter_flags: 0x%08x\n", 3497 IWL_DEBUG_RADIO("u32 filter_flags: 0x%08x\n",
@@ -3715,10 +3717,10 @@ static void iwl4965_irq_handle_error(struct iwl_priv *priv)
3715 clear_bit(STATUS_HCMD_ACTIVE, &priv->status); 3717 clear_bit(STATUS_HCMD_ACTIVE, &priv->status);
3716 3718
3717#ifdef CONFIG_IWLWIFI_DEBUG 3719#ifdef CONFIG_IWLWIFI_DEBUG
3718 if (iwl_debug_level & IWL_DL_FW_ERRORS) { 3720 if (priv->debug_level & IWL_DL_FW_ERRORS) {
3719 iwl4965_dump_nic_error_log(priv); 3721 iwl4965_dump_nic_error_log(priv);
3720 iwl4965_dump_nic_event_log(priv); 3722 iwl4965_dump_nic_event_log(priv);
3721 iwl4965_print_rx_config_cmd(&priv->staging_rxon); 3723 iwl4965_print_rx_config_cmd(priv);
3722 } 3724 }
3723#endif 3725#endif
3724 3726
@@ -3782,7 +3784,7 @@ static void iwl4965_irq_tasklet(struct iwl_priv *priv)
3782 iwl_write32(priv, CSR_FH_INT_STATUS, inta_fh); 3784 iwl_write32(priv, CSR_FH_INT_STATUS, inta_fh);
3783 3785
3784#ifdef CONFIG_IWLWIFI_DEBUG 3786#ifdef CONFIG_IWLWIFI_DEBUG
3785 if (iwl_debug_level & IWL_DL_ISR) { 3787 if (priv->debug_level & IWL_DL_ISR) {
3786 /* just for debug */ 3788 /* just for debug */
3787 inta_mask = iwl_read32(priv, CSR_INT_MASK); 3789 inta_mask = iwl_read32(priv, CSR_INT_MASK);
3788 IWL_DEBUG_ISR("inta 0x%08x, enabled 0x%08x, fh 0x%08x\n", 3790 IWL_DEBUG_ISR("inta 0x%08x, enabled 0x%08x, fh 0x%08x\n",
@@ -3816,7 +3818,7 @@ static void iwl4965_irq_tasklet(struct iwl_priv *priv)
3816 } 3818 }
3817 3819
3818#ifdef CONFIG_IWLWIFI_DEBUG 3820#ifdef CONFIG_IWLWIFI_DEBUG
3819 if (iwl_debug_level & (IWL_DL_ISR)) { 3821 if (priv->debug_level & (IWL_DL_ISR)) {
3820 /* NIC fires this, but we don't use it, redundant with WAKEUP */ 3822 /* NIC fires this, but we don't use it, redundant with WAKEUP */
3821 if (inta & CSR_INT_BIT_SCD) 3823 if (inta & CSR_INT_BIT_SCD)
3822 IWL_DEBUG_ISR("Scheduler finished to transmit " 3824 IWL_DEBUG_ISR("Scheduler finished to transmit "
@@ -3909,7 +3911,7 @@ static void iwl4965_irq_tasklet(struct iwl_priv *priv)
3909 iwl4965_enable_interrupts(priv); 3911 iwl4965_enable_interrupts(priv);
3910 3912
3911#ifdef CONFIG_IWLWIFI_DEBUG 3913#ifdef CONFIG_IWLWIFI_DEBUG
3912 if (iwl_debug_level & (IWL_DL_ISR)) { 3914 if (priv->debug_level & (IWL_DL_ISR)) {
3913 inta = iwl_read32(priv, CSR_INT); 3915 inta = iwl_read32(priv, CSR_INT);
3914 inta_mask = iwl_read32(priv, CSR_INT_MASK); 3916 inta_mask = iwl_read32(priv, CSR_INT_MASK);
3915 inta_fh = iwl_read32(priv, CSR_FH_INT_STATUS); 3917 inta_fh = iwl_read32(priv, CSR_FH_INT_STATUS);
@@ -6049,6 +6051,9 @@ static int iwl4965_mac_get_tx_stats(struct ieee80211_hw *hw,
6049static int iwl4965_mac_get_stats(struct ieee80211_hw *hw, 6051static int iwl4965_mac_get_stats(struct ieee80211_hw *hw,
6050 struct ieee80211_low_level_stats *stats) 6052 struct ieee80211_low_level_stats *stats)
6051{ 6053{
6054 struct iwl_priv *priv = hw->priv;
6055
6056 priv = hw->priv;
6052 IWL_DEBUG_MAC80211("enter\n"); 6057 IWL_DEBUG_MAC80211("enter\n");
6053 IWL_DEBUG_MAC80211("leave\n"); 6058 IWL_DEBUG_MAC80211("leave\n");
6054 6059
@@ -6057,6 +6062,9 @@ static int iwl4965_mac_get_stats(struct ieee80211_hw *hw,
6057 6062
6058static u64 iwl4965_mac_get_tsf(struct ieee80211_hw *hw) 6063static u64 iwl4965_mac_get_tsf(struct ieee80211_hw *hw)
6059{ 6064{
6065 struct iwl_priv *priv;
6066
6067 priv = hw->priv;
6060 IWL_DEBUG_MAC80211("enter\n"); 6068 IWL_DEBUG_MAC80211("enter\n");
6061 IWL_DEBUG_MAC80211("leave\n"); 6069 IWL_DEBUG_MAC80211("leave\n");
6062 6070
@@ -6706,7 +6714,9 @@ static int iwl4965_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
6706 /* Disabling hardware scan means that mac80211 will perform scans 6714 /* Disabling hardware scan means that mac80211 will perform scans
6707 * "the hard way", rather than using device's scan. */ 6715 * "the hard way", rather than using device's scan. */
6708 if (cfg->mod_params->disable_hw_scan) { 6716 if (cfg->mod_params->disable_hw_scan) {
6709 IWL_DEBUG_INFO("Disabling hw_scan\n"); 6717 if (cfg->mod_params->debug & IWL_DL_INFO)
6718 dev_printk(KERN_DEBUG, &(pdev->dev),
6719 "Disabling hw_scan\n");
6710 iwl4965_hw_ops.hw_scan = NULL; 6720 iwl4965_hw_ops.hw_scan = NULL;
6711 } 6721 }
6712 6722
@@ -6725,7 +6735,7 @@ static int iwl4965_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
6725 priv->pci_dev = pdev; 6735 priv->pci_dev = pdev;
6726 6736
6727#ifdef CONFIG_IWLWIFI_DEBUG 6737#ifdef CONFIG_IWLWIFI_DEBUG
6728 iwl_debug_level = priv->cfg->mod_params->debug; 6738 priv->debug_level = priv->cfg->mod_params->debug;
6729 atomic_set(&priv->restrict_refcnt, 0); 6739 atomic_set(&priv->restrict_refcnt, 0);
6730#endif 6740#endif
6731 6741