From: "Arend van Spriel" <arend@broadcom.com>
To: linville@tuxdriver.com
Cc: linux-wireless@vger.kernel.org, "Arend van Spriel" <arend@broadcom.com>
Subject: [PATCH 12/15] brcm80211: smac: remove phy api bypass in rate.h
Date: Tue, 18 Oct 2011 14:03:08 +0200 [thread overview]
Message-ID: <1318939391-19495-13-git-send-email-arend@broadcom.com> (raw)
In-Reply-To: <1318939391-19495-1-git-send-email-arend@broadcom.com>
Obviously the phy api should be used to interface with the phy. In
rate.h a table within phy was accessed directly by declaring the
table extern in rate.h itself. This patch fixes this using the
provided api function to obtain the table reference. This bypass
was found by a sparse warning on the table not being defined static.
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
---
.../net/wireless/brcm80211/brcmsmac/phy/phy_cmn.c | 2 +-
drivers/net/wireless/brcm80211/brcmsmac/rate.h | 5 ++---
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/phy/phy_cmn.c b/drivers/net/wireless/brcm80211/brcmsmac/phy/phy_cmn.c
index a314925..2faea50 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/phy/phy_cmn.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/phy/phy_cmn.c
@@ -112,7 +112,7 @@ static const struct chan_info_basic chan_info_all[] = {
{216, 50800}
};
-const u8 ofdm_rate_lookup[] = {
+static const u8 ofdm_rate_lookup[] = {
BRCM_RATE_48M,
BRCM_RATE_24M,
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/rate.h b/drivers/net/wireless/brcm80211/brcmsmac/rate.h
index e7b9dc2..980d578 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/rate.h
+++ b/drivers/net/wireless/brcm80211/brcmsmac/rate.h
@@ -19,6 +19,7 @@
#include "types.h"
#include "d11.h"
+#include "phy_hal.h"
extern const u8 rate_info[];
extern const struct brcms_c_rateset cck_ofdm_mimo_rates;
@@ -198,11 +199,9 @@ static inline u8 cck_rspec(u8 cck)
/* Convert encoded rate value in plcp header to numerical rates in 500 KHz
* increments */
-extern const u8 ofdm_rate_lookup[];
-
static inline u8 ofdm_phy2mac_rate(u8 rlpt)
{
- return ofdm_rate_lookup[rlpt & 0x7];
+ return wlc_phy_get_ofdm_rate_lookup()[rlpt & 0x7];
}
static inline u8 cck_phy2mac_rate(u8 signal)
--
1.7.4.1
next prev parent reply other threads:[~2011-10-18 12:03 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-18 12:02 [PATCH 00/15] brcm80211: cleanup work on community feedback Arend van Spriel
2011-10-18 12:02 ` [PATCH 01/15] brcm80211: cleanup defines in main.c Arend van Spriel
2011-10-18 12:02 ` [PATCH 02/15] brcm80211: removed duplicate defines Arend van Spriel
2011-10-18 12:02 ` [PATCH 03/15] brcm80211: smac: drop "40MHz intolerant" flag from HT capability info Arend van Spriel
2011-10-18 12:03 ` [PATCH 04/15] brcm80211: smac: removed support for SROM rev < 8 Arend van Spriel
2011-10-18 12:03 ` [PATCH 05/15] brcm80211: fmac: annotated little endian struct with _le Arend van Spriel
2011-10-18 12:03 ` [PATCH 06/15] brmc80211: fmac: reworked next_bss() Arend van Spriel
2011-10-18 12:03 ` [PATCH 07/15] brcm80211: fmac: changed two scan related structures Arend van Spriel
2011-10-18 12:03 ` [PATCH 08/15] brcm80211: smac: indicate severe problems to Mac80211 Arend van Spriel
2011-10-18 12:03 ` [PATCH 09/15] brcm80211: smac: remove obsolete srom variables from n-phy Arend van Spriel
2011-10-18 12:03 ` [PATCH 10/15] brcm80211: smac: avoid sprom endianess conversions for crc8 check Arend van Spriel
2011-10-18 12:03 ` [PATCH 11/15] brcm80211: smac: some local function made static in main.c Arend van Spriel
2011-10-18 12:03 ` Arend van Spriel [this message]
2011-10-18 12:03 ` [PATCH 13/15] brcm80211: util: move brcmu_pktfrombuf() function to brcmfmac Arend van Spriel
2011-10-18 12:03 ` [PATCH 14/15] brcm80211: util: remove function brcmu_format_hex() from brcmutil Arend van Spriel
2011-10-18 12:03 ` [PATCH 15/15] brcm80211: fmac: use sk_buff list for handling frames in receive path 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=1318939391-19495-13-git-send-email-arend@broadcom.com \
--to=arend@broadcom.com \
--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