Commit 3cfbbacd authored by Roland Vossen's avatar Roland Vossen Committed by Greg Kroah-Hartman

staging: brcm80211: various global var related changes in softmac

Reported-by: default avatarJohannes Berg <johannes@sipsolutions.net>
Reviewed-by: default avatarPieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarFranky Lin <frankyl@broadcom.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 3568a0a0
......@@ -428,8 +428,6 @@ const u8 wme_fifo2ac[] = { AC_BK, AC_BE, AC_VI, AC_VO, AC_BE, AC_BE };
/* WME/802.1E Access Category to TX FIFO number */
static const u8 wme_ac2fifo[] = { 1, 0, 2, 3 };
static bool in_send_q;
/* 802.1D Priority to precedence queue mapping */
const u8 wlc_prio2prec_map[] = {
_BRCMS_PREC_BE, /* 0 BE - Best-effort */
......@@ -442,7 +440,7 @@ const u8 wlc_prio2prec_map[] = {
_BRCMS_PREC_NC, /* 7 NC - Network Control */
};
static u16 xmtfifo_sz[][NFIFO] = {
static const u16 xmtfifo_sz[][NFIFO] = {
/* corerev 20: 5120, 49152, 49152, 5376, 4352, 1280 */
{20, 192, 192, 21, 17, 5},
/* corerev 21: 2304, 14848, 5632, 3584, 3584, 1280 */
......@@ -7716,11 +7714,6 @@ void brcms_c_send_q(struct brcms_c_info *wlc)
struct pktq *q = &qi->q;
struct ieee80211_tx_info *tx_info;
if (in_send_q)
return;
else
in_send_q = true;
prec_map = wlc->tx_prec_map;
/* Send all the enq'd pkts that we can.
......@@ -7752,8 +7745,6 @@ void brcms_c_send_q(struct brcms_c_info *wlc)
prec_map = wlc->tx_prec_map;
}
}
in_send_q = false;
}
void
......
......@@ -359,7 +359,7 @@ struct brcms_hardware {
u16 chanspec; /* bmac chanspec shadow */
uint *txavail[NFIFO]; /* # tx descriptors available */
u16 *xmtfifo_sz; /* fifo size in 256B for each xmt fifo */
const u16 *xmtfifo_sz; /* fifo size in 256B for each xmt fifo */
u32 pllreq; /* pll requests to keep PLL on */
......
......@@ -80,7 +80,7 @@ struct otp_fn_s {
struct otpinfo {
uint ccrev; /* chipc revision */
struct otp_fn_s *fn; /* OTP functions */
const struct otp_fn_s *fn; /* OTP functions */
struct si_pub *sih; /* Saved sb handle */
/* IPX OTP section */
......@@ -442,7 +442,7 @@ static int ipxotp_nvread(struct otpinfo *oi, char *data, uint *len)
return -ENOTSUPP;
}
static struct otp_fn_s ipxotp_fn = {
static const struct otp_fn_s ipxotp_fn = {
(int (*)(struct otpinfo *)) ipxotp_size,
(u16 (*)(struct otpinfo *, struct chipcregs *, uint)) ipxotp_read_bit,
......
......@@ -27,7 +27,6 @@ extern const struct brcms_c_rateset cck_ofdm_rates;
extern const struct brcms_c_rateset ofdm_rates;
extern const struct brcms_c_rateset cck_rates;
extern const struct brcms_c_rateset gphy_legacy_rates;
extern const struct brcms_c_rateset wlc_lrs_rates;
extern const struct brcms_c_rateset rate_limit_1_2;
struct brcms_mcs_info {
......
......@@ -778,7 +778,9 @@ static const struct brcms_sromvar perpath_pci_sromvars[] = {
{NULL, 0, 0, 0, 0}
};
static u8 srom_crc8_table[CRC8_TABLE_SIZE];
/* crc table has the same contents for every device instance, so it can be
* shared between devices. */
static u8 brcms_srom_crc8_table[CRC8_TABLE_SIZE];
static u16 *srom_window_address(struct si_pub *sih, u8 *curmap)
{
......@@ -1052,8 +1054,9 @@ sprom_read_pci(struct si_pub *sih, u16 *sprom, uint wordoff,
/* fixup the endianness so crc8 will pass */
htol16_buf(buf, nwords * 2);
if (crc8(srom_crc8_table, (u8 *) buf, nwords * 2,
CRC8_INIT_VALUE) != CRC8_GOOD_VALUE(srom_crc8_table))
if (crc8(brcms_srom_crc8_table, (u8 *) buf, nwords * 2,
CRC8_INIT_VALUE) !=
CRC8_GOOD_VALUE(brcms_srom_crc8_table))
/* DBG only pci always read srom4 first, then srom8/9 */
err = -EIO;
......@@ -1089,8 +1092,8 @@ static int otp_read_pci(struct si_pub *sih, u16 *buf, uint bufsz)
/* fixup the endianness so crc8 will pass */
htol16_buf(buf, bufsz);
if (crc8(srom_crc8_table, (u8 *) buf, SROM4_WORDS * 2,
CRC8_INIT_VALUE) != CRC8_GOOD_VALUE(srom_crc8_table))
if (crc8(brcms_srom_crc8_table, (u8 *) buf, SROM4_WORDS * 2,
CRC8_INIT_VALUE) != CRC8_GOOD_VALUE(brcms_srom_crc8_table))
err = -EIO;
/* now correct the endianness of the byte array */
......@@ -1147,7 +1150,7 @@ static int initvars_srom_pci(struct si_pub *sih, void *curmap, char **vars,
sromwindow = srom_window_address(sih, curmap);
crc8_populate_lsb(srom_crc8_table, SROM_CRC8_POLY);
crc8_populate_lsb(brcms_srom_crc8_table, SROM_CRC8_POLY);
if (ai_is_sprom_available(sih)) {
err = sprom_read_pci(sih, sromwindow, 0, srom, SROM_WORDS,
true);
......
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