diff --git a/debian/changelog b/debian/changelog index 6573aac09..c71cd84f4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -30,6 +30,7 @@ linux-2.6 (2.6.26~rc4-1~experimental.1) UNRELEASED; urgency=low * 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 diff --git a/debian/patches/features/all/0001-iwlwifi-Set-monitor-mode-for-3945.patch b/debian/patches/features/all/0001-iwlwifi-Set-monitor-mode-for-3945.patch new file mode 100644 index 000000000..23936305c --- /dev/null +++ b/debian/patches/features/all/0001-iwlwifi-Set-monitor-mode-for-3945.patch @@ -0,0 +1,91 @@ +From 5ec0397679f1c1606199cfd6f3e24351891c60c3 Mon Sep 17 00:00:00 2001 +From: Abhijeet Kolekar +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 +Signed-off-by: John W. Linville +--- + 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 + diff --git a/debian/patches/series/1~experimental.1 b/debian/patches/series/1~experimental.1 index f36aacddb..05088ca57 100644 --- a/debian/patches/series/1~experimental.1 +++ b/debian/patches/series/1~experimental.1 @@ -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