staging: r8188eu: move local definitions into rtw_fw.h
authorMartin Kaiser <martin@kaiser.cx>
Sun, 6 Feb 2022 16:18:01 +0000 (17:18 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 8 Feb 2022 09:29:02 +0000 (10:29 +0100)
Move some defines and the definition of struct rt_firmware_hdr
from rtw_fw.h to rtw_fw.c. These definitions are used only by
the fw layer.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220206161809.423031-7-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/core/rtw_fw.c
drivers/staging/r8188eu/include/rtw_fw.h

index fa29d47bf165bf3ff40d8c1508b806441e31056a..f591b091b8af91e945980194811156f85f8e6c93 100644 (file)
@@ -4,6 +4,51 @@
 #include <linux/firmware.h>
 #include "../include/rtw_fw.h"
 
+#define MAX_REG_BOLCK_SIZE     196
+#define FW_8188E_START_ADDRESS 0x1000
+#define MAX_PAGE_SIZE          4096
+
+#define IS_FW_HEADER_EXIST(_fwhdr)                             \
+       ((le16_to_cpu(_fwhdr->Signature) & 0xFFF0) == 0x92C0 || \
+       (le16_to_cpu(_fwhdr->Signature) & 0xFFF0) == 0x88C0 ||  \
+       (le16_to_cpu(_fwhdr->Signature) & 0xFFF0) == 0x2300 ||  \
+       (le16_to_cpu(_fwhdr->Signature) & 0xFFF0) == 0x88E0)
+
+/*  This structure must be careful with byte-ordering */
+
+struct rt_firmware_hdr {
+       /*  8-byte alinment required */
+       /*  LONG WORD 0 ---- */
+       __le16          Signature;      /* 92C0: test chip; 92C,
+                                        * 88C0: test chip; 88C1: MP A-cut;
+                                        * 92C1: MP A-cut */
+       u8              Category;       /*  AP/NIC and USB/PCI */
+       u8              Function;       /*  Reserved for different FW function
+                                        *  indcation, for further use when
+                                        *  driver needs to download different
+                                        *  FW for different conditions */
+       __le16          Version;        /*  FW Version */
+       u8              Subversion;     /*  FW Subversion, default 0x00 */
+       u16             Rsvd1;
+
+       /*  LONG WORD 1 ---- */
+       u8              Month;  /*  Release time Month field */
+       u8              Date;   /*  Release time Date field */
+       u8              Hour;   /*  Release time Hour field */
+       u8              Minute; /*  Release time Minute field */
+       __le16          RamCodeSize;    /*  The size of RAM code */
+       u8              Foundry;
+       u8              Rsvd2;
+
+       /*  LONG WORD 2 ---- */
+       __le32          SvnIdx; /*  The SVN entry index */
+       u32             Rsvd3;
+
+       /*  LONG WORD 3 ---- */
+       u32             Rsvd4;
+       u32             Rsvd5;
+};
+
 static void fw_download_enable(struct adapter *padapter, bool enable)
 {
        u8 tmp;
index 2ee9ae70a468cc291f25ff6ae51519b8f1218092..c4b1a8370b4ac194a692963ae9d06a7676c1473e 100644 (file)
@@ -6,51 +6,6 @@
 
 #include "drv_types.h"
 
-#define MAX_REG_BOLCK_SIZE     196
-#define FW_8188E_START_ADDRESS 0x1000
-#define MAX_PAGE_SIZE          4096
-
-#define IS_FW_HEADER_EXIST(_fwhdr)                             \
-       ((le16_to_cpu(_fwhdr->Signature) & 0xFFF0) == 0x92C0 || \
-       (le16_to_cpu(_fwhdr->Signature) & 0xFFF0) == 0x88C0 ||  \
-       (le16_to_cpu(_fwhdr->Signature) & 0xFFF0) == 0x2300 ||  \
-       (le16_to_cpu(_fwhdr->Signature) & 0xFFF0) == 0x88E0)
-
-/*  This structure must be careful with byte-ordering */
-
-struct rt_firmware_hdr {
-       /*  8-byte alinment required */
-       /*  LONG WORD 0 ---- */
-       __le16          Signature;      /* 92C0: test chip; 92C,
-                                        * 88C0: test chip; 88C1: MP A-cut;
-                                        * 92C1: MP A-cut */
-       u8              Category;       /*  AP/NIC and USB/PCI */
-       u8              Function;       /*  Reserved for different FW function
-                                        *  indcation, for further use when
-                                        *  driver needs to download different
-                                        *  FW for different conditions */
-       __le16          Version;        /*  FW Version */
-       u8              Subversion;     /*  FW Subversion, default 0x00 */
-       u16             Rsvd1;
-
-       /*  LONG WORD 1 ---- */
-       u8              Month;  /*  Release time Month field */
-       u8              Date;   /*  Release time Date field */
-       u8              Hour;   /*  Release time Hour field */
-       u8              Minute; /*  Release time Minute field */
-       __le16          RamCodeSize;    /*  The size of RAM code */
-       u8              Foundry;
-       u8              Rsvd2;
-
-       /*  LONG WORD 2 ---- */
-       __le32          SvnIdx; /*  The SVN entry index */
-       u32             Rsvd3;
-
-       /*  LONG WORD 3 ---- */
-       u32             Rsvd4;
-       u32             Rsvd5;
-};
-
 int rtl8188e_firmware_download(struct adapter *padapter);
 void rtw_reset_8051(struct adapter *padapter);