Linux wireless drivers development
 help / color / mirror / Atom feed
* [linux-wireless] [RFC PATCH]iwlwifi: Fix for monitor mode captures management frames only.
@ 2008-03-05  3:43 Kolekar, Abhijeet
  2008-03-05  9:35 ` Johannes Berg
  0 siblings, 1 reply; 2+ messages in thread
From: Kolekar, Abhijeet @ 2008-03-05  3:43 UTC (permalink / raw)
  To: johannes; +Cc: linux-wireless

If monitor mode is set then mac80211 stack now passes the information to
driver.

>From 1e21ee62c88c5defacf49a4044d26677b8a79032 Mon Sep 17 00:00:00 2001
From: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Date: Tue, 4 Mar 2008 17:04:56 -0800
Subject: [PATCH] Monitor mode bug fix.
Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
---
 drivers/net/wireless/iwlwifi/iwl-4965.c |    5 +++++
 net/mac80211/ieee80211.c                |   10 ++++++++++
 2 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c
b/drivers/net/wireless/iwlwifi/iwl-4965.c
index 3e122a9..5ed75aa 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
@@ -3822,6 +3822,11 @@ static void iwl4965_rx_reply_rx(struct
iwl4965_priv *priv,
 	/* Find max signal strength (dBm) among 3 antenna/receiver
chains */
 	rx_status.ssi = iwl4965_calc_rssi(rx_start);
 
+	if (priv->iw_mode == IEEE80211_IF_TYPE_MNTR) {
+		iwl4965_handle_data_packet(priv, 1, include_phy, rxb,
&rx_status);
+		return;
+	}
+
 	/* Meaningful noise values are available only from beacon
statistics,
 	 *   which are gathered only when associated, and indicate noise
 	 *   only for the associated network channel ...
diff --git a/net/mac80211/ieee80211.c b/net/mac80211/ieee80211.c
index 484b063..85e37c8 100644
--- a/net/mac80211/ieee80211.c
+++ b/net/mac80211/ieee80211.c
@@ -327,6 +327,16 @@ static int ieee80211_open(struct net_device *dev)
 		netif_tx_lock_bh(local->mdev);
 		ieee80211_configure_filter(local);
 		netif_tx_unlock_bh(local->mdev);
+
+		conf.vif = &sdata->vif;
+		conf.type = sdata->vif.type;
+		conf.mac_addr = dev->dev_addr;
+		res = local->ops->add_interface(local_to_hw(local),
&conf);
+		if (res && !local->open_count && local->ops->stop)
+			local->ops->stop(local_to_hw(local));
+		if (res)
+			return res;
+
 		break;
 	case IEEE80211_IF_TYPE_STA:
 	case IEEE80211_IF_TYPE_IBSS:
-- 
1.5.2.5



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [linux-wireless] [RFC PATCH]iwlwifi: Fix for monitor mode captures management frames only.
  2008-03-05  3:43 [linux-wireless] [RFC PATCH]iwlwifi: Fix for monitor mode captures management frames only Kolekar, Abhijeet
@ 2008-03-05  9:35 ` Johannes Berg
  0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2008-03-05  9:35 UTC (permalink / raw)
  To: Kolekar, Abhijeet; +Cc: linux-wireless

[-- Attachment #1: Type: text/plain, Size: 2255 bytes --]


On Tue, 2008-03-04 at 19:43 -0800, Kolekar, Abhijeet wrote:
> If monitor mode is set then mac80211 stack now passes the information to
> driver.
> 
> >From 1e21ee62c88c5defacf49a4044d26677b8a79032 Mon Sep 17 00:00:00 2001
> From: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
> Date: Tue, 4 Mar 2008 17:04:56 -0800
> Subject: [PATCH] Monitor mode bug fix.
> Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
> ---
>  drivers/net/wireless/iwlwifi/iwl-4965.c |    5 +++++
>  net/mac80211/ieee80211.c                |   10 ++++++++++
>  2 files changed, 15 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c
> b/drivers/net/wireless/iwlwifi/iwl-4965.c
> index 3e122a9..5ed75aa 100644
> --- a/drivers/net/wireless/iwlwifi/iwl-4965.c
> +++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
> @@ -3822,6 +3822,11 @@ static void iwl4965_rx_reply_rx(struct
> iwl4965_priv *priv,
>  	/* Find max signal strength (dBm) among 3 antenna/receiver
> chains */
>  	rx_status.ssi = iwl4965_calc_rssi(rx_start);
>  
> +	if (priv->iw_mode == IEEE80211_IF_TYPE_MNTR) {
> +		iwl4965_handle_data_packet(priv, 1, include_phy, rxb,
> &rx_status);
> +		return;
> +	}
> +
>  	/* Meaningful noise values are available only from beacon
> statistics,
>  	 *   which are gathered only when associated, and indicate noise
>  	 *   only for the associated network channel ...
> diff --git a/net/mac80211/ieee80211.c b/net/mac80211/ieee80211.c
> index 484b063..85e37c8 100644
> --- a/net/mac80211/ieee80211.c
> +++ b/net/mac80211/ieee80211.c
> @@ -327,6 +327,16 @@ static int ieee80211_open(struct net_device *dev)
>  		netif_tx_lock_bh(local->mdev);
>  		ieee80211_configure_filter(local);
>  		netif_tx_unlock_bh(local->mdev);
> +
> +		conf.vif = &sdata->vif;
> +		conf.type = sdata->vif.type;
> +		conf.mac_addr = dev->dev_addr;
> +		res = local->ops->add_interface(local_to_hw(local),
> &conf);
> +		if (res && !local->open_count && local->ops->stop)
> +			local->ops->stop(local_to_hw(local));
> +		if (res)
> +			return res;
> +
>  		break;

NACK. Not passing this to the driver is intentional. There's the
radiotap flag (that really indicates "have monitors") to use.

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-03-05  9:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-05  3:43 [linux-wireless] [RFC PATCH]iwlwifi: Fix for monitor mode captures management frames only Kolekar, Abhijeet
2008-03-05  9:35 ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox