diff options
author | Christoph Hellwig <hch@lst.de> | 2007-10-25 17:15:51 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 15:03:25 -0800 |
commit | c8b0e6e19c0bcd30689cb6c6f64eb140f5d61894 (patch) | |
tree | 5c9ef861d391a3d8d56f3e24cd9920f19161f7d2 | |
parent | 5d08cd1dfdc57dc834c47eb9f023fcf861f3d6bf (diff) |
iwlwifi: cleanup Kconfig and ifdefs to split 3945 and 4965
Currently the iwl3945 & iwl4965 drivers share some common Kconfig
symbols. This split it up into options for the individual drivers
and gets rid of all the CONFIG_IWLWIFI cruft.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/Makefile | 3 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/Kconfig | 169 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-3945-debug.h | 6 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-3945-io.h | 34 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-3945.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-3945.h | 20 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-4965-debug.h | 6 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-4965-io.h | 34 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-4965-rs.c | 38 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-4965.c | 92 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-4965.h | 60 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl3945-base.c | 72 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl4965-base.c | 168 |
13 files changed, 368 insertions, 336 deletions
diff --git a/drivers/net/wireless/Makefile b/drivers/net/wireless/Makefile index 6f32b53ee12..d48f7d19745 100644 --- a/drivers/net/wireless/Makefile +++ b/drivers/net/wireless/Makefile @@ -52,7 +52,8 @@ obj-$(CONFIG_RTL8187) += rtl8187.o obj-$(CONFIG_ADM8211) += adm8211.o -obj-$(CONFIG_IWLWIFI) += iwlwifi/ +obj-$(CONFIG_IWL3945) += iwlwifi/ +obj-$(CONFIG_IWL4965) += iwlwifi/ obj-$(CONFIG_RT2X00) += rt2x00/ obj-$(CONFIG_P54_COMMON) += p54common.o diff --git a/drivers/net/wireless/iwlwifi/Kconfig b/drivers/net/wireless/iwlwifi/Kconfig index 8d52a26c248..74243fe9dca 100644 --- a/drivers/net/wireless/iwlwifi/Kconfig +++ b/drivers/net/wireless/iwlwifi/Kconfig @@ -1,107 +1,95 @@ -config IWLWIFI - bool "Intel Wireless WiFi Link Drivers" - depends on PCI && MAC80211 && WLAN_80211 && EXPERIMENTAL +config IWL4965 + tristate "Intel Wireless WiFi 4965AGN" + depends on m && PCI && MAC80211 && WLAN_80211 && EXPERIMENTAL select FW_LOADER - default n - ---help--- - Select to enable drivers based on the iwlwifi project. This - project provides a common foundation for Intel's wireless - drivers designed to use the mac80211 subsystem. - - See <file:Documentation/networking/README.iwlwifi> for - information on the capabilities currently enabled in this - driver and for tips for debugging issues and problems. - -config IWLWIFI_DEBUG - bool "Enable full debugging output in iwlwifi drivers" - depends on IWLWIFI - default y + default m ---help--- - This option will enable debug tracing output for the iwlwifi - drivers. + Select to build the driver supporting the: - This will result in the kernel module being ~100k larger. You can - control which debug output is sent to the kernel log by setting the - value in + Intel Wireless WiFi Link 4965AGN - /sys/bus/pci/drivers/${DRIVER}/debug_level + This driver uses the kernel's mac80211 subsystem. - This entry will only exist if this option is enabled. + See <file:Documentation/networking/README.iwlwifi> for + information on the capabilities currently enabled in this + driver and for tips for debugging any issues or problems. - To set a value, simply echo an 8-byte hex value to the same file: + In order to use this driver, you will need a microcode (uCode) + image for it. You can obtain the microcode from: - % echo 0x43fff > /sys/bus/pci/drivers/${DRIVER}/debug_level + <http://intellinuxwireless.org/>. - You can find the list of debug mask values in: - drivers/net/wireless/mac80211/iwlwifi/iwl-debug.h + See the above referenced README.iwlwifi for information on where + to install the microcode images. - If this is your first time using this driver, you should say Y here - as the debug information can assist others in helping you resolve - any problems you may encounter. + If you want to compile the driver as a module ( = code which can be + inserted in and remvoed from the running kernel whenever you want), + say M here and read <file:Documentation/kbuild/modules.txt>. The + module will be called iwl4965.ko. -config IWLWIFI_SENSITIVITY - bool "Enable Sensitivity Calibration in iwlwifi drivers" - depends on IWLWIFI +config IWL4965_QOS + bool "Enable Wireless QoS in iwl4965 driver" + depends on IWL4965 default y ---help--- - This option will enable sensitivity calibration for the iwlwifi - drivers. + This option will enable wireless quality of service (QoS) for the + iw4965 driver. -config IWLWIFI_SPECTRUM_MEASUREMENT - bool "Enable Spectrum Measurement in iwlwifi drivers" - depends on IWLWIFI +config IWL4965_SPECTRUM_MEASUREMENT + bool "Enable Spectrum Measurement in iw4965 driver" + depends on IWL4965 default y ---help--- - This option will enable spectrum measurement for the iwlwifi drivers. + This option will enable spectrum measurement for the iwl4965 driver. -config IWLWIFI_QOS - bool "Enable Wireless QoS in iwlwifi drivers" - depends on IWLWIFI +config IWL4965_SENSITIVITY + bool "Enable Sensitivity Calibration in iwl4965 driver" + depends on IWL4965 default y ---help--- - This option will enable wireless quality of service (QoS) for the - iwlwifi drivers. + This option will enable sensitivity calibration for the iwl4965 + driver. -config IWLWIFI_HT - bool "Enable 802.11n HT features in iwlwifi drivers" +config IWL4965_HT + bool "Enable 802.11n HT features in iwl4965 driver" depends on EXPERIMENTAL - depends on IWLWIFI && MAC80211_HT + depends on IWL4965 && MAC80211_HT default n ---help--- This option enables IEEE 802.11n High Throughput features - for the iwlwifi drivers. + for the iwl4965 driver. -config IWL4965 - tristate "Intel Wireless WiFi 4965AGN" - depends on m && IWLWIFI && EXPERIMENTAL - default m +config IWL4965_DEBUG + bool "Enable full debugging output in iwl4965 driver" + depends on IWL4965 + default y ---help--- - Select to build the driver supporting the: + This option will enable debug tracing output for the iwl4965 + driver. - Intel Wireless WiFi Link 4965AGN + This will result in the kernel module being ~100k larger. You can + control which debug output is sent to the kernel log by setting the + value in - This driver uses the kernel's mac80211 subsystem. + /sys/bus/pci/drivers/${DRIVER}/debug_level - See <file:Documentation/networking/README.iwlwifi> for - information on the capabilities currently enabled in this - driver and for tips for debugging any issues or problems. + This entry will only exist if this option is enabled. - In order to use this driver, you will need a microcode (uCode) - image for it. You can obtain the microcode from: + To set a value, simply echo an 8-byte hex value to the same file: - <http://intellinuxwireless.org/>. + % echo 0x43fff > /sys/bus/pci/drivers/${DRIVER}/debug_level - See the above referenced README.iwlwifi for information on where - to install the microcode images. + You can find the list of debug mask values in: + drivers/net/wireless/iwlwifi/iwl-4965-debug.h - If you want to compile the driver as a module ( = code which can be - inserted in and remvoed from the running kernel whenever you want), - say M here and read <file:Documentation/kbuild/modules.txt>. The - module will be called iwl4965.ko. + If this is your first time using this driver, you should say Y here + as the debug information can assist others in helping you resolve + any problems you may encounter. config IWL3945 tristate "Intel PRO/Wireless 3945ABG/BG Network Connection" - depends on m && IWLWIFI && EXPERIMENTAL + depends on m && PCI && MAC80211 && WLAN_80211 && EXPERIMENTAL + select FW_LOADER default m ---help--- Select to build the driver supporting the: @@ -126,3 +114,46 @@ config IWL3945 inserted in and remvoed from the running kernel whenever you want), say M here and read <file:Documentation/kbuild/modules.txt>. The module will be called iwl3945.ko. + +config IWL3945_QOS + bool "Enable Wireless QoS in iwl3945 driver" + depends on IWL3945 + default y + ---help--- + This option will enable wireless quality of service (QoS) for the + iwl3945 driver. + +config IWL3945_SPECTRUM_MEASUREMENT + bool "Enable Spectrum Measurement in iwl3945 drivers" + depends on IWL3945 + default y + ---help--- + This option will enable spectrum measurement for the iwl3945 driver. + +config IWL3945_DEBUG + bool "Enable full debugging output in iwl3945 driver" + depends on IWL3945 + default y + ---help--- + This option will enable debug tracing output for the iwl3945 + driver. + + This will result in the kernel module being ~100k larger. You can + control which debug output is sent to the kernel log by setting the + value in + + /sys/bus/pci/drivers/${DRIVER}/debug_level + + This entry will only exist if this option is enabled. + + To set a value, simply echo an 8-byte hex value to the same file: + + % echo 0x43fff > /sys/bus/pci/drivers/${DRIVER}/debug_level + + You can find the list of debug mask values in: + drivers/net/wireless/iwlwifi/iwl-3945-debug.h + + If this is your first time using this driver, you should say Y here + as the debug information can assist others in helping you resolve + any problems you may encounter. + diff --git a/drivers/net/wireless/iwlwifi/iwl-3945-debug.h b/drivers/net/wireless/iwlwifi/iwl-3945-debug.h index 72318d78957..d0ea83404e0 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945-debug.h +++ b/drivers/net/wireless/iwlwifi/iwl-3945-debug.h @@ -29,7 +29,7 @@ #ifndef __iwl_debug_h__ #define __iwl_debug_h__ -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL3945_DEBUG extern u32 iwl_debug_level; #define IWL_DEBUG(level, fmt, args...) \ do { if (iwl_debug_level & (level)) \ @@ -47,7 +47,7 @@ static inline void IWL_DEBUG(int level, const char *fmt, ...) static inline void IWL_DEBUG_LIMIT(int level, const char *fmt, ...) { } -#endif /* CONFIG_IWLWIFI_DEBUG */ +#endif /* CONFIG_IWL3945_DEBUG */ /* * To use the debug system; @@ -71,7 +71,7 @@ static inline void IWL_DEBUG_LIMIT(int level, const char *fmt, ...) * 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_IWLWIFI_DEBUG defined in your kernel configuration + * CONFIG_IWL3945_DEBUG defined in your kernel configuration * */ diff --git a/drivers/net/wireless/iwlwifi/iwl-3945-io.h b/drivers/net/wireless/iwlwifi/iwl-3945-io.h index 89253e13353..74a51798c23 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945-io.h +++ b/drivers/net/wireless/iwlwifi/iwl-3945-io.h @@ -60,7 +60,7 @@ */ #define _iwl_write32(iwl, ofs, val) writel((val), (iwl)->hw_base + (ofs)) -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL3945_DEBUG static inline void __iwl_write32(const char *f, u32 l, struct iwl_priv *iwl, u32 ofs, u32 val) { @@ -74,7 +74,7 @@ static inline void __iwl_write32(const char *f, u32 l, struct iwl_priv *iwl, #endif #define _iwl_read32(iwl, ofs) readl((iwl)->hw_base + (ofs)) -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL3945_DEBUG static inline u32 __iwl_read32(char *f, u32 l, struct iwl_priv *iwl, u32 ofs) { IWL_DEBUG_IO("read_direct32(0x%08X) - %s %d\n", ofs, f, l); @@ -99,7 +99,7 @@ static inline int _iwl_poll_bit(struct iwl_priv *priv, u32 addr, return -ETIMEDOUT; } -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL3945_DEBUG static inline int __iwl_poll_bit(const char *f, u32 l, struct iwl_priv *priv, u32 addr, u32 bits, u32 mask, int timeout) @@ -125,7 +125,7 @@ static inline void _iwl_set_bit(struct iwl_priv *priv, u32 reg, u32 mask) { _iwl_write32(priv, reg, _iwl_read32(priv, reg) | mask); } -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL3945_DEBUG static inline void __iwl_set_bit(const char *f, u32 l, struct iwl_priv *priv, u32 reg, u32 mask) { @@ -142,7 +142,7 @@ static inline void _iwl_clear_bit(struct iwl_priv *priv, u32 reg, u32 mask) { _iwl_write32(priv, reg, _iwl_read32(priv, reg) & ~mask); } -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL3945_DEBUG static inline void __iwl_clear_bit(const char *f, u32 l, struct iwl_priv *priv, u32 reg, u32 mask) { @@ -160,7 +160,7 @@ static inline int _iwl_grab_nic_access(struct iwl_priv *priv) int ret; u32 gp_ctl; -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL3945_DEBUG if (atomic_read(&priv->restrict_refcnt)) return 0; #endif @@ -191,13 +191,13 @@ static inline int _iwl_grab_nic_access(struct iwl_priv *priv) return -EIO; } -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL3945_DEBUG atomic_inc(&priv->restrict_refcnt); #endif return 0; } -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL3945_DEBUG static inline int __iwl_grab_nic_access(const char *f, u32 l, struct iwl_priv *priv) { @@ -217,13 +217,13 @@ static inline int __iwl_grab_nic_access(const char *f, u32 l, static inline void _iwl_release_nic_access(struct iwl_priv *priv) { -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL3945_DEBUG if (atomic_dec_and_test(&priv->restrict_refcnt)) #endif _iwl_clear_bit(priv, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ); } -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL3945_DEBUG static inline void __iwl_release_nic_access(const char *f, u32 l, struct iwl_priv *priv) { @@ -244,7 +244,7 @@ static inline u32 _iwl_read_direct32(struct iwl_priv *priv, u32 reg) { return _iwl_read32(priv, reg); } -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL3945_DEBUG static inline u32 __iwl_read_direct32(const char *f, u32 l, struct iwl_priv *priv, u32 reg) { @@ -266,7 +266,7 @@ static inline void _iwl_write_direct32(struct iwl_priv *priv, { _iwl_write32(priv, reg, value); } -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL3945_DEBUG static void __iwl_write_direct32(u32 line, struct iwl_priv *priv, u32 reg, u32 value) { @@ -306,7 +306,7 @@ static inline int _iwl_poll_direct_bit(struct iwl_priv *priv, return -ETIMEDOUT; } -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL3945_DEBUG static inline int __iwl_poll_direct_bit(const char *f, u32 l, struct iwl_priv *priv, u32 addr, u32 mask, int timeout) @@ -332,7 +332,7 @@ static inline u32 _iwl_read_prph(struct iwl_priv *priv, u32 reg) _iwl_write_direct32(priv, HBUS_TARG_PRPH_RADDR, reg | (3 << 24)); return _iwl_read_direct32(priv, HBUS_TARG_PRPH_RDAT); } -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL3945_DEBUG static inline u32 __iwl_read_prph(u32 line, struct iwl_priv *priv, u32 reg) { if (!atomic_read(&priv->restrict_refcnt)) @@ -353,7 +353,7 @@ static inline void _iwl_write_prph(struct iwl_priv *priv, ((addr & 0x0000FFFF) | (3 << 24))); _iwl_write_direct32(priv, HBUS_TARG_PRPH_WDAT, val); } -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL3945_DEBUG static inline void __iwl_write_prph(u32 line, struct iwl_priv *priv, u32 addr, u32 val) { @@ -370,7 +370,7 @@ static inline void __iwl_write_prph(u32 line, struct iwl_priv *priv, #define _iwl_set_bits_prph(priv, reg, mask) \ _iwl_write_prph(priv, reg, (_iwl_read_prph(priv, reg) | mask)) -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL3945_DEBUG static inline void __iwl_set_bits_prph(u32 line, struct iwl_priv *priv, u32 reg, u32 mask) { @@ -388,7 +388,7 @@ static inline void __iwl_set_bits_prph(u32 line, struct iwl_priv *priv, #define _iwl_set_bits_mask_prph(priv, reg, bits, mask) \ _iwl_write_prph(priv, reg, ((_iwl_read_prph(priv, reg) & mask) | bits)) -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL3945_DEBUG static inline void __iwl_set_bits_mask_prph(u32 line, struct iwl_priv *priv, u32 reg, u32 bits, u32 mask) { diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c index 53fe9c1c174..39e7b07248c 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945.c +++ b/drivers/net/wireless/iwlwifi/iwl-3945.c @@ -371,7 +371,7 @@ static void iwl3945_rx_reply_rx(struct iwl_priv *priv, network_packet = iwl_is_network_packet(priv, header); -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL3945_DEBUG if (iwl_debug_level & IWL_DL_STATS && net_ratelimit()) IWL_DEBUG_STATS ("[%c] %d RSSI: %d Signal: %u, Noise: %u, Rate: %u\n", diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.h b/drivers/net/wireless/iwlwifi/iwl-3945.h index ab8412270f6..d1616bf9bc8 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945.h +++ b/drivers/net/wireless/iwlwifi/iwl-3945.h @@ -445,7 +445,7 @@ union iwl_ht_rate_supp { }; }; -#ifdef CONFIG_IWLWIFI_HT +#ifdef CONFIG_IWL3945_HT #define CFG_HT_RX_AMPDU_FACTOR_DEF (0x3) #define HT_IE_MAX_AMSDU_SIZE_4K (0) #define CFG_HT_MPDU_DENSITY_2USEC (0x5) @@ -468,9 +468,9 @@ struct sta_ht_info { u8 tx_chan_width; u8 chan_width_cap; }; -#endif /*CONFIG_IWLWIFI_HT */ +#endif /*CONFIG_IWL3945_HT */ -#ifdef CONFIG_IWLWIFI_QOS +#ifdef CONFIG_IWL3945_QOS union iwl_qos_capabity { struct { @@ -499,7 +499,7 @@ struct iwl_qos_info { union iwl_qos_capabity qos_cap; struct iwl_qosparam_cmd def_qos_parm; }; -#endif /*CONFIG_IWLWIFI_QOS */ +#endif /*CONFIG_IWL3945_QOS */ #define STA_PS_STATUS_WAKE 0 #define STA_PS_STATUS_SLEEP 1 @@ -598,7 +598,7 @@ extern int iwl_is_network_packet(struct iwl_priv *priv, struct ieee80211_hdr *header); extern int iwl_power_init_handle(struct iwl_priv *priv); extern int iwl_eeprom_init(struct iwl_priv *priv); -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL3945_DEBUG extern void iwl_report_frame(struct iwl_priv *priv, struct iwl_rx_packet *pkt, struct ieee80211_hdr *header, int group100); @@ -717,7 +717,7 @@ extern u8 iwl3945_sync_sta(struct iwl_priv *priv, int sta_id, u16 tx_rate, u8 flags); -#ifdef CONFIG_IWLWIFI_SPECTRUM_MEASUREMENT +#ifdef CONFIG_IWL3945_SPECTRUM_MEASUREMENT enum { MEASUREMENT_READY = (1 << 0), @@ -745,7 +745,7 @@ struct iwl_priv { const struct ieee80211_hw_mode *modes; -#ifdef CONFIG_IWLWIFI_SPECTRUM_MEASUREMENT +#ifdef CONFIG_IWL3945_SPECTRUM_MEASUREMENT /* spectrum measurement report caching */ struct iwl_spectrum_notification measure_report; u8 measurement_status; @@ -904,9 +904,9 @@ struct iwl_priv { u16 assoc_capability; u8 ps_mode; -#ifdef CONFIG_IWLWIFI_QOS +#ifdef CONFIG_IWL3945_QOS struct iwl_qos_info qos_data; -#endif /*CONFIG_IWLWIFI_QOS */ +#endif /*CONFIG_IWL3945_QOS */ struct workqueue_struct *workqueue; @@ -941,7 +941,7 @@ struct iwl_priv { u32 pm_state[16]; #endif -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL3945_DEBUG /* debugging info */ u32 framecnt_to_us; atomic_t restrict_refcnt; diff --git a/drivers/net/wireless/iwlwifi/iwl-4965-debug.h b/drivers/net/wireless/iwlwifi/iwl-4965-debug.h index 72318d78957..0c74883d2f8 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965-debug.h +++ b/drivers/net/wireless/iwlwifi/iwl-4965-debug.h @@ -29,7 +29,7 @@ #ifndef __iwl_debug_h__ #define __iwl_debug_h__ -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL4965_DEBUG extern u32 iwl_debug_level; #define IWL_DEBUG(level, fmt, args...) \ do { if (iwl_debug_level & (level)) \ @@ -47,7 +47,7 @@ static inline void IWL_DEBUG(int level, const char *fmt, ...) static inline void IWL_DEBUG_LIMIT(int level, const char *fmt, ...) { } -#endif /* CONFIG_IWLWIFI_DEBUG */ +#endif /* CONFIG_IWL4965_DEBUG */ /* * To use the debug system; @@ -71,7 +71,7 @@ static inline void IWL_DEBUG_LIMIT(int level, const char *fmt, ...) * 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_IWLWIFI_DEBUG defined in your kernel configuration + * CONFIG_IWL4965_DEBUG defined in your kernel configuration * */ diff --git a/drivers/net/wireless/iwlwifi/iwl-4965-io.h b/drivers/net/wireless/iwlwifi/iwl-4965-io.h index 1ffa8f1e17c..5c497e4beea 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965-io.h +++ b/drivers/net/wireless/iwlwifi/iwl-4965-io.h @@ -60,7 +60,7 @@ */ #define _iwl_write32(iwl, ofs, val) writel((val), (iwl)->hw_base + (ofs)) -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL4965_DEBUG static inline void __iwl_write32(const char *f, u32 l, struct iwl_priv *iwl, u32 ofs, u32 val) { @@ -74,7 +74,7 @@ static inline void __iwl_write32(const char *f, u32 l, struct iwl_priv *iwl, #endif #define _iwl_read32(iwl, ofs) readl((iwl)->hw_base + (ofs)) -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL4965_DEBUG static inline u32 __iwl_read32(char *f, u32 l, struct iwl_priv *iwl, u32 ofs) { IWL_DEBUG_IO("read_direct32(0x%08X) - %s %d\n", ofs, f, l); @@ -99,7 +99,7 @@ static inline int _iwl_poll_bit(struct iwl_priv *priv, u32 addr, return -ETIMEDOUT; } -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL4965_DEBUG static inline int __iwl_poll_bit(const char *f, u32 l, struct iwl_priv *priv, u32 addr, u32 bits, u32 mask, int timeout) @@ -125,7 +125,7 @@ static inline void _iwl_set_bit(struct iwl_priv *priv, u32 reg, u32 mask) { _iwl_write32(priv, reg, _iwl_read32(priv, reg) | mask); } -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL4965_DEBUG static inline void __iwl_set_bit(const char *f, u32 l, struct iwl_priv *priv, u32 reg, u32 mask) { @@ -142,7 +142,7 @@ static inline void _iwl_clear_bit(struct iwl_priv *priv, u32 reg, u32 mask) { _iwl_write32(priv, reg, _iwl_read32(priv, reg) & ~mask); } -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL4965_DEBUG static inline void __iwl_clear_bit(const char *f, u32 l, struct iwl_priv *priv, u32 reg, u32 mask) { @@ -160,7 +160,7 @@ static inline int _iwl_grab_nic_access(struct iwl_priv *priv) int ret; u32 gp_ctl; -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL4965_DEBUG if (atomic_read(&priv->restrict_refcnt)) return 0; #endif @@ -191,13 +191,13 @@ static inline int _iwl_grab_nic_access(struct iwl_priv *priv) return -EIO; } -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL4965_DEBUG atomic_inc(&priv->restrict_refcnt); #endif return 0; } -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL4965_DEBUG static inline int __iwl_grab_nic_access(const char *f, u32 l, struct iwl_priv *priv) { @@ -217,13 +217,13 @@ static inline int __iwl_grab_nic_access(const char *f, u32 l, static inline void _iwl_release_nic_access(struct iwl_priv *priv) { -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL4965_DEBUG if (atomic_dec_and_test(&priv->restrict_refcnt)) #endif _iwl_clear_bit(priv, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ); } -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL4965_DEBUG static inline void __iwl_release_nic_access(const char *f, u32 l, struct iwl_priv *priv) { @@ -244,7 +244,7 @@ static inline u32 _iwl_read_direct32(struct iwl_priv *priv, u32 reg) { return _iwl_read32(priv, reg); } -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL4965_DEBUG static inline u32 __iwl_read_direct32(const char *f, u32 l, struct iwl_priv *priv, u32 reg) { @@ -266,7 +266,7 @@ static inline void _iwl_write_direct32(struct iwl_priv *priv, { _iwl_write32(priv, reg, value); } -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL4965_DEBUG static void __iwl_write_direct32(u32 line, struct iwl_priv *priv, u32 reg, u32 value) { @@ -306,7 +306,7 @@ static inline int _iwl_poll_direct_bit(struct iwl_priv *priv, return -ETIMEDOUT; } -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL4965_DEBUG static inline int __iwl_poll_direct_bit(const char *f, u32 l, struct iwl_priv *priv, u32 addr, u32 mask, int timeout) @@ -332,7 +332,7 @@ static inline u32 _iwl_read_prph(struct iwl_priv *priv, u32 reg) _iwl_write_direct32(priv, HBUS_TARG_PRPH_RADDR, reg | (3 << 24)); return _iwl_read_direct32(priv, HBUS_TARG_PRPH_RDAT); } -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL4965_DEBUG static inline u32 __iwl_read_prph(u32 line, struct iwl_priv *priv, u32 reg) { if (!atomic_read(&priv->restrict_refcnt)) @@ -353,7 +353,7 @@ static inline void _iwl_write_prph(struct iwl_priv *priv, ((addr & 0x0000FFFF) | (3 << 24))); _iwl_write_direct32(priv, HBUS_TARG_PRPH_WDAT, val); } -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL4965_DEBUG static inline void __iwl_write_prph(u32 line, struct iwl_priv *priv, u32 addr, u32 val) { @@ -370,7 +370,7 @@ static inline void __iwl_write_prph(u32 line, struct iwl_priv *priv, #define _iwl_set_bits_prph(priv, reg, mask) \ _iwl_write_prph(priv, reg, (_iwl_read_prph(priv, reg) | mask)) -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL4965_DEBUG static inline void __iwl_set_bits_prph(u32 line, struct iwl_priv *priv, u32 reg, u32 mask) { @@ -388,7 +388,7 @@ static inline void __iwl_set_bits_prph(u32 line, struct iwl_priv *priv, #define _iwl_set_bits_mask_prph(priv, reg, bits, mask) \ _iwl_write_prph(priv, reg, ((_iwl_read_prph(priv, reg) & mask) | bits)) -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL4965_DEBUG static inline void __iwl_set_bits_mask_prph(u32 line, struct iwl_priv *priv, u32 reg, u32 bits, u32 mask) { diff --git a/drivers/net/wireless/iwlwifi/iwl-4965-rs.c b/drivers/net/wireless/iwlwifi/iwl-4965-rs.c index 0e384e60648..8f6e9f8395c 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965-rs.c +++ b/drivers/net/wireless/iwlwifi/iwl-4965-rs.c @@ -197,7 +197,7 @@ static inline u8 iwl_rate_get_rate(u32 rate_n_flags) static int rs_send_lq_cmd(struct iwl_priv *priv, struct iwl_link_quality_cmd *lq, u8 flags) { -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL4965_DEBUG int i; #endif struct iwl_host_cmd cmd = { @@ -218,7 +218,7 @@ static int rs_send_lq_cmd(struct iwl_priv *priv, 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_IWLWIFI_DEBUG +#ifdef CONFIG_IWL4965_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); @@ -442,13 +442,13 @@ static inline void rs_toggle_antenna(struct iwl_rate *new_rate, static inline u8 rs_use_green(struct iwl_priv *priv) { -#ifdef CONFIG_IWLWIFI_HT +#ifdef CONFIG_IWL4965_HT if (!priv->is_ht_enabled || !priv->current_assoc_ht.is_ht) return 0; return ((priv->current_assoc_ht.is_green_field) && !(priv->current_assoc_ht.operating_mode & 0x4)); -#endif /*CONFIG_IWLWIFI_HT */ +#endif /*CONFIG_IWL4965_HT */ return 0; } @@ -826,7 +826,7 @@ static void rs_get_expected_tpt_table(struct iwl_rate_scale_priv *lq_data, tbl->expected_tpt = expected_tpt_G; } -#ifdef CONFIG_IWLWIFI_HT +#ifdef CONFIG_IWL4965_HT static s32 rs_get_best_rate(struct iwl_priv *priv, struct iwl_rate_scale_priv *lq_data, struct iwl_scale_tbl_info *tbl, @@ -879,7 +879,7 @@ static s32 rs_get_best_rate(struct iwl_priv *priv, return new_rate; } -#endif /* CONFIG_IWLWIFI_HT */ +#endif /* CONFIG_IWL4965_HT */ static inline u8 rs_is_both_ant_supp(u8 valid_antenna) { @@ -890,7 +890,7 @@ static int rs_switch_to_mimo(struct iwl_priv *priv, struct iwl_rate_scale_priv *lq_data, struct iwl_scale_tbl_info *tbl, int index) { -#ifdef CONFIG_IWLWIFI_HT +#ifdef CONFIG_IWL4965_HT u16 rate_mask; s32 rate; s8 is_green = lq_data->is_green; @@ -938,7 +938,7 @@ static int rs_switch_to_mimo(struct iwl_priv *priv, IWL_DEBUG_HT("LQ: Switch to new mcs %X index is green %X\n", tbl->current_rate.rate_n_flags, is_green); -#endif /*CONFIG_IWLWIFI_HT */ +#endif /*CONFIG_IWL4965_HT */ return 0; } @@ -946,7 +946,7 @@ static int rs_switch_to_siso(struct iwl_priv *priv, struct iwl_rate_scale_priv *lq_data, struct iwl_scale_tbl_info *tbl, int index) { -#ifdef CONFIG_IWLWIFI_HT +#ifdef CONFIG_IWL4965_HT u16 rate_mask; u8 is_green = lq_data->is_green; s32 rate; @@ -992,7 +992,7 @@ static int rs_switch_to_siso(struct iwl_priv *priv, IWL_DEBUG_HT("LQ: Switch to new mcs %X index is green %X\n", tbl->current_rate.rate_n_flags, is_green); -#endif /*CONFIG_IWLWIFI_HT */ +#endif /*CONFIG_IWL4965_HT */ return 0; } @@ -1568,7 +1568,7 @@ static void rs_rate_scale_perform(struct iwl_priv *priv, tbl1 = &(lq_data->lq_info[lq_data->active_tbl]); if (is_legacy(tbl1->lq_type) && -#ifdef CONFIG_IWLWIFI_HT +#ifdef CONFIG_IWL4965_HT !priv->current_assoc_ht.is_ht && #endif (lq_data->action_counter >= 1)) { @@ -1579,14 +1579,14 @@ static void rs_rate_scale_perform(struct iwl_priv *priv, if (lq_data->enable_counter && (lq_data->action_counter >= IWL_ACTION_LIMIT)) { -#ifdef CONFIG_IWLWIFI_HT_AGG +#ifdef CONFIG_IWL4965_HT_AGG if ((lq_data->last_tpt > TID_AGG_TPT_THREHOLD) && (priv->lq_mngr.agg_ctrl.auto_agg)) { priv->lq_mngr.agg_ctrl.tid_retry = TID_ALL_SPECIFIED; schedule_work(&priv->agg_work); } -#endif /*CONFIG_IWLWIFI_HT_AGG */ +#endif /*CONFIG_IWL4965_HT_AGG */ lq_data->action_counter = 0; rs_set_stay_in_table(0, lq_data); } @@ -1806,7 +1806,7 @@ static void rs_rate_init(void *priv_rate, void *priv_sta, crl->active_rate &= ~(0x1000); crl->active_rate_basic = priv->active_rate_basic; crl->phymode = priv->phymode; -#ifdef CONFIG_IWLWIFI_HT +#ifdef CONFIG_IWL4965_HT crl->active_siso_rate = (priv->current_assoc_ht.supp_rates[0] << 1); crl->active_siso_rate |= (priv->current_assoc_ht.supp_rates[0] & 0x1); crl->active_siso_rate &= ~((u16)0x2); @@ -1818,7 +1818,7 @@ static void rs_rate_init(void *priv_rate, void *priv_sta, crl->active_mimo_rate = crl->active_mimo_rate << IWL_FIRST_OFDM_RATE; IWL_DEBUG_HT("MIMO RATE 0x%X SISO MASK 0x%X\n", crl->active_siso_rate, crl->active_mimo_rate); -#endif /*CONFIG_IWLWIFI_HT*/ +#endif /*CONFIG_IWL4965_HT*/ #ifdef CONFIG_MAC80211_DEBUGFS crl->drv = priv; #endif @@ -1937,12 +1937,12 @@ static void rs_clear(void *priv_rate) IWL_DEBUG_RATE("enter\n"); priv->lq_mngr.lq_ready = 0; -#ifdef CONFIG_IWLWIFI_HT -#ifdef CONFIG_IWLWIFI_HT_AGG +#ifdef CONFIG_IWL4965_HT +#ifdef CONFIG_IWL4965_HT_AGG if (priv->lq_mngr.agg_ctrl.granted_ba) iwl4965_turn_off_agg(priv, TID_ALL_SPECIFIED); -#endif /*CONFIG_IWLWIFI_HT_AGG */ -#endif /* CONFIG_IWLWIFI_HT */ +#endif /*CONFIG_IWL4965_HT_AGG */ +#endif /* CONFIG_IWL4965_HT */ IWL_DEBUG_RATE("leave\n"); } diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c index f8f77fe4128..fed2357b7ef 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965.c +++ b/drivers/net/wireless/iwlwifi/iwl-4965.c @@ -86,14 +86,14 @@ static int is_fat_channel(__le32 rxon_flags) static u8 is_single_stream(struct iwl_priv *priv) { -#ifdef CONFIG_IWLWIFI_HT +#ifdef CONFIG_IWL4965_HT if (!priv->is_ht_enabled || !priv->current_assoc_ht.is_ht || (priv->active_rate_ht[1] == 0) || (priv->ps_mode == IWL_MIMO_PS_STATIC)) return 1; #else return 1; -#endif /*CONFIG_IWLWIFI_HT */ +#endif /*CONFIG_IWL4965_HT */ return 0; } @@ -743,7 +743,7 @@ void iwl4965_rf_kill_ct_config(struct iwl_priv *priv) IWL_DEBUG_INFO("REPLY_CT_KILL_CONFIG_CMD succeeded\n"); } -#ifdef CONFIG_IWLWIFI_SENSITIVITY +#ifdef CONFIG_IWL4965_SENSITIVITY /* "false alarms" are signals that our DSP tries to lock onto, * but then determines that they are either noise, or transmissions @@ -1546,7 +1546,7 @@ static void iwl4965_bg_sensitivity_work(struct work_struct *work) mutex_unlock(&priv->mutex); return; } -#endif /*CONFIG_IWLWIFI_SENSITIVITY*/ +#endif /*CONFIG_IWL4965_SENSITIVITY*/ static void iwl4965_bg_txpower_work(struct work_struct *work) { @@ -1638,7 +1638,7 @@ int iwl4965_alive_notify(struct iwl_priv *priv) spin_lock_irqsave(&priv->lock, flags); -#ifdef CONFIG_IWLWIFI_SENSITIVITY +#ifdef CONFIG_IWL4965_SENSITIVITY memset(&(priv->sensitivity_data), 0, sizeof(struct iwl_sensitivity_data)); memset(&(priv->chain_noise_data), 0, @@ -1646,7 +1646,7 @@ int iwl4965_alive_notify(struct iwl_priv *priv) for (i = 0; i < NUM_RX_CHAINS; i++) priv->chain_noise_data.delta_gain_code[i] = CHAIN_NOISE_DELTA_GAIN_INIT_VAL; -#endif /* CONFIG_IWLWIFI_SENSITIVITY*/ +#endif /* CONFIG_IWL4965_SENSITIVITY*/ rc = iwl_grab_nic_access(priv); if (rc) { spin_unlock_irqrestore(&priv->lock, flags); @@ -2814,8 +2814,8 @@ void iwl4965_set_rxon_chain(struct iwl_priv *priv |