From: Dan Williams <dcbw@redhat.com>
To: Kiran Divekar <dkiran@marvell.com>
Cc: libertas-dev@lists.infradead.org, linux-wireless@vger.kernel.org,
Amitkumar Karwar <akarwar@marvell.com>,
Dan Carpenter <dan.carpenter@oracle.com>
Subject: Re: [PATCH] libertas: fix signedness bug in lbs_auth_to_authtype()
Date: Mon, 16 Apr 2012 12:29:46 -0500 [thread overview]
Message-ID: <1334597386.10194.35.camel@dcbw.foobar.com> (raw)
In-Reply-To: <1332959881-31278-1-git-send-email-dkiran@marvell.com>
On Wed, 2012-03-28 at 11:38 -0700, Kiran Divekar wrote:
> From: Amitkumar Karwar <akarwar@marvell.com>
>
> Return type for lbs_auth_to_authtype() is changed from "u8" to
> "int" to return negative error code correctly.
> Also an error check is added in connect handler for invalid auth
> type.
>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
> Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Acked-by: Dan Williams <dcbw@redhat.com>
> ---
> drivers/net/wireless/libertas/cfg.c | 9 +++++++--
> 1 files changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/wireless/libertas/cfg.c b/drivers/net/wireless/libertas/cfg.c
> index 3fa1ece..2fa879b 100644
> --- a/drivers/net/wireless/libertas/cfg.c
> +++ b/drivers/net/wireless/libertas/cfg.c
> @@ -103,7 +103,7 @@ static const u32 cipher_suites[] = {
> * Convert NL80211's auth_type to the one from Libertas, see chapter 5.9.1
> * in the firmware spec
> */
> -static u8 lbs_auth_to_authtype(enum nl80211_auth_type auth_type)
> +static int lbs_auth_to_authtype(enum nl80211_auth_type auth_type)
> {
> int ret = -ENOTSUPP;
>
> @@ -1411,7 +1411,12 @@ static int lbs_cfg_connect(struct wiphy *wiphy, struct net_device *dev,
> goto done;
> }
>
> - lbs_set_authtype(priv, sme);
> + ret = lbs_set_authtype(priv, sme);
> + if (ret == -ENOTSUPP) {
> + wiphy_err(wiphy, "unsupported authtype 0x%x\n", sme->auth_type);
> + goto done;
> + }
> +
> lbs_set_radio(priv, preamble, 1);
>
> /* Do the actual association */
prev parent reply other threads:[~2012-04-16 18:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-28 18:38 [PATCH] libertas: fix signedness bug in lbs_auth_to_authtype() Kiran Divekar
2012-04-16 17:29 ` Dan Williams [this message]
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=1334597386.10194.35.camel@dcbw.foobar.com \
--to=dcbw@redhat.com \
--cc=akarwar@marvell.com \
--cc=dan.carpenter@oracle.com \
--cc=dkiran@marvell.com \
--cc=libertas-dev@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
/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).