This option will enable sensitivity calibration for the iwl4965
driver.
-config IWL4965_DEBUG
+config IWLWIFI_DEBUG
bool "Enable full debugging output in iwl4965 driver"
depends on IWL4965
---help---
#include <linux/io.h>
-#include "iwl-4965-debug.h"
+#include "iwl-debug.h"
/*
* IO, register, and NIC memory access functions
*/
#define _iwl4965_write32(priv, ofs, val) writel((val), (priv)->hw_base + (ofs))
-#ifdef CONFIG_IWL4965_DEBUG
+#ifdef CONFIG_IWLWIFI_DEBUG
static inline void __iwl4965_write32(const char *f, u32 l, struct iwl4965_priv *priv,
u32 ofs, u32 val)
{
#endif
#define _iwl4965_read32(priv, ofs) readl((priv)->hw_base + (ofs))
-#ifdef CONFIG_IWL4965_DEBUG
+#ifdef CONFIG_IWLWIFI_DEBUG
static inline u32 __iwl4965_read32(char *f, u32 l, struct iwl4965_priv *priv, u32 ofs)
{
IWL_DEBUG_IO("read_direct32(0x%08X) - %s %d\n", ofs, f, l);
return -ETIMEDOUT;
}
-#ifdef CONFIG_IWL4965_DEBUG
+#ifdef CONFIG_IWLWIFI_DEBUG
static inline int __iwl4965_poll_bit(const char *f, u32 l,
struct iwl4965_priv *priv, u32 addr,
u32 bits, u32 mask, int timeout)
{
_iwl4965_write32(priv, reg, _iwl4965_read32(priv, reg) | mask);
}
-#ifdef CONFIG_IWL4965_DEBUG
+#ifdef CONFIG_IWLWIFI_DEBUG
static inline void __iwl4965_set_bit(const char *f, u32 l,
struct iwl4965_priv *priv, u32 reg, u32 mask)
{
{
_iwl4965_write32(priv, reg, _iwl4965_read32(priv, reg) & ~mask);
}
-#ifdef CONFIG_IWL4965_DEBUG
+#ifdef CONFIG_IWLWIFI_DEBUG
static inline void __iwl4965_clear_bit(const char *f, u32 l,
struct iwl4965_priv *priv, u32 reg, u32 mask)
{
int ret;
u32 gp_ctl;
-#ifdef CONFIG_IWL4965_DEBUG
+#ifdef CONFIG_IWLWIFI_DEBUG
if (atomic_read(&priv->restrict_refcnt))
return 0;
#endif
return -EIO;
}
-#ifdef CONFIG_IWL4965_DEBUG
+#ifdef CONFIG_IWLWIFI_DEBUG
atomic_inc(&priv->restrict_refcnt);
#endif
return 0;
}
-#ifdef CONFIG_IWL4965_DEBUG
+#ifdef CONFIG_IWLWIFI_DEBUG
static inline int __iwl4965_grab_nic_access(const char *f, u32 l,
struct iwl4965_priv *priv)
{
static inline void _iwl4965_release_nic_access(struct iwl4965_priv *priv)
{
-#ifdef CONFIG_IWL4965_DEBUG
+#ifdef CONFIG_IWLWIFI_DEBUG
if (atomic_dec_and_test(&priv->restrict_refcnt))
#endif
_iwl4965_clear_bit(priv, CSR_GP_CNTRL,
CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ);
}
-#ifdef CONFIG_IWL4965_DEBUG
+#ifdef CONFIG_IWLWIFI_DEBUG
static inline void __iwl4965_release_nic_access(const char *f, u32 l,
struct iwl4965_priv *priv)
{
{
return _iwl4965_read32(priv, reg);
}
-#ifdef CONFIG_IWL4965_DEBUG
+#ifdef CONFIG_IWLWIFI_DEBUG
static inline u32 __iwl4965_read_direct32(const char *f, u32 l,
struct iwl4965_priv *priv, u32 reg)
{
{
_iwl4965_write32(priv, reg, value);
}
-#ifdef CONFIG_IWL4965_DEBUG
+#ifdef CONFIG_IWLWIFI_DEBUG
static void __iwl4965_write_direct32(u32 line,
struct iwl4965_priv *priv, u32 reg, u32 value)
{
return -ETIMEDOUT;
}
-#ifdef CONFIG_IWL4965_DEBUG
+#ifdef CONFIG_IWLWIFI_DEBUG
static inline int __iwl4965_poll_direct_bit(const char *f, u32 l,
struct iwl4965_priv *priv,
u32 addr, u32 mask, int timeout)
_iwl4965_write_direct32(priv, HBUS_TARG_PRPH_RADDR, reg | (3 << 24));
return _iwl4965_read_direct32(priv, HBUS_TARG_PRPH_RDAT);
}
-#ifdef CONFIG_IWL4965_DEBUG
+#ifdef CONFIG_IWLWIFI_DEBUG
static inline u32 __iwl4965_read_prph(u32 line, struct iwl4965_priv *priv, u32 reg)
{
if (!atomic_read(&priv->restrict_refcnt))
((addr & 0x0000FFFF) | (3 << 24)));
_iwl4965_write_direct32(priv, HBUS_TARG_PRPH_WDAT, val);
}
-#ifdef CONFIG_IWL4965_DEBUG
+#ifdef CONFIG_IWLWIFI_DEBUG
static inline void __iwl4965_write_prph(u32 line, struct iwl4965_priv *priv,
u32 addr, u32 val)
{
#define _iwl4965_set_bits_prph(priv, reg, mask) \
_iwl4965_write_prph(priv, reg, (_iwl4965_read_prph(priv, reg) | mask))
-#ifdef CONFIG_IWL4965_DEBUG
+#ifdef CONFIG_IWLWIFI_DEBUG
static inline void __iwl4965_set_bits_prph(u32 line, struct iwl4965_priv *priv,
u32 reg, u32 mask)
{
#define _iwl4965_set_bits_mask_prph(priv, reg, bits, mask) \
_iwl4965_write_prph(priv, reg, ((_iwl4965_read_prph(priv, reg) & mask) | bits))
-#ifdef CONFIG_IWL4965_DEBUG
+#ifdef CONFIG_IWLWIFI_DEBUG
static inline void __iwl4965_set_bits_mask_prph(u32 line,
struct iwl4965_priv *priv, u32 reg, u32 bits, u32 mask)
{
static int rs_send_lq_cmd(struct iwl4965_priv *priv,
struct iwl4965_link_quality_cmd *lq, u8 flags)
{
-#ifdef CONFIG_IWL4965_DEBUG
+#ifdef CONFIG_IWLWIFI_DEBUG
int i;
#endif
struct iwl4965_host_cmd cmd = {
IWL_DEBUG_RATE("lq dta 0x%X 0x%X\n",
lq->general_params.single_stream_ant_msk,
lq->general_params.dual_stream_ant_msk);
-#ifdef CONFIG_IWL4965_DEBUG
+#ifdef CONFIG_IWLWIFI_DEBUG
for (i = 0; i < LINK_QUAL_MAX_RETRY_NUM; i++)
IWL_DEBUG_RATE("lq index %d 0x%X\n",
i, lq->rs_table[i].rate_n_flags);
}
}
}
-#ifdef CONFIG_IWL4965_DEBUG
+#ifdef CONFIG_IWLWIFI_DEBUG
/**
* iwl4965_dbg_report_frame - dump frame to syslog during debug sessions
struct iwl4965_rx_frame_end *rx_end = IWL_RX_END(pkt);
u8 *data = IWL_RX_DATA(pkt);
- if (likely(!(iwl4965_debug_level & IWL_DL_RX)))
+ if (likely(!(iwl_debug_level & IWL_DL_RX)))
return;
/* MAC header */
}
}
if (print_dump)
- iwl4965_print_hex_dump(IWL_DL_RX, data, length);
+ iwl_print_hex_dump(IWL_DL_RX, data, length);
}
#else
static inline void iwl4965_dbg_report_frame(struct iwl4965_priv *priv,
#include "iwl-4965-hw.h"
#include "iwl-csr.h"
#include "iwl-prph.h"
-#include "iwl-4965-debug.h"
+#include "iwl-debug.h"
/* Change firmware file name, using "-" and incrementing number,
* *only* when uCode interface or architecture changes so that it
u32 pm_state[16];
#endif
-#ifdef CONFIG_IWL4965_DEBUG
+#ifdef CONFIG_IWLWIFI_DEBUG
/* debugging info */
u32 framecnt_to_us;
atomic_t restrict_refcnt;
#include <linux/module.h>
#include <linux/version.h>
-#include "iwl-4965-debug.h"
+#include "iwl-debug.h"
#include "iwl-eeprom.h"
#include "iwl-core.h"
MODULE_AUTHOR(DRV_COPYRIGHT);
MODULE_LICENSE("GPL/BSD");
-#ifdef CONFIG_IWL4965_DEBUG
-u32 iwl4965_debug_level;
-EXPORT_SYMBOL(iwl4965_debug_level);
+#ifdef CONFIG_IWLWIFI_DEBUG
+u32 iwl_debug_level;
+EXPORT_SYMBOL(iwl_debug_level);
#endif
*
*****************************************************************************/
-#ifndef __iwl4965_debug_h__
-#define __iwl4965_debug_h__
+#ifndef __iwl_debug_h__
+#define __iwl_debug_h__
-#ifdef CONFIG_IWL4965_DEBUG
-extern u32 iwl4965_debug_level;
+#ifdef CONFIG_IWLWIFI_DEBUG
+extern u32 iwl_debug_level;
#define IWL_DEBUG(level, fmt, args...) \
-do { if (iwl4965_debug_level & (level)) \
+do { if (iwl_debug_level & (level)) \
printk(KERN_ERR DRV_NAME": %c %s " fmt, \
in_interrupt() ? 'I' : 'U', __FUNCTION__ , ## args); } while (0)
#define IWL_DEBUG_LIMIT(level, fmt, args...) \
-do { if ((iwl4965_debug_level & (level)) && net_ratelimit()) \
+do { if ((iwl_debug_level & (level)) && net_ratelimit()) \
printk(KERN_ERR DRV_NAME": %c %s " fmt, \
in_interrupt() ? 'I' : 'U', __FUNCTION__ , ## args); } while (0)
-static inline void iwl4965_print_hex_dump(int level, void *p, u32 len)
+static inline void iwl_print_hex_dump(int level, void *p, u32 len)
{
- if (!(iwl4965_debug_level & level))
+ if (!(iwl_debug_level & level))
return;
print_hex_dump(KERN_DEBUG, "iwl data: ", DUMP_PREFIX_OFFSET, 16, 1,
static inline void IWL_DEBUG_LIMIT(int level, const char *fmt, ...)
{
}
-static inline void iwl4965_print_hex_dump(int level, void *p, u32 len)
+static inline void iwl_print_hex_dump(int level, void *p, u32 len)
{
}
-#endif /* CONFIG_IWL4965_DEBUG */
+#endif /* CONFIG_IWLWIFI_DEBUG */
*
* % cat /proc/net/iwl/debug_level
*
- * you simply need to add your entry to the iwl4965_debug_levels array.
+ * you simply need to add your entry to the iwl_debug_levels array.
*
* If you do not see debug_level in /proc/net/iwl then you do not have
- * CONFIG_IWL4965_DEBUG defined in your kernel configuration
+ * CONFIG_IWLWIFI_DEBUG defined in your kernel configuration
*
*/
#include "iwl-4965-commands.h"
#include "iwl-4965.h"
#include "iwl-core.h"
-#include "iwl-4965-debug.h"
+#include "iwl-debug.h"
#include "iwl-eeprom.h"
#include "iwl-4965-io.h"
#define DRV_DESCRIPTION "Intel(R) Wireless WiFi Link 4965AGN driver for Linux"
-#ifdef CONFIG_IWL4965_DEBUG
+#ifdef CONFIG_IWLWIFI_DEBUG
#define VD "d"
#else
#define VD
IWL_DEBUG_DROP("Station %s not in station map. "
"Defaulting to broadcast...\n",
print_mac(mac, hdr->addr1));
- iwl4965_print_hex_dump(IWL_DL_DROP, (u8 *) hdr, sizeof(*hdr));
+ iwl_print_hex_dump(IWL_DL_DROP, (u8 *) hdr, sizeof(*hdr));
return priv->hw_setting.bcast_sta_id;
default:
fc = le16_to_cpu(hdr->frame_control);
-#ifdef CONFIG_IWL4965_DEBUG
+#ifdef CONFIG_IWLWIFI_DEBUG
if (ieee80211_is_auth(fc))
IWL_DEBUG_TX("Sending AUTH frame\n");
else if (ieee80211_is_assoc_request(fc))
txq->need_update = 0;
}
- iwl4965_print_hex_dump(IWL_DL_TX, out_cmd->cmd.payload,
+ iwl_print_hex_dump(IWL_DL_TX, out_cmd->cmd.payload,
sizeof(out_cmd->cmd.tx));
- iwl4965_print_hex_dump(IWL_DL_TX, (u8 *)out_cmd->cmd.tx.hdr,
+ iwl_print_hex_dump(IWL_DL_TX, (u8 *)out_cmd->cmd.tx.hdr,
ieee80211_get_hdrlen(fc));
/* Set up entry for this TFD in Tx byte-count array */
static void iwl4965_rx_pm_sleep_notif(struct iwl4965_priv *priv,
struct iwl4965_rx_mem_buffer *rxb)
{
-#ifdef CONFIG_IWL4965_DEBUG
+#ifdef CONFIG_IWLWIFI_DEBUG
struct iwl4965_rx_packet *pkt = (void *)rxb->skb->data;
struct iwl4965_sleep_notification *sleep = &(pkt->u.sleep_notif);
IWL_DEBUG_RX("sleep mode: %d, src: %d\n",
IWL_DEBUG_RADIO("Dumping %d bytes of unhandled "
"notification for %s:\n",
le32_to_cpu(pkt->len), get_cmd_string(pkt->hdr.cmd));
- iwl4965_print_hex_dump(IWL_DL_RADIO, pkt->u.raw, le32_to_cpu(pkt->len));
+ iwl_print_hex_dump(IWL_DL_RADIO, pkt->u.raw, le32_to_cpu(pkt->len));
}
static void iwl4965_bg_beacon_update(struct work_struct *work)
static void iwl4965_rx_beacon_notif(struct iwl4965_priv *priv,
struct iwl4965_rx_mem_buffer *rxb)
{
-#ifdef CONFIG_IWL4965_DEBUG
+#ifdef CONFIG_IWLWIFI_DEBUG
struct iwl4965_rx_packet *pkt = (void *)rxb->skb->data;
struct iwl4965_beacon_notif *beacon = &(pkt->u.beacon_status);
u8 rate = iwl4965_hw_get_rate(beacon->beacon_notify_hdr.rate_n_flags);
static void iwl4965_rx_reply_scan(struct iwl4965_priv *priv,
struct iwl4965_rx_mem_buffer *rxb)
{
-#ifdef CONFIG_IWL4965_DEBUG
+#ifdef CONFIG_IWLWIFI_DEBUG
struct iwl4965_rx_packet *pkt = (void *)rxb->skb->data;
struct iwl4965_scanreq_notification *notif =
(struct iwl4965_scanreq_notification *)pkt->u.raw;
return rc;
}
-#ifdef CONFIG_IWL4965_DEBUG
+#ifdef CONFIG_IWLWIFI_DEBUG
static void iwl4965_print_rx_config_cmd(struct iwl4965_rxon_cmd *rxon)
{
DECLARE_MAC_BUF(mac);
IWL_DEBUG_RADIO("RX CONFIG:\n");
- iwl4965_print_hex_dump(IWL_DL_RADIO, (u8 *) rxon, sizeof(*rxon));
+ iwl_print_hex_dump(IWL_DL_RADIO, (u8 *) rxon, sizeof(*rxon));
IWL_DEBUG_RADIO("u16 channel: 0x%x\n", le16_to_cpu(rxon->channel));
IWL_DEBUG_RADIO("u32 flags: 0x%08X\n", le32_to_cpu(rxon->flags));
IWL_DEBUG_RADIO("u32 filter_flags: 0x%08x\n",
/* Cancel currently queued command. */
clear_bit(STATUS_HCMD_ACTIVE, &priv->status);
-#ifdef CONFIG_IWL4965_DEBUG
- if (iwl4965_debug_level & IWL_DL_FW_ERRORS) {
+#ifdef CONFIG_IWLWIFI_DEBUG
+ if (iwl_debug_level & IWL_DL_FW_ERRORS) {
iwl4965_dump_nic_error_log(priv);
iwl4965_dump_nic_event_log(priv);
iwl4965_print_rx_config_cmd(&priv->staging_rxon);
u32 inta, handled = 0;
u32 inta_fh;
unsigned long flags;
-#ifdef CONFIG_IWL4965_DEBUG
+#ifdef CONFIG_IWLWIFI_DEBUG
u32 inta_mask;
#endif
inta_fh = iwl4965_read32(priv, CSR_FH_INT_STATUS);
iwl4965_write32(priv, CSR_FH_INT_STATUS, inta_fh);
-#ifdef CONFIG_IWL4965_DEBUG
- if (iwl4965_debug_level & IWL_DL_ISR) {
+#ifdef CONFIG_IWLWIFI_DEBUG
+ if (iwl_debug_level & IWL_DL_ISR) {
/* just for debug */
inta_mask = iwl4965_read32(priv, CSR_INT_MASK);
IWL_DEBUG_ISR("inta 0x%08x, enabled 0x%08x, fh 0x%08x\n",
return;
}
-#ifdef CONFIG_IWL4965_DEBUG
- if (iwl4965_debug_level & (IWL_DL_ISR)) {
+#ifdef CONFIG_IWLWIFI_DEBUG
+ if (iwl_debug_level & (IWL_DL_ISR)) {
/* NIC fires this, but we don't use it, redundant with WAKEUP */
if (inta & CSR_INT_BIT_SCD)
IWL_DEBUG_ISR("Scheduler finished to transmit "
/* Re-enable all interrupts */
iwl4965_enable_interrupts(priv);
-#ifdef CONFIG_IWL4965_DEBUG
- if (iwl4965_debug_level & (IWL_DL_ISR)) {
+#ifdef CONFIG_IWLWIFI_DEBUG
+ if (iwl_debug_level & (IWL_DL_ISR)) {
inta = iwl4965_read32(priv, CSR_INT);
inta_mask = iwl4965_read32(priv, CSR_INT_MASK);
inta_fh = iwl4965_read32(priv, CSR_FH_INT_STATUS);
*
*****************************************************************************/
-#ifdef CONFIG_IWL4965_DEBUG
+#ifdef CONFIG_IWLWIFI_DEBUG
/*
* The following adds a new attribute to the sysfs representation
static ssize_t show_debug_level(struct device_driver *d, char *buf)
{
- return sprintf(buf, "0x%08X\n", iwl4965_debug_level);
+ return sprintf(buf, "0x%08X\n", iwl_debug_level);
}
static ssize_t store_debug_level(struct device_driver *d,
const char *buf, size_t count)
printk(KERN_INFO DRV_NAME
": %s is not in hex or decimal form.\n", buf);
else
- iwl4965_debug_level = val;
+ iwl_debug_level = val;
return strnlen(buf, count);
}
static DRIVER_ATTR(debug_level, S_IWUSR | S_IRUGO,
show_debug_level, store_debug_level);
-#endif /* CONFIG_IWL4965_DEBUG */
+#endif /* CONFIG_IWLWIFI_DEBUG */
static ssize_t show_rf_kill(struct device *d,
struct device_attribute *attr, char *buf)
priv->pci_dev = pdev;
priv->antenna = (enum iwl4965_antenna)iwl4965_param_antenna;
-#ifdef CONFIG_IWL4965_DEBUG
- iwl4965_debug_level = iwl4965_param_debug;
+#ifdef CONFIG_IWLWIFI_DEBUG
+ iwl_debug_level = iwl4965_param_debug;
atomic_set(&priv->restrict_refcnt, 0);
#endif
priv->retry_rate = 1;
IWL_ERROR("Unable to initialize PCI module\n");
return ret;
}
-#ifdef CONFIG_IWL4965_DEBUG
+#ifdef CONFIG_IWLWIFI_DEBUG
ret = driver_create_file(&iwl4965_driver.driver, &driver_attr_debug_level);
if (ret) {
IWL_ERROR("Unable to create driver sysfs file\n");
static void __exit iwl4965_exit(void)
{
-#ifdef CONFIG_IWL4965_DEBUG
+#ifdef CONFIG_IWLWIFI_DEBUG
driver_remove_file(&iwl4965_driver.driver, &driver_attr_debug_level);
#endif
pci_unregister_driver(&iwl4965_driver);