Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 81963d68 authored by Reinette Chatre's avatar Reinette Chatre Committed by John W. Linville
Browse files

iwlwifi: cleanup spectrum measurement command support

In iwlagn the support for spectrum measurement command has been
disabled since v2.6.29 without any requests for it. In addition to this
when this command is indeed enabled it has been found to trigger firmware
SYSASSERT on at least 4965 and 5100 hardware (see
http://bugzilla.intellinuxwireless.org/show_bug.cgi?id=1952

 ). Since then
this code has been bitrotting and cannot just be enabled without porting.

Remove support for spectrum measurement command from iwlagn. It can be
added back if there is a future need and the firmware problem it triggers
has been fixed. Support for the spectrim measurement notification remains
as it has been enabled all the time.

In addition to this remove the 3945 spectrum measurement command Kconfig
option and make this command always supported. The code added by this
enabling is minimal and only run when user triggers a spectrum measurement
request via sysfs.

Signed-off-by: default avatarReinette Chatre <reinette.chatre@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 65baa90d
Loading
Loading
Loading
Loading
+0 −12
Original line number Original line Diff line number Diff line
@@ -3,12 +3,6 @@ config IWLWIFI
	depends on PCI && MAC80211
	depends on PCI && MAC80211
	select FW_LOADER
	select FW_LOADER


config IWLWIFI_SPECTRUM_MEASUREMENT
	bool "Enable Spectrum Measurement in iwlagn driver"
	depends on IWLWIFI
	---help---
	  This option will enable spectrum measurement for the iwlagn driver.

config IWLWIFI_DEBUG
config IWLWIFI_DEBUG
	bool "Enable full debugging output in iwlagn and iwl3945 drivers"
	bool "Enable full debugging output in iwlagn and iwl3945 drivers"
	depends on IWLWIFI
	depends on IWLWIFI
@@ -120,9 +114,3 @@ config IWL3945
	  inserted in and removed from the running kernel whenever you want),
	  inserted in and removed from the running kernel whenever you want),
	  say M here and read <file:Documentation/kbuild/modules.txt>.  The
	  say M here and read <file:Documentation/kbuild/modules.txt>.  The
	  module will be called iwl3945.
	  module will be called iwl3945.

config IWL3945_SPECTRUM_MEASUREMENT
	bool "Enable Spectrum Measurement in iwl3945 driver"
	depends on IWL3945
	---help---
	  This option will enable spectrum measurement for the iwl3945 driver.
+0 −1
Original line number Original line Diff line number Diff line
@@ -3,7 +3,6 @@ iwlcore-objs := iwl-core.o iwl-eeprom.o iwl-hcmd.o iwl-power.o
iwlcore-objs 		+= iwl-rx.o iwl-tx.o iwl-sta.o iwl-calib.o
iwlcore-objs 		+= iwl-rx.o iwl-tx.o iwl-sta.o iwl-calib.o
iwlcore-objs 		+= iwl-scan.o iwl-led.o
iwlcore-objs 		+= iwl-scan.o iwl-led.o
iwlcore-$(CONFIG_IWLWIFI_DEBUGFS) += iwl-debugfs.o
iwlcore-$(CONFIG_IWLWIFI_DEBUGFS) += iwl-debugfs.o
iwlcore-$(CONFIG_IWLWIFI_SPECTRUM_MEASUREMENT) += iwl-spectrum.o
iwlcore-$(CONFIG_IWLWIFI_DEVICE_TRACING) += iwl-devtrace.o
iwlcore-$(CONFIG_IWLWIFI_DEVICE_TRACING) += iwl-devtrace.o


CFLAGS_iwl-devtrace.o := -I$(src)
CFLAGS_iwl-devtrace.o := -I$(src)
+3 −8
Original line number Original line Diff line number Diff line
@@ -73,13 +73,7 @@
#define VD
#define VD
#endif
#endif


#ifdef CONFIG_IWLWIFI_SPECTRUM_MEASUREMENT
#define DRV_VERSION     IWLWIFI_VERSION VD
#define VS "s"
#else
#define VS
#endif

#define DRV_VERSION     IWLWIFI_VERSION VD VS




