提交 13311b00 编写于 作者: L Luis R. Rodriguez 提交者: John W. Linville

ath5k: use bit shift operators for cache line size

This matches ath9k, providing consistency when reading both drivers.
Signed-off-by: NLuis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 aeb63cfd
...@@ -471,7 +471,7 @@ ath5k_pci_probe(struct pci_dev *pdev, ...@@ -471,7 +471,7 @@ ath5k_pci_probe(struct pci_dev *pdev,
* DMA to work so force a reasonable value here if it * DMA to work so force a reasonable value here if it
* comes up zero. * comes up zero.
*/ */
csz = L1_CACHE_BYTES / sizeof(u32); csz = L1_CACHE_BYTES >> 2;
pci_write_config_byte(pdev, PCI_CACHE_LINE_SIZE, csz); pci_write_config_byte(pdev, PCI_CACHE_LINE_SIZE, csz);
} }
/* /*
...@@ -544,7 +544,7 @@ ath5k_pci_probe(struct pci_dev *pdev, ...@@ -544,7 +544,7 @@ ath5k_pci_probe(struct pci_dev *pdev,
__set_bit(ATH_STAT_INVALID, sc->status); __set_bit(ATH_STAT_INVALID, sc->status);
sc->iobase = mem; /* So we can unmap it on detach */ 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->opmode = NL80211_IFTYPE_STATION;
sc->bintval = 1000; sc->bintval = 1000;
mutex_init(&sc->lock); mutex_init(&sc->lock);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册