Commit 1433c59b authored by Arend van Spriel's avatar Arend van Spriel Committed by John W. Linville

brcm80211: smac: remove phy api bypass in rate.h

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: default avatarAlwin Beukers <alwin@broadcom.com>
Reviewed-by: default avatarPieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: default avatarRoland Vossen <rvossen@broadcom.com>
Signed-off-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 094b199b
...@@ -112,7 +112,7 @@ static const struct chan_info_basic chan_info_all[] = { ...@@ -112,7 +112,7 @@ static const struct chan_info_basic chan_info_all[] = {
{216, 50800} {216, 50800}
}; };
const u8 ofdm_rate_lookup[] = { static const u8 ofdm_rate_lookup[] = {
BRCM_RATE_48M, BRCM_RATE_48M,
BRCM_RATE_24M, BRCM_RATE_24M,
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include "types.h" #include "types.h"
#include "d11.h" #include "d11.h"
#include "phy_hal.h"
extern const u8 rate_info[]; extern const u8 rate_info[];
extern const struct brcms_c_rateset cck_ofdm_mimo_rates; extern const struct brcms_c_rateset cck_ofdm_mimo_rates;
...@@ -198,11 +199,9 @@ static inline u8 cck_rspec(u8 cck) ...@@ -198,11 +199,9 @@ static inline u8 cck_rspec(u8 cck)
/* Convert encoded rate value in plcp header to numerical rates in 500 KHz /* Convert encoded rate value in plcp header to numerical rates in 500 KHz
* increments */ * increments */
extern const u8 ofdm_rate_lookup[];
static inline u8 ofdm_phy2mac_rate(u8 rlpt) 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) static inline u8 cck_phy2mac_rate(u8 signal)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment