linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Henry Ptasinski" <henryp@broadcom.com>
To: "Greg Dietsche" <Gregory.Dietsche@cuw.edu>
Cc: "gregkh@suse.de" <gregkh@suse.de>,
	"Brett Rudley" <brudley@broadcom.com>,
	"Dowan Kim" <dowan@broadcom.com>,
	"Roland Vossen" <rvossen@broadcom.com>,
	"Arend Van Spriel" <arend@broadcom.com>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	"devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Henry Ptasinski" <henryp@broadcom.com>
Subject: Re: [PATCH] staging: brcm80211: return false if not a broadcom board
Date: Wed, 15 Jun 2011 18:36:16 -0700	[thread overview]
Message-ID: <20110616013615.GA14700@broadcom.com> (raw)
In-Reply-To: <1308176709-14765-1-git-send-email-Gregory.Dietsche@cuw.edu>

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.

The device ID is of course always checked.

- Henry


  reply	other threads:[~2011-06-16  1:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-15 22:25 [PATCH] staging: brcm80211: return false if not a broadcom board Greg Dietsche
2011-06-16  1:36 ` Henry Ptasinski [this message]
2011-06-16  2:49   ` Greg Dietsche
2011-06-16 23:37     ` Henry Ptasinski
2011-06-16 23:45       ` Julian Calaby
2011-06-17 22:01         ` Henry Ptasinski
2011-06-18 15:52           ` Greg Dietsche
2011-06-16  5:14   ` Dan Carpenter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110616013615.GA14700@broadcom.com \
    --to=henryp@broadcom.com \
    --cc=Gregory.Dietsche@cuw.edu \
    --cc=arend@broadcom.com \
    --cc=brudley@broadcom.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=dowan@broadcom.com \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=rvossen@broadcom.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).