Re: [PATCH] staging: brcm80211: return false if not a broadcom board

Dan Carpenter
2011-06-16T05:15:26Z

On Wed, Jun 15, 2011 at 06:36:16PM -0700, Henry Ptasinski wrote:
> On Wed, Jun 15, 2011 at 03:25:09PM -0700, Greg Dietsche wrote:
> > This code looks wrong to me. I think it meant to return false
> > if the board's vendor id isn't Broadcom's.
> >
> > Compile tested only.
> >
> > Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>
> > ---
> > drivers/staging/brcm80211/brcmsmac/wlc_bmac.c | 2 +-
> > 1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/drivers/staging/brcm80211/brcmsmac/wlc_bmac.c b/drivers/staging/brcm80211/brcmsmac/wlc_bmac.c
> > index 4534926..ee13238 100644
> > --- a/drivers/staging/brcm80211/brcmsmac/wlc_bmac.c
> > +++ b/drivers/staging/brcm80211/brcmsmac/wlc_bmac.c
> > @@ -1943,7 +1943,7 @@ static bool wlc_validboardtype(struct wlc_hw_info *wlc_hw)
> > }
> >
> > if (wlc_hw->sih->boardvendor != PCI_VENDOR_ID_BROADCOM)
> > - return goodboard;
> > + goodboard = false;
> >
> > return goodboard;
> > }
>
> Actually, the original code is correct.
>
> For boards with the Broadcom ID, this function checks that the boardrev is
> sane. Dev boards that aren't properly configured may have invalid info, so this
> check is mainly to catch that problem.
>
> For boards with any other vendor, we don't have any sanity checks that we know
> should be done, so the board info is always considered good.
>

Sounds like it should be "goodboard = true;" then.

regards,
dan carpenter