staging: r8188eu: merge odm_types.h into other headers
authorMichael Straube <straube.linux@gmail.com>
Sun, 2 Oct 2022 07:48:23 +0000 (09:48 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 20 Oct 2022 15:19:37 +0000 (17:19 +0200)
The macros SET_TX_DESC_ANTSEL_{A,B,C}_88E are used in odm_RTL8188E.c.
Move them from odm_types.h to odm_RTL8188E.h.

ODM_CE is used in places where also ODM_ITRF_USB is used in the code.
Move the ODM_CE define to the header that defines ODM_ITRF_USB. While
at it remove an extra space between '#' and 'define ODM_ITRF_USB'.

The haeder odm_types.h is now empty and we can remove it.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20221002074827.8566-2-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/include/odm.h
drivers/staging/r8188eu/include/odm_RTL8188E.h
drivers/staging/r8188eu/include/odm_types.h [deleted file]
drivers/staging/r8188eu/include/rtl8188e_hal.h

index f131e17167bfb7fe1b52fa84a67c0d57ba2e3b0e..89b01dd614ba9fe1a64e5e610473a659bc218208 100644 (file)
@@ -119,7 +119,8 @@ enum odm_ability_def {
        ODM_BB_PWR_TRA                  = BIT(8),
 };
 
-# define ODM_ITRF_USB 0x2
+#define ODM_ITRF_USB   0x2
+#define ODM_CE         0x04
 
 /*  ODM_CMNINFO_WM_MODE */
 enum odm_wireless_mode {
index 3c6471f1a893f65ba3d3105e1e1b4de861b48740..4f16af24859138a0b2c0892c4cc4b1ce87968910 100644 (file)
 #define        MAIN_ANT_CGCS_RX        0
 #define        AUX_ANT_CGCS_RX 1
 
+#define SET_TX_DESC_ANTSEL_A_88E(__ptxdesc, __value)                   \
+       le32p_replace_bits((__le32 *)(__ptxdesc + 8), __value, BIT(24))
+#define SET_TX_DESC_ANTSEL_B_88E(__ptxdesc, __value)                   \
+       le32p_replace_bits((__le32 *)(__ptxdesc + 8), __value, BIT(25))
+#define SET_TX_DESC_ANTSEL_C_88E(__ptxdesc, __value)                   \
+       le32p_replace_bits((__le32 *)(__ptxdesc + 28), __value, BIT(29))
+
 void ODM_AntennaDiversityInit_88E(struct odm_dm_struct *pDM_Odm);
 
 void ODM_AntennaDiversity_88E(struct odm_dm_struct *pDM_Odm);
diff --git a/drivers/staging/r8188eu/include/odm_types.h b/drivers/staging/r8188eu/include/odm_types.h
deleted file mode 100644 (file)
index 76302df..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
-/* Copyright(c) 2007 - 2011 Realtek Corporation. */
-
-#ifndef __ODM_TYPES_H__
-#define __ODM_TYPES_H__
-
-#define        ODM_CE                  0x04    /* BIT(2) */
-
-#define SET_TX_DESC_ANTSEL_A_88E(__ptxdesc, __value)                   \
-       le32p_replace_bits((__le32 *)(__ptxdesc + 8), __value, BIT(24))
-#define SET_TX_DESC_ANTSEL_B_88E(__ptxdesc, __value)                   \
-       le32p_replace_bits((__le32 *)(__ptxdesc + 8), __value, BIT(25))
-#define SET_TX_DESC_ANTSEL_C_88E(__ptxdesc, __value)                   \
-       le32p_replace_bits((__le32 *)(__ptxdesc + 28), __value, BIT(29))
-
-#endif /*  __ODM_TYPES_H__ */
index ed4091e7cc7e6c0a21f0ebbe49ef6f8e03397a7a..a1e88e6d5c0c7116bd50041ef38475e800b94661 100644 (file)
@@ -14,7 +14,6 @@
 #include "rtl8188e_xmit.h"
 #include "rtl8188e_cmd.h"
 #include "rtw_efuse.h"
-#include "odm_types.h"
 #include "odm.h"
 #include "odm_HWConfig.h"
 #include "odm_RegDefine11N.h"