* [PATCH 0/3] staging: r8188eu: move firmware related macros to rtw_fw.h
@ 2022-01-07 14:36 Michael Straube
2022-01-07 14:36 ` [PATCH 1/3] staging: r8188eu: rename _pFwHdr in IS_FW_HEADER_EXIST Michael Straube
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Michael Straube @ 2022-01-07 14:36 UTC (permalink / raw)
To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube
This series moves firmware related macros from rtl8188e_hal.h to rtw_fw.h.
I missed these when I moved the firmware code into its own file.
Please apply this series on top of the series
"staging: r8188eu: move firmware loading out of the hal layer".
Thanks,
Michael
Michael Straube (3):
staging: r8188eu: rename _pFwHdr in IS_FW_HEADER_EXIST
staging: r8188eu: add spaces around & operator in IS_FW_HEADER_EXIST
staging: r8188eu: move firmware related macros to rtw_fw.h
drivers/staging/r8188eu/include/rtl8188e_hal.h | 11 -----------
drivers/staging/r8188eu/include/rtw_fw.h | 10 +++++++++-
2 files changed, 9 insertions(+), 12 deletions(-)
--
2.34.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/3] staging: r8188eu: rename _pFwHdr in IS_FW_HEADER_EXIST
2022-01-07 14:36 [PATCH 0/3] staging: r8188eu: move firmware related macros to rtw_fw.h Michael Straube
@ 2022-01-07 14:36 ` Michael Straube
2022-01-07 14:36 ` [PATCH 2/3] staging: r8188eu: add spaces around & operator " Michael Straube
2022-01-07 14:36 ` [PATCH 3/3] staging: r8188eu: move firmware related macros to rtw_fw.h Michael Straube
2 siblings, 0 replies; 4+ messages in thread
From: Michael Straube @ 2022-01-07 14:36 UTC (permalink / raw)
To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube
Rename _pFwHdr in the macro IS_FW_HEADER_EXIST to avoid camel case.
_pFwHdr -> _fwhdr
Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
drivers/staging/r8188eu/include/rtl8188e_hal.h | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/r8188eu/include/rtl8188e_hal.h b/drivers/staging/r8188eu/include/rtl8188e_hal.h
index c614faf188bb..d8892acad224 100644
--- a/drivers/staging/r8188eu/include/rtl8188e_hal.h
+++ b/drivers/staging/r8188eu/include/rtl8188e_hal.h
@@ -39,11 +39,11 @@
#define MAX_PAGE_SIZE 4096 /* @ page : 4k bytes */
-#define IS_FW_HEADER_EXIST(_pFwHdr) \
- ((le16_to_cpu(_pFwHdr->Signature)&0xFFF0) == 0x92C0 || \
- (le16_to_cpu(_pFwHdr->Signature)&0xFFF0) == 0x88C0 || \
- (le16_to_cpu(_pFwHdr->Signature)&0xFFF0) == 0x2300 || \
- (le16_to_cpu(_pFwHdr->Signature)&0xFFF0) == 0x88E0)
+#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 */
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/3] staging: r8188eu: add spaces around & operator in IS_FW_HEADER_EXIST
2022-01-07 14:36 [PATCH 0/3] staging: r8188eu: move firmware related macros to rtw_fw.h Michael Straube
2022-01-07 14:36 ` [PATCH 1/3] staging: r8188eu: rename _pFwHdr in IS_FW_HEADER_EXIST Michael Straube
@ 2022-01-07 14:36 ` Michael Straube
2022-01-07 14:36 ` [PATCH 3/3] staging: r8188eu: move firmware related macros to rtw_fw.h Michael Straube
2 siblings, 0 replies; 4+ messages in thread
From: Michael Straube @ 2022-01-07 14:36 UTC (permalink / raw)
To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube
Add spaces around & operator in the macro IS_FW_HEADER_EXIST to
improve readability and follow kernel coding style.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
drivers/staging/r8188eu/include/rtl8188e_hal.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/r8188eu/include/rtl8188e_hal.h b/drivers/staging/r8188eu/include/rtl8188e_hal.h
index d8892acad224..dad2aa473a1c 100644
--- a/drivers/staging/r8188eu/include/rtl8188e_hal.h
+++ b/drivers/staging/r8188eu/include/rtl8188e_hal.h
@@ -40,10 +40,10 @@
#define MAX_PAGE_SIZE 4096 /* @ page : 4k bytes */
#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)
+ ((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 */
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 3/3] staging: r8188eu: move firmware related macros to rtw_fw.h
2022-01-07 14:36 [PATCH 0/3] staging: r8188eu: move firmware related macros to rtw_fw.h Michael Straube
2022-01-07 14:36 ` [PATCH 1/3] staging: r8188eu: rename _pFwHdr in IS_FW_HEADER_EXIST Michael Straube
2022-01-07 14:36 ` [PATCH 2/3] staging: r8188eu: add spaces around & operator " Michael Straube
@ 2022-01-07 14:36 ` Michael Straube
2 siblings, 0 replies; 4+ messages in thread
From: Michael Straube @ 2022-01-07 14:36 UTC (permalink / raw)
To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube
Move firmware related macros from rtl8188e_hal.h to rtw_fw.h.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
drivers/staging/r8188eu/include/rtl8188e_hal.h | 11 -----------
drivers/staging/r8188eu/include/rtw_fw.h | 10 +++++++++-
2 files changed, 9 insertions(+), 12 deletions(-)
diff --git a/drivers/staging/r8188eu/include/rtl8188e_hal.h b/drivers/staging/r8188eu/include/rtl8188e_hal.h
index dad2aa473a1c..d9e944a83940 100644
--- a/drivers/staging/r8188eu/include/rtl8188e_hal.h
+++ b/drivers/staging/r8188eu/include/rtl8188e_hal.h
@@ -34,17 +34,6 @@
#define DRVINFO_SZ 4 /* unit is 8bytes */
#define PageNum_128(_Len) (u32)(((_Len)>>7) + ((_Len) & 0x7F ? 1 : 0))
-/* download firmware related data structure */
-#define FW_8188E_START_ADDRESS 0x1000
-
-#define MAX_PAGE_SIZE 4096 /* @ page : 4k bytes */
-
-#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 {
diff --git a/drivers/staging/r8188eu/include/rtw_fw.h b/drivers/staging/r8188eu/include/rtw_fw.h
index 749157704251..9b7492ef0199 100644
--- a/drivers/staging/r8188eu/include/rtw_fw.h
+++ b/drivers/staging/r8188eu/include/rtw_fw.h
@@ -6,7 +6,15 @@
#include "drv_types.h"
-#define MAX_REG_BOLCK_SIZE 196
+#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)
int rtl8188e_firmware_download(struct adapter *padapter);
void rtw_reset_8051(struct adapter *padapter);
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-01-07 14:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-07 14:36 [PATCH 0/3] staging: r8188eu: move firmware related macros to rtw_fw.h Michael Straube
2022-01-07 14:36 ` [PATCH 1/3] staging: r8188eu: rename _pFwHdr in IS_FW_HEADER_EXIST Michael Straube
2022-01-07 14:36 ` [PATCH 2/3] staging: r8188eu: add spaces around & operator " Michael Straube
2022-01-07 14:36 ` [PATCH 3/3] staging: r8188eu: move firmware related macros to rtw_fw.h Michael Straube
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.