MODULE_DESCRIPTION(DRV_DESCRIPTION);
MODULE_DESCRIPTION(DRV_DESCRIPTION);
@@ -889,6 +883,8 @@ static void iwl_setup_rx_handlers(struct iwl_priv *priv)
	priv->rx_handlers[REPLY_ALIVE] = iwl_rx_reply_alive;
	priv->rx_handlers[REPLY_ALIVE] = iwl_rx_reply_alive;
	priv->rx_handlers[REPLY_ERROR] = iwl_rx_reply_error;
	priv->rx_handlers[REPLY_ERROR] = iwl_rx_reply_error;
	priv->rx_handlers[CHANNEL_SWITCH_NOTIFICATION] = iwl_rx_csa;
	priv->rx_handlers[CHANNEL_SWITCH_NOTIFICATION] = iwl_rx_csa;
	priv->rx_handlers[SPECTRUM_MEASURE_NOTIFICATION] =
			iwl_rx_spectrum_measure_notif;
	priv->rx_handlers[PM_SLEEP_NOTIFICATION] = iwl_rx_pm_sleep_notif;
	priv->rx_handlers[PM_SLEEP_NOTIFICATION] = iwl_rx_pm_sleep_notif;
	priv->rx_handlers[PM_DEBUG_STATISTIC_NOTIFIC] =
	priv->rx_handlers[PM_DEBUG_STATISTIC_NOTIFIC] =
	    iwl_rx_pm_debug_statistics_notif;
	    iwl_rx_pm_debug_statistics_notif;
@@ -902,7 +898,6 @@ static void iwl_setup_rx_handlers(struct iwl_priv *priv)
	priv->rx_handlers[REPLY_STATISTICS_CMD] = iwl_reply_statistics;
	priv->rx_handlers[REPLY_STATISTICS_CMD] = iwl_reply_statistics;
	priv->rx_handlers[STATISTICS_NOTIFICATION] = iwl_rx_statistics;
	priv->rx_handlers[STATISTICS_NOTIFICATION] = iwl_rx_statistics;


	iwl_setup_spectrum_handlers(priv);
	iwl_setup_rx_scan_handlers(priv);
	iwl_setup_rx_scan_handlers(priv);


	/* status change handler */
	/* status change handler */
+2 −8
Original line number Original line Diff line number Diff line
@@ -429,6 +429,8 @@ int iwl_tx_queue_reclaim(struct iwl_priv *priv, int txq_id, int index);
/* Handlers */
/* Handlers */
void iwl_rx_missed_beacon_notif(struct iwl_priv *priv,
void iwl_rx_missed_beacon_notif(struct iwl_priv *priv,
			       struct iwl_rx_mem_buffer *rxb);
			       struct iwl_rx_mem_buffer *rxb);
void iwl_rx_spectrum_measure_notif(struct iwl_priv *priv,
					  struct iwl_rx_mem_buffer *rxb);
void iwl_rx_statistics(struct iwl_priv *priv,
void iwl_rx_statistics(struct iwl_priv *priv,
			      struct iwl_rx_mem_buffer *rxb);
			      struct iwl_rx_mem_buffer *rxb);
void iwl_reply_statistics(struct iwl_priv *priv,
void iwl_reply_statistics(struct iwl_priv *priv,
@@ -531,14 +533,6 @@ int iwl_send_calib_results(struct iwl_priv *priv);
int iwl_calib_set(struct iwl_calib_result *res, const u8 *buf, int len);
int iwl_calib_set(struct iwl_calib_result *res, const u8 *buf, int len);
void iwl_calib_free_results(struct iwl_priv *priv);
void iwl_calib_free_results(struct iwl_priv *priv);


/*******************************************************************************
 * Spectrum Measureemtns in  iwl-spectrum.c
 ******************************************************************************/
#ifdef CONFIG_IWLWIFI_SPECTRUM_MEASUREMENT
void iwl_setup_spectrum_handlers(struct iwl_priv *priv);
#else
static inline void iwl_setup_spectrum_handlers(struct iwl_priv *priv) {}
#endif
/*****************************************************
/*****************************************************
 *   S e n d i n g     H o s t     C o m m a n d s   *
 *   S e n d i n g     H o s t     C o m m a n d s   *
 *****************************************************/
 *****************************************************/
+1 −2
Original line number Original line Diff line number Diff line
@@ -1055,11 +1055,10 @@ struct iwl_priv {


	struct ieee80211_supported_band bands[IEEE80211_NUM_BANDS];
	struct ieee80211_supported_band bands[IEEE80211_NUM_BANDS];


#if defined(CONFIG_IWLWIFI_SPECTRUM_MEASUREMENT) || defined(CONFIG_IWL3945_SPECTRUM_MEASUREMENT)
	/* spectrum measurement report caching */
	/* spectrum measurement report caching */
	struct iwl_spectrum_notification measure_report;
	struct iwl_spectrum_notification measure_report;
	u8 measurement_status;
	u8 measurement_status;
#endif

	/* ucode beacon time */
	/* ucode beacon time */
	u32 ucode_beacon_time;
	u32 ucode_beacon_time;
	int missed_beacon_threshold;
	int missed_beacon_threshold;
Loading