Commit c8b0e6e1 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by David S. Miller
Browse files

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: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarZhu Yi <yi.zhu@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 5d08cd1d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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
+100 −69
Original line number Diff line number Diff line
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.
+3 −3
Original line number Diff line number Diff line
@@ -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
 *
 */

+17 −17
Original line number Diff line number Diff line
@@ -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)
{
+1 −1
Original line number Diff line number Diff line
@@ -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",
Loading