[kernel] r11512 - in dists/trunk/linux-2.6/debian: . patches/features/all patches/series

Maximilian Attems maks at alioth.debian.org
Tue Jun 3 21:56:59 UTC 2008


Author: maks
Date: Tue Jun  3 21:56:58 2008
New Revision: 11512

Log:
iwl3945: Add monitor mode patch

easy backport, just applies fine to 2.6.26-rc4
thanks Antoine Sirinelli for suggestion


Added:
   dists/trunk/linux-2.6/debian/patches/features/all/0001-iwlwifi-Set-monitor-mode-for-3945.patch
Modified:
   dists/trunk/linux-2.6/debian/changelog
   dists/trunk/linux-2.6/debian/patches/series/1~experimental.1

Modified: dists/trunk/linux-2.6/debian/changelog
==============================================================================
--- dists/trunk/linux-2.6/debian/changelog	(original)
+++ dists/trunk/linux-2.6/debian/changelog	Tue Jun  3 21:56:58 2008
@@ -30,6 +30,7 @@
   * topconfig: Enable HYSDN, no longer broken on smp.
   * Add request_firmware patch for keyspan.
   * [x86]: Enable dma engine. (closes: #473331)
+  * iwl3945: Add monitor mode patch. (closes: #482387)
 
   [ Martin Michlmayr ]
   * [arm/orion5x] Update the config to reflect upstream renaming this

Added: dists/trunk/linux-2.6/debian/patches/features/all/0001-iwlwifi-Set-monitor-mode-for-3945.patch
==============================================================================
--- (empty file)
+++ dists/trunk/linux-2.6/debian/patches/features/all/0001-iwlwifi-Set-monitor-mode-for-3945.patch	Tue Jun  3 21:56:58 2008
@@ -0,0 +1,91 @@
+From 5ec0397679f1c1606199cfd6f3e24351891c60c3 Mon Sep 17 00:00:00 2001
+From: Abhijeet Kolekar <abhijeet.kolekar at intel.com>
+Date: Mon, 5 May 2008 10:22:48 +0800
+Subject: [PATCH] iwlwifi : Set monitor mode for 3945
+
+The patch leverages mac80211 configure_filter to enable iwl3945
+monitor mode.
+
+Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar at intel.com>
+Signed-off-by: John W. Linville <linville at tuxdriver.com>
+---
+ drivers/net/wireless/iwlwifi/iwl-3945.h     |    1 +
+ drivers/net/wireless/iwlwifi/iwl3945-base.c |   36 ++++++++++++++++++++++++++-
+ 2 files changed, 36 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.h b/drivers/net/wireless/iwlwifi/iwl-3945.h
+index fb96c62..9fdc140 100644
+--- a/drivers/net/wireless/iwlwifi/iwl-3945.h
++++ b/drivers/net/wireless/iwlwifi/iwl-3945.h
+@@ -886,6 +886,7 @@ struct iwl3945_priv {
+ 	struct work_struct report_work;
+ 	struct work_struct request_scan;
+ 	struct work_struct beacon_update;
++	struct work_struct set_monitor;
+ 
+ 	struct tasklet_struct irq_tasklet;
+ 
+diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
+index 7040cde..f021eba 100644
+--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
++++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
+@@ -6144,6 +6144,24 @@ static void iwl3945_bg_rf_kill(struct work_struct *work)
+ 	mutex_unlock(&priv->mutex);
+ }
+ 
++static void iwl3945_bg_set_monitor(struct work_struct *work)
++{
++	struct iwl3945_priv *priv = container_of(work,
++				struct iwl3945_priv, set_monitor);
++
++	IWL_DEBUG(IWL_DL_STATE, "setting monitor mode\n");
++
++	mutex_lock(&priv->mutex);
++
++	if (!iwl3945_is_ready(priv))
++		IWL_DEBUG(IWL_DL_STATE, "leave - not ready\n");
++	else
++		if (iwl3945_set_mode(priv, IEEE80211_IF_TYPE_MNTR) != 0)
++			IWL_ERROR("iwl3945_set_mode() failed\n");
++
++	mutex_unlock(&priv->mutex);
++}
++
+ #define IWL_SCAN_CHECK_WATCHDOG (7 * HZ)
+ 
+ static void iwl3945_bg_scan_check(struct work_struct *data)
+@@ -6996,7 +7014,22 @@ static void iwl3945_configure_filter(struct ieee80211_hw *hw,
+ 	 * XXX: dummy
+ 	 * see also iwl3945_connection_init_rx_config
+ 	 */
+-	*total_flags = 0;
++	struct iwl3945_priv *priv = hw->priv;
++	int new_flags = 0;
++	if (changed_flags & (FIF_PROMISC_IN_BSS | FIF_OTHER_BSS)) {
++		if (*total_flags & (FIF_PROMISC_IN_BSS | FIF_OTHER_BSS)) {
++			IWL_DEBUG_MAC80211("Enter: type %d (0x%x, 0x%x)\n",
++					   IEEE80211_IF_TYPE_MNTR,
++					   changed_flags, *total_flags);
++			/* queue work 'cuz mac80211 is holding a lock which
++			 * prevents us from issuing (synchronous) f/w cmds */
++			queue_work(priv->workqueue, &priv->set_monitor);
++			new_flags &= FIF_PROMISC_IN_BSS |
++				     FIF_OTHER_BSS |
++				     FIF_ALLMULTI;
++		}
++	}
++	*total_flags = new_flags;
+ }
+ 
+ static void iwl3945_mac_remove_interface(struct ieee80211_hw *hw,
+@@ -7872,6 +7905,7 @@ static void iwl3945_setup_deferred_work(struct iwl3945_priv *priv)
+ 	INIT_WORK(&priv->abort_scan, iwl3945_bg_abort_scan);
+ 	INIT_WORK(&priv->rf_kill, iwl3945_bg_rf_kill);
+ 	INIT_WORK(&priv->beacon_update, iwl3945_bg_beacon_update);
++	INIT_WORK(&priv->set_monitor, iwl3945_bg_set_monitor);
+ 	INIT_DELAYED_WORK(&priv->post_associate, iwl3945_bg_post_associate);
+ 	INIT_DELAYED_WORK(&priv->init_alive_start, iwl3945_bg_init_alive_start);
+ 	INIT_DELAYED_WORK(&priv->alive_start, iwl3945_bg_alive_start);
+-- 
+1.5.5.1
+

Modified: dists/trunk/linux-2.6/debian/patches/series/1~experimental.1
==============================================================================
--- dists/trunk/linux-2.6/debian/patches/series/1~experimental.1	(original)
+++ dists/trunk/linux-2.6/debian/patches/series/1~experimental.1	Tue Jun  3 21:56:58 2008
@@ -33,3 +33,4 @@
 + features/all/at76.patch 
 + bugfix/fix-hifn_795X-divdi3.patch
 + bugfix/all/mtd-prevent-physmap-from-causing-request_module-runaway-loop-modprobe-net-pf-1.patch
++ features/all/0001-iwlwifi-Set-monitor-mode-for-3945.patch



More information about the Kernel-svn-changes mailing list