ath5k: use bit shift operators for cache line size
authorLuis R. Rodriguez <lrodriguez@atheros.com>
Wed, 12 Aug 2009 16:57:01 +0000 (09:57 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 14 Aug 2009 13:14:06 +0000 (09:14 -0400)
This matches ath9k, providing consistency when reading both drivers.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath5k/base.c

index 63c2b5714d2fd6c0897cc1408d75a13cc8160bef..2b3cf39dd4b1e539f2bfed94ae1ff4d8078d5b82 100644 (file)
@@ -471,7 +471,7 @@ ath5k_pci_probe(struct pci_dev *pdev,
                 * DMA to work so force a reasonable value here if it
                 * comes up zero.
                 */
-               csz = L1_CACHE_BYTES / sizeof(u32);
+               csz = L1_CACHE_BYTES >> 2;
                pci_write_config_byte(pdev, PCI_CACHE_LINE_SIZE, csz);
        }
        /*
@@ -544,7 +544,7 @@ ath5k_pci_probe(struct pci_dev *pdev,
        __set_bit(ATH_STAT_INVALID, sc->status);
 
        sc->iobase = mem; /* So we can unmap it on detach */
-       sc->common.cachelsz = csz * sizeof(u32); /* convert to bytes */
+       sc->common.cachelsz = csz << 2; /* convert to bytes */
        sc->opmode = NL80211_IFTYPE_STATION;
        sc->bintval = 1000;
        mutex_init(&sc->lock);