linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bob Copeland <me@bobcopeland.com>
To: Richard Farina <sidhayn@gmail.com>
Cc: "Gábor Stefanik" <netrolller.3d@gmail.com>,
	Weedy <weedy2887@gmail.com>,
	linux-wireless <linux-wireless@vger.kernel.org>,
	"Johannes Berg" <johannes@sipsolutions.net>
Subject: Re: ath5k past 2.6.30 breaks monitor mode (and thus the aircrack suite)
Date: Thu, 27 May 2010 10:31:29 -0400	[thread overview]
Message-ID: <AANLkTin3VSp_FcSiadD4efE1Yo1vKiDXmOngsHEKiQmF@mail.gmail.com> (raw)
In-Reply-To: <4BFDEBDC.4070304@gmail.com>

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

On Wed, May 26, 2010 at 11:49 PM, Richard Farina <sidhayn@gmail.com> wrote:
> Bob Copeland wrote:
>> Ok, it should be enough to look at the filter flags instead of
>> the opmode -- I knew in the back of my mind that the monitor
>> stuff was bogus (part of the reason I did the patch in the first
>> place) but just got confused by what was already there I guess.
>
> I've got a lot of people very interested in this fix. Let me know what kind
> of support you need to make this happen.  You know where to find me on irc
> ;-)

Ok, can you and Weedy try this patch?

Use the attachment -- gmail will screw up the whitespace, but I included
it inline for reference.

Weedy, if you want reported-by credit can you give your full name and
preferred email address?

From: Bob Copeland <me@bobcopeland.com>
Date: Thu, 27 May 2010 08:54:38 -0400
Subject: [PATCH] ath5k: retain promiscuous setting

Commit 56d1de0a21db28e41741cfa0a66e18bc8d920554, "ath5k: clean up
filter flags setting" introduced a regression in monitor mode such
that the promisc filter flag would get lost.

Although we set the promisc flag when it changed, we did not
preserve it across subsequent calls to configure_filter.  This patch
restores the original functionality.

Cc: stable@kernel.org
Signed-off-by: Bob Copeland <me@bobcopeland.com>
---

Note, a better fix would be to just unconditionally look at new_flags,
but this is the minimal change for stable.  I'll add fixing all this
stuff up to my todo.

 drivers/net/wireless/ath/ath5k/base.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/ath/ath5k/base.c
b/drivers/net/wireless/ath/ath5k/base.c
index 9c27623..9e023b8 100644
--- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/drivers/net/wireless/ath/ath5k/base.c
@@ -3153,13 +3153,15 @@ static void ath5k_configure_filter(struct
ieee80211_hw *hw,

 	if (changed_flags & (FIF_PROMISC_IN_BSS | FIF_OTHER_BSS)) {
 		if (*new_flags & FIF_PROMISC_IN_BSS) {
-			rfilt |= AR5K_RX_FILTER_PROM;
 			__set_bit(ATH_STAT_PROMISC, sc->status);
 		} else {
 			__clear_bit(ATH_STAT_PROMISC, sc->status);
 		}
 	}

+	if (test_bit(ATH_STAT_PROMISC, sc->status))
+		rfilt |= AR5K_RX_FILTER_PROM;
+
 	/* Note, AR5K_RX_FILTER_MCAST is already enabled */
 	if (*new_flags & FIF_ALLMULTI) {
 		mfilt[0] =  ~0;
-- 
1.6.3.3


-- 
Bob Copeland %% www.bobcopeland.com

[-- Attachment #2: 0001-ath5k-retain-promiscuous-setting.patch --]
[-- Type: text/x-patch, Size: 1638 bytes --]

From befe47a84a22312e0547d04cd3d250b0e49ecf54 Mon Sep 17 00:00:00 2001
From: Bob Copeland <me@bobcopeland.com>
Date: Thu, 27 May 2010 08:54:38 -0400
Subject: [PATCH] ath5k: retain promiscuous setting

Commit 56d1de0a21db28e41741cfa0a66e18bc8d920554, "ath5k: clean up
filter flags setting" introduced a regression in monitor mode such
that the promisc filter flag would get lost.

Although we set the promisc flag when it changed, we did not
preserve it across subsequent calls to configure_filter.  This patch
restores the original functionality.

Cc: stable@kernel.org
Signed-off-by: Bob Copeland <me@bobcopeland.com>
---

Note, a better fix would be to just unconditionally look at new_flags,
but this is the minimal change for stable.  I'll add fixing all this
stuff up to my todo.

 drivers/net/wireless/ath/ath5k/base.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
index 9c27623..9e023b8 100644
--- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/drivers/net/wireless/ath/ath5k/base.c
@@ -3153,13 +3153,15 @@ static void ath5k_configure_filter(struct ieee80211_hw *hw,
 
 	if (changed_flags & (FIF_PROMISC_IN_BSS | FIF_OTHER_BSS)) {
 		if (*new_flags & FIF_PROMISC_IN_BSS) {
-			rfilt |= AR5K_RX_FILTER_PROM;
 			__set_bit(ATH_STAT_PROMISC, sc->status);
 		} else {
 			__clear_bit(ATH_STAT_PROMISC, sc->status);
 		}
 	}
 
+	if (test_bit(ATH_STAT_PROMISC, sc->status))
+		rfilt |= AR5K_RX_FILTER_PROM;
+
 	/* Note, AR5K_RX_FILTER_MCAST is already enabled */
 	if (*new_flags & FIF_ALLMULTI) {
 		mfilt[0] =  ~0;
-- 
1.6.3.3


  reply	other threads:[~2010-05-27 14:31 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-16 20:41 ath5k past 2.6.30 breaks monitor mode (and thus the aircrack suite) Weedy
2010-05-16 21:49 ` Gábor Stefanik
2010-05-17  6:38   ` Weedy
2010-05-17 11:21     ` Gábor Stefanik
     [not found]       ` <AANLkTikRt1fUgngBQxEoEFe1VDrYVFRAoMSR53et7gxf@mail.gmail.com>
     [not found]         ` <AANLkTim-A_TWT-flrW88gJGan47Xhm7llyrQE3ehDKU6@mail.gmail.com>
     [not found]           ` <AANLkTim4zLxIQH2r76WZRh9kNigVNAngcK1d9-Cu65Ag@mail.gmail.com>
2010-05-23 18:12             ` Gábor Stefanik
2010-05-23 18:17               ` Gábor Stefanik
     [not found]                 ` <AANLkTimYeL4KQozuTl4le9WUpObsjwp0YAx7eAYq6MBr@mail.gmail.com>
2010-05-25  2:23                   ` Gábor Stefanik
2010-05-25 13:30                     ` Weedy
2010-05-25 14:53                       ` Bob Copeland
2010-05-25 22:59                         ` Gábor Stefanik
2010-05-26 12:43                           ` Bob Copeland
2010-05-26 21:47                             ` Weedy
2010-05-27  3:49                             ` Richard Farina
2010-05-27 14:31                               ` Bob Copeland [this message]
2010-05-27 17:40                                 ` Weedy
2010-05-27 18:31                                   ` Bob Copeland
2010-05-27 18:41                                     ` John W. Linville
2010-05-28  3:39                                       ` Weedy
2010-05-28 18:16                                 ` Richard Farina

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AANLkTin3VSp_FcSiadD4efE1Yo1vKiDXmOngsHEKiQmF@mail.gmail.com \
    --to=me@bobcopeland.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netrolller.3d@gmail.com \
    --cc=sidhayn@gmail.com \
    --cc=weedy2887@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).