On Mon, Feb 15, 2010 at 12:34 AM, Benoit Papillault <benoit.papilla...@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.papilla...@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 majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- Vista: [V]iruses, [I]ntruders, [S]pyware, [T]rojans and [A]dware. :-) ------------------------------------------------------------------------------ SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW http://p.sf.net/sfu/solaris-dev2dev _______________________________________________ Zd1211-devs mailing list - http://zd1211.wiki.sourceforge.net/ Unsubscribe: https://lists.sourceforge.net/lists/listinfo/zd1211-devs