Search Linux Wireless

Re: [PATCH 06/12] Add support for monitor mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sunday 10 February 2008 16:49:28 Michael Buesch wrote:
> > +	flags = changed_flags & AT76_SUPPORTED_FILTERS;
> > +	*total_flags = AT76_SUPPORTED_FILTERS;
> 
> &= is needed instead of =
> 
> > +
> > +	/* FIXME: access to priv->promisc should be protected with
> > +	 * priv->mtx, but it's impossible because this function needs to be
> > +	 * atomic */
> > +
> > +	if (flags && !priv->promisc) {

and you must use *total_flags instead of the changed flags here.
So you can drop the local "flags" variable.

> > +		/* mac80211 wants us to enable promiscuous mode */
> > +		priv->promisc = 1;
> > +	} else if (!flags && priv->promisc) {

same here.

> > +		/* we need to disable promiscuous mode */
> > +		priv->promisc = 0;
> > +	} else
> > +		return;
> > +
> > +	queue_work(hw->workqueue, &priv->work_set_promisc);


-- 
Greetings Michael.
-
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux