aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl4965-base.c
diff options
context:
space:
mode:
authorAbhijeet Kolekar <abhijeet.kolekar@intel.com>2008-05-04 22:22:47 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-05-14 16:29:46 -0400
commit4419e39b6041b213e49bb13fd40fb267de0eb568 (patch)
treec4abd586184316ca3eaafc35de7f9c060f916314 /drivers/net/wireless/iwlwifi/iwl4965-base.c
parentf3ccc08c8cdeb784087348e67f41a779c787fa0e (diff)
iwlwifi : Set monitor mode for 4965
The patch leverages mac80211 configure_filter to enable iwl4965 monitor mode. Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl4965-base.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl4965-base.c36
1 files changed, 35 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c
index 2e976c3881e6..88f3554c0fbc 100644
--- a/drivers/net/wireless/iwlwifi/iwl4965-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c
@@ -4539,6 +4539,24 @@ static void iwl4965_bg_rf_kill(struct work_struct *work)
4539 mutex_unlock(&priv->mutex); 4539 mutex_unlock(&priv->mutex);
4540} 4540}
4541 4541
4542static void iwl4965_bg_set_monitor(struct work_struct *work)
4543{
4544 struct iwl_priv *priv = container_of(work,
4545 struct iwl_priv, set_monitor);
4546
4547 IWL_DEBUG(IWL_DL_STATE, "setting monitor mode\n");
4548
4549 mutex_lock(&priv->mutex);
4550
4551 if (!iwl_is_ready(priv))
4552 IWL_DEBUG(IWL_DL_STATE, "leave - not ready\n");
4553 else
4554 if (iwl4965_set_mode(priv, IEEE80211_IF_TYPE_MNTR) != 0)
4555 IWL_ERROR("iwl4965_set_mode() failed\n");
4556
4557 mutex_unlock(&priv->mutex);
4558}
4559
4542#define IWL_SCAN_CHECK_WATCHDOG (7 * HZ) 4560#define IWL_SCAN_CHECK_WATCHDOG (7 * HZ)
4543 4561
4544static void iwl4965_bg_scan_check(struct work_struct *data) 4562static void iwl4965_bg_scan_check(struct work_struct *data)
@@ -5428,7 +5446,22 @@ static void iwl4965_configure_filter(struct ieee80211_hw *hw,
5428 * XXX: dummy 5446 * XXX: dummy
5429 * see also iwl4965_connection_init_rx_config 5447 * see also iwl4965_connection_init_rx_config
5430 */ 5448 */
5431 *total_flags = 0; 5449 struct iwl_priv *priv = hw->priv;
5450 int new_flags = 0;
5451 if (changed_flags & (FIF_PROMISC_IN_BSS | FIF_OTHER_BSS)) {
5452 if (*total_flags & (FIF_PROMISC_IN_BSS | FIF_OTHER_BSS)) {
5453 IWL_DEBUG_MAC80211("Enter: type %d (0x%x, 0x%x)\n",
5454 IEEE80211_IF_TYPE_MNTR,
5455 changed_flags, *total_flags);
5456 /* queue work 'cuz mac80211 is holding a lock which
5457 * prevents us from issuing (synchronous) f/w cmds */
5458 queue_work(priv->workqueue, &priv->set_monitor);
5459 new_flags &= FIF_PROMISC_IN_BSS |
5460 FIF_OTHER_BSS |
5461 FIF_ALLMULTI;
5462 }
5463 }
5464 *total_flags = new_flags;
5432} 5465}
5433 5466
5434static void iwl4965_mac_remove_interface(struct ieee80211_hw *hw, 5467static void iwl4965_mac_remove_interface(struct ieee80211_hw *hw,
@@ -6359,6 +6392,7 @@ static void iwl4965_setup_deferred_work(struct iwl_priv *priv)
6359 INIT_WORK(&priv->abort_scan, iwl4965_bg_abort_scan); 6392 INIT_WORK(&priv->abort_scan, iwl4965_bg_abort_scan);
6360 INIT_WORK(&priv->rf_kill, iwl4965_bg_rf_kill); 6393 INIT_WORK(&priv->rf_kill, iwl4965_bg_rf_kill);
6361 INIT_WORK(&priv->beacon_update, iwl4965_bg_beacon_update); 6394 INIT_WORK(&priv->beacon_update, iwl4965_bg_beacon_update);
6395 INIT_WORK(&priv->set_monitor, iwl4965_bg_set_monitor);
6362 INIT_DELAYED_WORK(&priv->post_associate, iwl4965_bg_post_associate); 6396 INIT_DELAYED_WORK(&priv->post_associate, iwl4965_bg_post_associate);
6363 INIT_DELAYED_WORK(&priv->init_alive_start, iwl4965_bg_init_alive_start); 6397 INIT_DELAYED_WORK(&priv->init_alive_start, iwl4965_bg_init_alive_start);
6364 INIT_DELAYED_WORK(&priv->alive_start, iwl4965_bg_alive_start); 6398 INIT_DELAYED_WORK(&priv->alive_start, iwl4965_bg_alive_start);