summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ti/wlcore/hw_ops.h
diff options
context:
space:
mode:
authorArik Nemtsov <arik@wizery.com>2011-12-12 10:11:43 (GMT)
committerLuciano Coelho <coelho@ti.com>2012-04-12 05:43:59 (GMT)
commitcd70f6a48b3fbb841a127361ee4ac0752f9d29a2 (patch)
treefebdd2ba7cafd3115837b70c028e6f39b59d9493 /drivers/net/wireless/ti/wlcore/hw_ops.h
parent5766435e2f704d0b2ec071639dcfd8f039aeb674 (diff)
downloadlinux-fsl-qoriq-cd70f6a48b3fbb841a127361ee4ac0752f9d29a2.tar.xz
wlcore/wl12xx: add hw op for getting rx buffer data alignment
An aligned data buffer is such where the Ethernet portion of the packet starts on a 4-byte boundary. Some chip families support padding the Rx data buffer to achieve such alignment, others rely on the host to perform it. Implement the HW op for getting alignment state in wl12xx. Add support for HW-padded alignment in the Rx flow. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net/wireless/ti/wlcore/hw_ops.h')
-rw-r--r--drivers/net/wireless/ti/wlcore/hw_ops.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/net/wireless/ti/wlcore/hw_ops.h b/drivers/net/wireless/ti/wlcore/hw_ops.h
index 7342f86..fe6b839 100644
--- a/drivers/net/wireless/ti/wlcore/hw_ops.h
+++ b/drivers/net/wireless/ti/wlcore/hw_ops.h
@@ -23,6 +23,7 @@
#define __WLCORE_HW_OPS_H__
#include "wlcore.h"
+#include "rx.h"
static inline u32
wlcore_hw_calc_tx_blocks(struct wl1271 *wl, u32 len, u32 spare_blks)
@@ -54,4 +55,14 @@ wlcore_hw_set_tx_desc_data_len(struct wl1271 *wl,
wl->ops->set_tx_desc_data_len(wl, desc, skb);
}
+static inline enum wl_rx_buf_align
+wlcore_hw_get_rx_buf_align(struct wl1271 *wl, u32 rx_desc)
+{
+
+ if (!wl->ops->get_rx_buf_align)
+ BUG_ON(1);
+
+ return wl->ops->get_rx_buf_align(wl, rx_desc);
+}
+
#endif