summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ti/wlcore/hw_ops.h
diff options
context:
space:
mode:
authorArik Nemtsov2011-12-12 10:41:44 +0100
committerLuciano Coelho2012-04-12 07:43:59 +0200
commitb3b4b4b812018a06221b6d7b88a5540fccae2940 (patch)
treea7019677c6d169562e809de5c34815a65fc334e5 /drivers/net/wireless/ti/wlcore/hw_ops.h
parentwlcore/wl12xx: change GEM Tx-spare blocks per-vif (diff)
downloadkernel-qcow2-linux-b3b4b4b812018a06221b6d7b88a5540fccae2940.tar.gz
kernel-qcow2-linux-b3b4b4b812018a06221b6d7b88a5540fccae2940.tar.xz
kernel-qcow2-linux-b3b4b4b812018a06221b6d7b88a5540fccae2940.zip
wlcore/wl12xx: add hw op for calculating hw block count per packet
Each chip family has a different block size and calculates the total number of HW blocks differently, with respect to alignment. 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.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/drivers/net/wireless/ti/wlcore/hw_ops.h b/drivers/net/wireless/ti/wlcore/hw_ops.h
new file mode 100644
index 000000000000..5a9a3c9b4759
--- /dev/null
+++ b/drivers/net/wireless/ti/wlcore/hw_ops.h
@@ -0,0 +1,36 @@
+/*
+ * This file is part of wlcore
+ *
+ * Copyright (C) 2011 Texas Instruments Inc.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#ifndef __WLCORE_HW_OPS_H__
+#define __WLCORE_HW_OPS_H__
+
+#include "wlcore.h"
+
+static inline u32
+wlcore_hw_calc_tx_blocks(struct wl1271 *wl, u32 len, u32 spare_blks)
+{
+ if (!wl->ops->calc_tx_blocks)
+ BUG_ON(1);
+
+ return wl->ops->calc_tx_blocks(wl, len, spare_blks);
+}
+
+#endif