The first test is to check if any advertising value is given.
The else path is when advertising == 0.
The b44->flags do not have the same values as the given advertising bits.
When any (or all) of the ADVERTISE_ALL bits are passed to the driver the
b44->flags
are set accordingly.
I think it's ok.
Thanks,
Gary
On Wed, 2006-05-24 at 02:41 -0400, Jeff Garzik wrote:
> Gary Zambrano wrote:
> > + if (cmd->advertising & ADVERTISE_ALL) {
> > + if (cmd->advertising & ADVERTISE_10HALF)
> > + bp->flags |= B44_FLAG_ADV_10HALF;
> > + if (cmd->advertising & ADVERTISE_10FULL)
> > + bp->flags |= B44_FLAG_ADV_10FULL;
> > + if (cmd->advertising & ADVERTISE_100HALF)
> > + bp->flags |= B44_FLAG_ADV_100HALF;
> > + if (cmd->advertising & ADVERTISE_100FULL)
> > + bp->flags |= B44_FLAG_ADV_100FULL;
> > + } else {
> > + bp->flags |= (B44_FLAG_ADV_10HALF |
> > + B44_FLAG_ADV_10FULL |
> > + B44_FLAG_ADV_100HALF |
> > + B44_FLAG_ADV_100FULL);
> > + }
>
> The logic above is backwards. I presume the first test should be
> if (!(cmd->advertising & ADVERTISE_ALL))
>
> The rest looks OK.
>
> Jeff
>
>
>
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html