From: "John W. Linville" <linville@tuxdriver.com>
To: Arend van Spriel <arend@broadcom.com>
Cc: linux-wireless <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH 2/4] brcmutil: add helper function to format board revision
Date: Mon, 24 Nov 2014 16:53:52 -0500 [thread overview]
Message-ID: <20141124215352.GB4484@tuxdriver.com> (raw)
In-Reply-To: <1416518822-29585-3-git-send-email-arend@broadcom.com>
I am holding patches 2-4 until we resolve the brcmu_boardrev_str
build thing...
On Thu, Nov 20, 2014 at 10:27:00PM +0100, Arend van Spriel wrote:
> The board revision that is available in hardware can be translated
> so it matches the labelling on the board. This is accomplished by
> this helper function.
>
> Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
> Signed-off-by: Arend van Spriel <arend@broadcom.com>
> ---
> drivers/net/wireless/brcm80211/brcmutil/utils.c | 16 ++++++++++++++++
> drivers/net/wireless/brcm80211/include/brcmu_utils.h | 2 ++
> 2 files changed, 18 insertions(+)
>
> diff --git a/drivers/net/wireless/brcm80211/brcmutil/utils.c b/drivers/net/wireless/brcm80211/brcmutil/utils.c
> index 0f7e1c7..af97f8b 100644
> --- a/drivers/net/wireless/brcm80211/brcmutil/utils.c
> +++ b/drivers/net/wireless/brcm80211/brcmutil/utils.c
> @@ -292,4 +292,20 @@ void brcmu_dbg_hex_dump(const void *data, size_t size, const char *fmt, ...)
> print_hex_dump_bytes("", DUMP_PREFIX_OFFSET, data, size);
> }
> EXPORT_SYMBOL(brcmu_dbg_hex_dump);
> +
> +/* Produce a human-readable string for boardrev */
> +char *brcmu_boardrev_str(u32 brev, char *buf)
> +{
> + char c;
> +
> + if (brev < 0x100) {
> + snprintf(buf, 8, "%d.%d", (brev & 0xf0) >> 4, brev & 0xf);
> + } else {
> + c = (brev & 0xf000) == 0x1000 ? 'P' : 'A';
> + snprintf(buf, 8, "%c%03x", c, brev & 0xfff);
> + }
> + return buf;
> +}
> +EXPORT_SYMBOL(brcmu_boardrev_str);
> +
> #endif /* defined(DEBUG) */
> diff --git a/drivers/net/wireless/brcm80211/include/brcmu_utils.h b/drivers/net/wireless/brcm80211/include/brcmu_utils.h
> index 8ba445b..a043e29 100644
> --- a/drivers/net/wireless/brcm80211/include/brcmu_utils.h
> +++ b/drivers/net/wireless/brcm80211/include/brcmu_utils.h
> @@ -218,4 +218,6 @@ void brcmu_dbg_hex_dump(const void *data, size_t size, const char *fmt, ...)
> }
> #endif
>
> +char *brcmu_boardrev_str(u32 brev, char *buf);
> +
> #endif /* _BRCMU_UTILS_H_ */
> --
> 1.9.1
>
>
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
next prev parent reply other threads:[~2014-11-24 22:00 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-20 21:26 [PATCH 0/4] brcm80211: minor rework Arend van Spriel
2014-11-20 21:26 ` [PATCH 1/4] brcmfmac: fix static checker warning in pmklist handling Arend van Spriel
2014-11-20 21:27 ` [PATCH 2/4] brcmutil: add helper function to format board revision Arend van Spriel
2014-11-24 21:53 ` John W. Linville [this message]
2014-11-25 10:01 ` Arend van Spriel
2014-11-25 18:51 ` John W. Linville
2014-11-20 21:27 ` [PATCH 3/4] brcmsmac: extend hardware info shown in debugfs Arend van Spriel
2014-11-24 21:50 ` John W. Linville
2014-11-25 12:12 ` Arend van Spriel
2014-11-25 13:00 ` Arend van Spriel
2014-11-25 18:50 ` John W. Linville
2014-11-25 18:49 ` John W. Linville
2014-11-25 19:05 ` John W. Linville
2014-11-25 19:16 ` Arend van Spriel
2014-11-25 19:20 ` John W. Linville
2014-11-25 19:49 ` Arend van Spriel
2014-11-25 19:23 ` Arend van Spriel
2014-11-25 19:28 ` Arend van Spriel
2014-11-20 21:27 ` [PATCH 4/4] brcmfmac: correct .disconnect() callback while connecting Arend van Spriel
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=20141124215352.GB4484@tuxdriver.com \
--to=linville@tuxdriver.com \
--cc=arend@broadcom.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.