/* 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 */
_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 */
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.
prec_map = wlc->tx_prec_map;
}
}
-
- in_send_q = false;
}
void
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 */
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 */
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,
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 {
{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)
{
/* 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;
/* 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 */
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);