summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ti/wl18xx
diff options
context:
space:
mode:
authorArik Nemtsov <arik@wizery.com>2012-05-10 13:13:23 +0400
committerLuciano Coelho <coelho@ti.com>2012-06-05 16:55:08 +0400
commit9c809f888370d87129d17028d515bb025fe94175 (patch)
tree970f46342b06c29ee63684ee2d605527e7bd42e3 /drivers/net/wireless/ti/wl18xx
parent7cfefd1f2acbd5ff2a1a8846de058064bd63550a (diff)
downloadlinux-9c809f888370d87129d17028d515bb025fe94175.tar.xz
wl18xx: implement hw op for getting rx buffer data alignment
Implement the HW op for getting alignment state in wl18xx. The FW aligns the Rx Ethernet payload data. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net/wireless/ti/wl18xx')
-rw-r--r--drivers/net/wireless/ti/wl18xx/main.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/net/wireless/ti/wl18xx/main.c b/drivers/net/wireless/ti/wl18xx/main.c
index a074d811fef0..fef872608e00 100644
--- a/drivers/net/wireless/ti/wl18xx/main.c
+++ b/drivers/net/wireless/ti/wl18xx/main.c
@@ -27,6 +27,8 @@
#include "../wlcore/io.h"
#include "../wlcore/acx.h"
#include "../wlcore/tx.h"
+#include "../wlcore/rx.h"
+#include "../wlcore/io.h"
#include "../wlcore/boot.h"
#include "reg.h"
@@ -447,6 +449,16 @@ wl18xx_set_tx_desc_data_len(struct wl1271 *wl, struct wl1271_tx_hw_descr *desc,
desc->wl18xx_mem.total_mem_blocks);
}
+static enum wl_rx_buf_align
+wl18xx_get_rx_buf_align(struct wl1271 *wl, u32 rx_desc)
+{
+ if (rx_desc & RX_BUF_PADDED_PAYLOAD)
+ return WLCORE_RX_BUF_PADDED;
+
+ return WLCORE_RX_BUF_ALIGNED;
+}
+
+
static struct wlcore_ops wl18xx_ops = {
.identify_chip = wl18xx_identify_chip,
.boot = wl18xx_boot,
@@ -455,6 +467,7 @@ static struct wlcore_ops wl18xx_ops = {
.calc_tx_blocks = wl18xx_calc_tx_blocks,
.set_tx_desc_blocks = wl18xx_set_tx_desc_blocks,
.set_tx_desc_data_len = wl18xx_set_tx_desc_data_len,
+ .get_rx_buf_align = wl18xx_get_rx_buf_align,
};
int __devinit wl18xx_probe(struct platform_device *pdev)