diff options
author | Lazar Alexei <qca_ailizaro@qca.qualcomm.com> | 2017-12-14 19:53:06 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2018-01-09 11:03:08 +0300 |
commit | 3dc2c13b5238cef01f36b9ba72e2d1b01862381c (patch) | |
tree | 55ec18cddc1baf93ce434bf7d1bc33ff05f2fd7c /drivers/net/wireless/ath/wil6210/pmc.c | |
parent | a5dc688392737bbab3699d63f26e853a40c52d2d (diff) | |
download | linux-3dc2c13b5238cef01f36b9ba72e2d1b01862381c.tar.xz |
wil6210: support 40bit DMA addresses
Add the option to support 40bit addresses since some platforms
may not support 48bits but support 40bits
Signed-off-by: Lazar Alexei <qca_ailizaro@qca.qualcomm.com>
Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/ath/wil6210/pmc.c')
-rw-r--r-- | drivers/net/wireless/ath/wil6210/pmc.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/net/wireless/ath/wil6210/pmc.c b/drivers/net/wireless/ath/wil6210/pmc.c index 2e301b6b32a9..4ea27b0bd278 100644 --- a/drivers/net/wireless/ath/wil6210/pmc.c +++ b/drivers/net/wireless/ath/wil6210/pmc.c @@ -111,14 +111,14 @@ void wil_pmc_alloc(struct wil6210_priv *wil, * * HW has limitation that all vrings addresses must share the same * upper 16 msb bits part of 48 bits address. To workaround that, - * if we are using 48 bit addresses switch to 32 bit allocation - * before allocating vring memory. + * if we are using more than 32 bit addresses switch to 32 bit + * allocation before allocating vring memory. * * There's no check for the return value of dma_set_mask_and_coherent, * since we assume if we were able to set the mask during * initialization in this system it will not fail if we set it again */ - if (wil->use_extended_dma_addr) + if (wil->dma_addr_size > 32) dma_set_mask_and_coherent(dev, DMA_BIT_MASK(32)); pmc->pring_va = dma_alloc_coherent(dev, @@ -126,8 +126,9 @@ void wil_pmc_alloc(struct wil6210_priv *wil, &pmc->pring_pa, GFP_KERNEL); - if (wil->use_extended_dma_addr) - dma_set_mask_and_coherent(dev, DMA_BIT_MASK(48)); + if (wil->dma_addr_size > 32) + dma_set_mask_and_coherent(dev, + DMA_BIT_MASK(wil->dma_addr_size)); wil_dbg_misc(wil, "pmc_alloc: allocated pring %p => %pad. %zd x %d = total %zd bytes\n", |