All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benoit PAPILLAULT <benoit.papillault@free.fr>
To: "Gábor Stefanik" <netrolller.3d@gmail.com>
Cc: dsd@gentoo.org, linux-wireless@vger.kernel.org,
	zd1211-devs@lists.sourceforge.net, kune@deine-taler.de
Subject: Re: [zd1211-devs] [PATCH 1/2] zd1211rw: Experimental change to add proper monitor support
Date: Mon, 15 Feb 2010 08:24:51 +0100	[thread overview]
Message-ID: <4B78F6C3.9030006@free.fr> (raw)
In-Reply-To: <69e28c911002141628w76dc0419r43c7d753c16962da@mail.gmail.com>

Gábor Stefanik a écrit :
> On Mon, Feb 15, 2010 at 12:34 AM, Benoit Papillault
> <benoit.papillault@free.fr> wrote:
>   
>> Without this patch, monitor mode does not returns all frames. With this patch,
>> the performance are quite poor if we create a monitor interface. Note :
>> creating a monitor interface with the "cook" flag has no impact on performance.
>>
>> Signed-off-by: Benoit Papillault <benoit.papillault@free.fr>
>> ---
>>  drivers/net/wireless/zd1211rw/zd_mac.c |   20 +++++++++++++++++++-
>>  1 files changed, 19 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/net/wireless/zd1211rw/zd_mac.c b/drivers/net/wireless/zd1211rw/zd_mac.c
>> index 2d555cc..9cb6cbc 100644
>> --- a/drivers/net/wireless/zd1211rw/zd_mac.c
>> +++ b/drivers/net/wireless/zd1211rw/zd_mac.c
>> @@ -904,8 +904,26 @@ static int zd_op_config(struct ieee80211_hw *hw, u32 changed)
>>  {
>>        struct zd_mac *mac = zd_hw_mac(hw);
>>        struct ieee80211_conf *conf = &hw->conf;
>> +       int ret;
>>
>> -       return zd_chip_set_channel(&mac->chip, conf->channel->hw_value);
>> +       if (changed & IEEE80211_CONF_CHANGE_MONITOR) {
>> +               /*
>> +                * Warning : enabling this register kills RX & TX
>> +                * performance
>> +                */
>> +               u32 cr_sniffer = !!(conf->flags & IEEE80211_CONF_MONITOR);
>> +               ret = zd_iowrite32(&mac->chip, CR_SNIFFER_ON, cr_sniffer);
>> +               if (!ret)
>> +                       return ret;
>>     
>
> Your logic is the wrong way around. You should return if nonzero, not if zero.
>
>   
>> +       }
>> +
>> +       if (changed & IEEE80211_CONF_CHANGE_CHANNEL) {
>> +               ret = zd_chip_set_channel(&mac->chip, conf->channel->hw_value);
>> +               if (!ret)
>> +                       return ret;
>> +       }
>> +
>> +       return 0;
>>  }
>>
>>  static void zd_process_intr(struct work_struct *work)
>> --
>> 1.5.6.5
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
>>     
>
>
>
>   
You are right. I will resend a patch.

Regards,
Benoit


  reply	other threads:[~2010-02-15  7:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-14 23:34 [PATCH 1/2] zd1211rw: Experimental change to add proper monitor support Benoit Papillault
2010-02-14 23:34 ` [PATCH 2/2] zd1211rw: Set hardware BSSID and set hardware IBSS mode Benoit Papillault
2010-02-15  0:28 ` [PATCH 1/2] zd1211rw: Experimental change to add proper monitor support Gábor Stefanik
2010-02-15  7:24   ` Benoit PAPILLAULT [this message]
2010-02-15  7:33 ` [PATCH v2] zd1211rw: Set hardware BSSID and set hardware IBSS mode Benoit Papillault
2010-02-15 11:42   ` Gábor Stefanik
2010-02-15 22:26     ` Benoit PAPILLAULT

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=4B78F6C3.9030006@free.fr \
    --to=benoit.papillault@free.fr \
    --cc=dsd@gentoo.org \
    --cc=kune@deine-taler.de \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netrolller.3d@gmail.com \
    --cc=zd1211-devs@lists.sourceforge.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.