diff options
author | Maya Erez <qca_merez@qca.qualcomm.com> | 2017-05-19 11:54:10 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2017-05-23 18:29:45 +0300 |
commit | d86d47164b227f01c3ec34c3f5a1613977d563eb (patch) | |
tree | a32b387d19b27a495911e8db8f47abafc1a7ff48 /drivers/net/wireless/ath/wil6210/ioctl.c | |
parent | 646d402d9f8f5669b3ddc6fbec5f55288777704b (diff) | |
download | linux-d86d47164b227f01c3ec34c3f5a1613977d563eb.tar.xz |
wil6210: support devices with different PCIe bar size
wil6210 devices can have different PCIe bar size, hence get the
bar size from PCIe device instead of using a constant bar size.
Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/wil6210/ioctl.c')
-rw-r--r-- | drivers/net/wireless/ath/wil6210/ioctl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/wil6210/ioctl.c b/drivers/net/wireless/ath/wil6210/ioctl.c index 630380078236..1c49ad8f9478 100644 --- a/drivers/net/wireless/ath/wil6210/ioctl.c +++ b/drivers/net/wireless/ath/wil6210/ioctl.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 Qualcomm Atheros, Inc. + * Copyright (c) 2014,2017 Qualcomm Atheros, Inc. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -46,7 +46,7 @@ static void __iomem *wil_ioc_addr(struct wil6210_priv *wil, uint32_t addr, } off = a - wil->csr; - if (size >= WIL6210_MEM_SIZE - off) { + if (size >= wil->bar_size - off) { wil_err(wil, "Requested block does not fit into memory: " "off = 0x%08x size = 0x%08x\n", off, size); return NULL; |