Search Linux Wireless

[PATCH 9/9] wil6210: Align Rx buffers on 4*n+2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



For the normal (non-sniffer) mode of operation, align Rx buffer
on 4*n+2, so IP header (after 14 bytes of Ethernet header)
will start dword aligned. This accelerated IP stack a little bit.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@xxxxxxxxxxxxxxxx>
---
 drivers/net/wireless/ath/wil6210/txrx.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/wil6210/txrx.c b/drivers/net/wireless/ath/wil6210/txrx.c
index 7f2f560..e1587b3 100644
--- a/drivers/net/wireless/ath/wil6210/txrx.c
+++ b/drivers/net/wireless/ath/wil6210/txrx.c
@@ -468,8 +468,11 @@ static int wil_rx_refill(struct wil6210_priv *wil, int count)
 	struct vring *v = &wil->vring_rx;
 	u32 next_tail;
 	int rc = 0;
+	/* 2 bytes headroom in normal operation mode to achieve dword
+	 * alignment for the IP header
+	 */
 	int headroom = ndev->type == ARPHRD_IEEE80211_RADIOTAP ?
-			WIL6210_RTAP_SIZE : 0;
+			WIL6210_RTAP_SIZE : 2;
 
 	for (; next_tail = wil_vring_next_tail(v),
 			(next_tail != v->swhead) && (count-- > 0);
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux