From: Maya Erez <qca_merez@qca.qualcomm.com>
To: Kalle Valo <kvalo@codeaurora.org>
Cc: Lazar Alexei <QCA_ailizaro@QCA.qualcomm.com>,
linux-wireless@vger.kernel.org, wil6210@qca.qualcomm.com,
Maya Erez <qca_merez@qca.qualcomm.com>
Subject: [PATCH v2 6/9] wil6210: add support for headroom configuration
Date: Thu, 14 Dec 2017 18:53:10 +0200 [thread overview]
Message-ID: <1513270393-919-7-git-send-email-qca_merez@qca.qualcomm.com> (raw)
In-Reply-To: <1513270393-919-1-git-send-email-qca_merez@qca.qualcomm.com>
From: Lazar Alexei <qca_ailizaro@qca.qualcomm.com>
Add module parameter for configuring the headroom size
in the skb allocation.
Signed-off-by: Lazar Alexei <qca_ailizaro@qca.qualcomm.com>
Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
---
drivers/net/wireless/ath/wil6210/txrx.c | 28 +++++++++++++++++++++++++++-
1 file changed, 27 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/wil6210/txrx.c b/drivers/net/wireless/ath/wil6210/txrx.c
index 62c04f0..89967ce 100644
--- a/drivers/net/wireless/ath/wil6210/txrx.c
+++ b/drivers/net/wireless/ath/wil6210/txrx.c
@@ -41,6 +41,32 @@
module_param(rx_large_buf, bool, 0444);
MODULE_PARM_DESC(rx_large_buf, " allocate 8KB RX buffers, default - no");
+#define WIL6210_MAX_HEADROOM_SIZE (256)
+
+static ushort headroom_size; /* = 0; */
+static int headroom_size_set(const char *val, const struct kernel_param *kp)
+{
+ int ret;
+
+ ret = param_set_uint(val, kp);
+ if (ret)
+ return ret;
+
+ if (headroom_size > WIL6210_MAX_HEADROOM_SIZE)
+ return -EINVAL;
+
+ return 0;
+}
+
+static const struct kernel_param_ops headroom_ops = {
+ .set = headroom_size_set,
+ .get = param_get_ushort,
+};
+
+module_param_cb(headroom_size, &headroom_ops, &headroom_size, 0644);
+MODULE_PARM_DESC(headroom_size,
+ " headroom size for rx skb allocation, default - 0");
+
static inline uint wil_rx_snaplen(void)
{
return rx_align_2 ? 6 : 0;
@@ -630,7 +656,7 @@ static int wil_rx_refill(struct wil6210_priv *wil, int count)
u32 next_tail;
int rc = 0;
int headroom = ndev->type == ARPHRD_IEEE80211_RADIOTAP ?
- WIL6210_RTAP_SIZE : 0;
+ WIL6210_RTAP_SIZE : headroom_size;
for (; next_tail = wil_vring_next_tail(v),
(next_tail != v->swhead) && (count-- > 0);
--
1.9.1
next prev parent reply other threads:[~2017-12-14 16:53 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-14 16:53 [PATCH v2 0/9] wil6210 patches Maya Erez
2017-12-14 16:53 ` [PATCH v2 1/9] wil6210: support Scheduled scan Maya Erez
2018-01-09 8:04 ` [v2,1/9] " Kalle Valo
2017-12-14 16:53 ` [PATCH v2 2/9] wil6210: support 40bit DMA addresses Maya Erez
2017-12-14 16:53 ` [PATCH v2 3/9] wil6210: add platform capabilities bitmap Maya Erez
2017-12-14 16:53 ` [PATCH v2 4/9] wil6210: set platform features based on FW capabilities Maya Erez
2017-12-14 16:53 ` [PATCH v2 5/9] wil6210: prevent parallel suspend and dump collection Maya Erez
2017-12-14 16:53 ` Maya Erez [this message]
2018-01-09 8:07 ` [v2,6/9] wil6210: add support for headroom configuration Kalle Valo
2018-01-15 13:18 ` merez
2018-01-17 10:11 ` Julian Calaby
2018-01-17 11:47 ` Kalle Valo
2017-12-14 16:53 ` [PATCH v2 7/9] wil6210: configurable broadcast TX MCS Maya Erez
2018-01-09 8:09 ` [v2,7/9] " Kalle Valo
2017-12-14 16:53 ` [PATCH v2 8/9] wil6210: remove leftover "FIXME"s Maya Erez
2017-12-14 16:53 ` [PATCH v2 9/9] wil6210: remove reference to preset_chandef Maya Erez
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=1513270393-919-7-git-send-email-qca_merez@qca.qualcomm.com \
--to=qca_merez@qca.qualcomm.com \
--cc=QCA_ailizaro@QCA.qualcomm.com \
--cc=kvalo@codeaurora.org \
--cc=linux-wireless@vger.kernel.org \
--cc=wil6210@qca.qualcomm.com \
/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).