lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110616013615.GA14700@broadcom.com>
Date:	Wed, 15 Jun 2011 18:36:16 -0700
From:	"Henry Ptasinski" <henryp@...adcom.com>
To:	"Greg Dietsche" <Gregory.Dietsche@....edu>
cc:	"gregkh@...e.de" <gregkh@...e.de>,
	"Brett Rudley" <brudley@...adcom.com>,
	"Dowan Kim" <dowan@...adcom.com>,
	"Roland Vossen" <rvossen@...adcom.com>,
	"Arend Van Spriel" <arend@...adcom.com>,
	"linux-wireless@...r.kernel.org" <linux-wireless@...r.kernel.org>,
	"devel@...verdev.osuosl.org" <devel@...verdev.osuosl.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"Henry Ptasinski" <henryp@...adcom.com>
Subject: Re: [PATCH] staging: brcm80211: return false if not a broadcom
 board

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@....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.

The device ID is of course always checked.

- Henry

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