@@ -57,4 +57,16 @@ struct cordic_iq cordic_calc_iq(s32 theta);
#endif /* __CORDIC_H_ */
#endif /* LINUX_VERSION_CODE > KERNEL_VERSION(3,1,0)) */
+
+#ifndef CORDIC_FLOAT
+#define CORDIC_ANGLE_GEN 39797
+#define CORDIC_PRECISION_SHIFT 16
+#define CORDIC_NUM_ITER (CORDIC_PRECISION_SHIFT + 2)
+
+#define CORDIC_FIXED(X) ((s32)((X) << CORDIC_PRECISION_SHIFT))
+#define CORDIC_FLOAT(X) (((X) >= 0) \
+ ? ((((X) >> (CORDIC_PRECISION_SHIFT - 1)) + 1) >> 1) \
+ : -((((-(X)) >> (CORDIC_PRECISION_SHIFT - 1)) + 1) >> 1))
+#endif
+
#endif /* _BACKPORT_LINUX_CORDIC_H */
This was introduced in Linux commit 58d81d64e06f ("lib: cordic: Move cordic macros and defines to header file") and is used by the b43 and brcmsmac driver. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> --- backport/backport-include/linux/cordic.h | 12 ++++++++++++ 1 file changed, 12 insertions(+)