From: Vladimir Murzin <murzin.v@gmail.com>
To: linux-wireless@vger.kernel.org, netdev@vger.kernel.org
Cc: coelho@ti.com, linville@tuxdriver.com,
Vladimir Murzin <murzin.v@gmail.com>
Subject: [PATCH 2/3] wl12xx/wl18xx: limit base for aggregate buffer size to 4K
Date: Thu, 12 Sep 2013 17:32:22 +0200 [thread overview]
Message-ID: <1378999943-1968-3-git-send-email-murzin.v@gmail.com> (raw)
In-Reply-To: <1378999943-1968-1-git-send-email-murzin.v@gmail.com>
WL{12,18}XX_AGGR_BUFFER_SIZE is depends on PAGE_SIZE which may be more
than 4K. In this case memory might be aggressively wasted.
Use 4K size base for buffer explicitly.
Signed-off-by: Vladimir Murzin <murzin.v@gmail.com>
---
drivers/net/wireless/ti/wl12xx/wl12xx.h | 3 ++-
drivers/net/wireless/ti/wl18xx/wl18xx.h | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/ti/wl12xx/wl12xx.h b/drivers/net/wireless/ti/wl12xx/wl12xx.h
index 9e5484a..3649d40 100644
--- a/drivers/net/wireless/ti/wl12xx/wl12xx.h
+++ b/drivers/net/wireless/ti/wl12xx/wl12xx.h
@@ -56,7 +56,8 @@
#define WL128X_SUBTYPE_MR_VER WLCORE_FW_VER_IGNORE
#define WL128X_MINOR_MR_VER 42
-#define WL12XX_AGGR_BUFFER_SIZE (4 * PAGE_SIZE)
+#define WL12XX_PAGE_SIZE 4096
+#define WL12XX_AGGR_BUFFER_SIZE (4 * WL12XX_PAGE_SIZE)
#define WL12XX_NUM_TX_DESCRIPTORS 16
#define WL12XX_NUM_RX_DESCRIPTORS 8
diff --git a/drivers/net/wireless/ti/wl18xx/wl18xx.h b/drivers/net/wireless/ti/wl18xx/wl18xx.h
index 9204e07..a3214b4 100644
--- a/drivers/net/wireless/ti/wl18xx/wl18xx.h
+++ b/drivers/net/wireless/ti/wl18xx/wl18xx.h
@@ -33,7 +33,8 @@
#define WL18XX_CMD_MAX_SIZE 740
-#define WL18XX_AGGR_BUFFER_SIZE (13 * PAGE_SIZE)
+#define WL18XX_PAGE_SIZE 4096
+#define WL18XX_AGGR_BUFFER_SIZE (13 * WL18XX_PAGE_SIZE)
#define WL18XX_NUM_TX_DESCRIPTORS 32
#define WL18XX_NUM_RX_DESCRIPTORS 32
--
1.7.10.4
next prev parent reply other threads:[~2013-09-12 15:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-12 15:32 small PAGE_SIZE related fixes for wl{12,18}xx drivers Vladimir Murzin
2013-09-12 15:32 ` [PATCH 1/3] wlcore: fix frame size overflow warning in wl12xx_spi_raw_write Vladimir Murzin
2013-09-12 15:32 ` Vladimir Murzin [this message]
[not found] ` <1378999943-1968-1-git-send-email-murzin.v-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-09-12 15:32 ` [PATCH 3/3] wlcore: limit base for output buffer in dev_mem_read Vladimir Murzin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1378999943-1968-3-git-send-email-murzin.v@gmail.com \
--to=murzin.v@gmail.com \
--cc=coelho@ti.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).