]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
staging: brcm80211: various global var related changes in softmac
authorRoland Vossen <rvossen@broadcom.com>
Thu, 29 Sep 2011 22:34:27 +0000 (15:34 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 3 Oct 2011 23:12:31 +0000 (16:12 -0700)
Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/brcm80211/brcmsmac/main.c
drivers/staging/brcm80211/brcmsmac/main.h
drivers/staging/brcm80211/brcmsmac/otp.c
drivers/staging/brcm80211/brcmsmac/rate.h
drivers/staging/brcm80211/brcmsmac/srom.c

index 7a14ab9b273330aef6e9bd10e883870ca2535598..e34b5119a63fb95e6ab3c3fa8c39677bcf536df5 100644 (file)
@@ -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
index 47665da8b54c61a0c2dd3e27f105f0c6b1bfc42a..c938add2c450777538814e85a33321605b7c86cc 100644 (file)
@@ -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 */
 
index 05c78c7f33c76a19d9edeb4df6ca4c743ef157bf..06cb57543239ce57334323089b5144488dd523ca 100644 (file)
@@ -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,
 
index 2cc66e04c0db6199ed3a49f735daae3b2531f363..e7b9dc2f27315a17e7776efe43080ed3098afe93 100644 (file)
@@ -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 {
index 5bf07328ceaf48a6240c6404cb02208fad3cc856..ce319593a17edd160e4a16d7d2a275b0da9fe47e 100644 (file)
@@ -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);