Return-path: Received: from mail-qy0-f183.google.com ([209.85.221.183]:42740 "EHLO mail-qy0-f183.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755088Ab0E0Oba (ORCPT ); Thu, 27 May 2010 10:31:30 -0400 Received: by qyk13 with SMTP id 13so61730qyk.1 for ; Thu, 27 May 2010 07:31:29 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <4BFDEBDC.4070304@gmail.com> References: <4BFDEBDC.4070304@gmail.com> Date: Thu, 27 May 2010 10:31:29 -0400 Message-ID: Subject: Re: ath5k past 2.6.30 breaks monitor mode (and thus the aircrack suite) From: Bob Copeland To: Richard Farina Cc: =?ISO-8859-1?Q?G=E1bor_Stefanik?= , Weedy , linux-wireless , Johannes Berg Content-Type: multipart/mixed; boundary=000feae9fd080c75a90487943f80 Sender: linux-wireless-owner@vger.kernel.org List-ID: --000feae9fd080c75a90487943f80 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Wed, May 26, 2010 at 11:49 PM, Richard Farina 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 ki= nd > of support you need to make this happen. =A0You 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 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 --- 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 |=3D 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 |=3D AR5K_RX_FILTER_PROM; + /* Note, AR5K_RX_FILTER_MCAST is already enabled */ if (*new_flags & FIF_ALLMULTI) { mfilt[0] =3D ~0; --=20 1.6.3.3 --=20 Bob Copeland %% www.bobcopeland.com --000feae9fd080c75a90487943f80 Content-Type: text/x-patch; charset=US-ASCII; name="0001-ath5k-retain-promiscuous-setting.patch" Content-Disposition: attachment; filename="0001-ath5k-retain-promiscuous-setting.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_g9pphx9y0 RnJvbSBiZWZlNDdhODRhMjIzMTJlMDU0N2QwNGNkM2QyNTBiMGU0OWVjZjU0IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBCb2IgQ29wZWxhbmQgPG1lQGJvYmNvcGVsYW5kLmNvbT4KRGF0 ZTogVGh1LCAyNyBNYXkgMjAxMCAwODo1NDozOCAtMDQwMApTdWJqZWN0OiBbUEFUQ0hdIGF0aDVr OiByZXRhaW4gcHJvbWlzY3VvdXMgc2V0dGluZwoKQ29tbWl0IDU2ZDFkZTBhMjFkYjI4ZTQxNzQx Y2ZhMGE2NmUxOGJjOGQ5MjA1NTQsICJhdGg1azogY2xlYW4gdXAKZmls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