From: Dan Williams <dcbw@redhat.com>
To: Holger Schurig <hs4233@mail.mn-solutions.de>
Cc: linux-wireless@vger.kernel.org, John Linville <linville@tuxdriver.com>
Subject: Re: [PATCH] libertas: remove some references to IW_MODE_abc
Date: Fri, 23 Oct 2009 08:46:25 -0700 [thread overview]
Message-ID: <1256312785.2164.5.camel@localhost.localdomain> (raw)
In-Reply-To: <200910221415.38459.hs4233@mail.mn-solutions.de>
On Thu, 2009-10-22 at 14:15 +0200, Holger Schurig wrote:
> [PATCH] libertas: remove some references to IW_MODE_abc
>
> ... in pursue to quaff the wide-spread references to WEXT constants.
>
> When setting SNMP_MIB_OID_BSS_TYPE, wext.c can directly calculate the value
> the firmware wants.
>
> Reading of SNMP_MIB_OID_BSS_TYPE doesn't happen anywhere, so no need to
> convert the firmware value into WEXT values anyway.
>
> Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
> --- linux-wl.orig/drivers/net/wireless/libertas/cmd.c
> +++ linux-wl/drivers/net/wireless/libertas/cmd.c
> @@ -390,7 +390,7 @@
> switch (oid) {
> case SNMP_MIB_OID_BSS_TYPE:
> cmd.bufsize = cpu_to_le16(sizeof(u8));
> - cmd.value[0] = (val == IW_MODE_ADHOC) ? 2 : 1;
> + cmd.value[0] = val;
> break;
> case SNMP_MIB_OID_11D_ENABLE:
> case SNMP_MIB_OID_FRAG_THRESHOLD:
> @@ -443,13 +443,7 @@
>
> switch (le16_to_cpu(cmd.bufsize)) {
> case sizeof(u8):
> - if (oid == SNMP_MIB_OID_BSS_TYPE) {
> - if (cmd.value[0] == 2)
> - *out_val = IW_MODE_ADHOC;
> - else
> - *out_val = IW_MODE_INFRA;
> - } else
> - *out_val = cmd.value[0];
> + *out_val = cmd.value[0];
> break;
> case sizeof(u16):
> *out_val = le16_to_cpu(*((__le16 *)(&cmd.value)));
> --- linux-wl.orig/drivers/net/wireless/libertas/assoc.c
> +++ linux-wl/drivers/net/wireless/libertas/assoc.c
> @@ -1567,7 +1567,8 @@
> }
>
> priv->mode = assoc_req->mode;
> - ret = lbs_set_snmp_mib(priv, SNMP_MIB_OID_BSS_TYPE, assoc_req->mode);
> + ret = lbs_set_snmp_mib(priv, SNMP_MIB_OID_BSS_TYPE,
> + assoc_req->mode == IW_MODE_ADHOC ? 2 : 1);
>
> done:
> lbs_deb_leave_args(LBS_DEB_ASSOC, "ret %d", ret);
>
prev parent reply other threads:[~2009-10-23 15:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-22 12:15 [PATCH] libertas: remove some references to IW_MODE_abc Holger Schurig
2009-10-23 15:46 ` 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=1256312785.2164.5.camel@localhost.localdomain \
--to=dcbw@redhat.com \
--cc=hs4233@mail.mn-solutions.de \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.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