forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 37f49e37ab4cb5d0bc4c60eb5c6d4dd57db767bb
kernel/drivers/staging/vt6656/desc.h
....@@ -1,4 +1,4 @@
1
-// SPDX-License-Identifier: GPL-2.0+
1
+/* SPDX-License-Identifier: GPL-2.0+ */
22 /*
33 * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
44 * All rights reserved.
....@@ -18,6 +18,7 @@
1818 #ifndef __DESC_H__
1919 #define __DESC_H__
2020
21
+#include <linux/bits.h>
2122 #include <linux/types.h>
2223 #include <linux/mm.h>
2324
....@@ -36,32 +37,32 @@
3637 /*
3738 * bits in the RSR register
3839 */
39
-#define RSR_ADDRBROAD 0x80
40
-#define RSR_ADDRMULTI 0x40
40
+#define RSR_ADDRBROAD BIT(7)
41
+#define RSR_ADDRMULTI BIT(6)
4142 #define RSR_ADDRUNI 0x00
42
-#define RSR_IVLDTYP 0x20 /* invalid packet type */
43
-#define RSR_IVLDLEN 0x10 /* invalid len (> 2312 byte) */
44
-#define RSR_BSSIDOK 0x08
45
-#define RSR_CRCOK 0x04
46
-#define RSR_BCNSSIDOK 0x02
47
-#define RSR_ADDROK 0x01
43
+#define RSR_IVLDTYP BIT(5) /* invalid packet type */
44
+#define RSR_IVLDLEN BIT(4) /* invalid len (> 2312 byte) */
45
+#define RSR_BSSIDOK BIT(3)
46
+#define RSR_CRCOK BIT(2)
47
+#define RSR_BCNSSIDOK BIT(1)
48
+#define RSR_ADDROK BIT(0)
4849
4950 /*
5051 * bits in the new RSR register
5152 */
52
-#define NEWRSR_DECRYPTOK 0x10
53
-#define NEWRSR_CFPIND 0x08
54
-#define NEWRSR_HWUTSF 0x04
55
-#define NEWRSR_BCNHITAID 0x02
56
-#define NEWRSR_BCNHITAID0 0x01
53
+#define NEWRSR_DECRYPTOK BIT(4)
54
+#define NEWRSR_CFPIND BIT(3)
55
+#define NEWRSR_HWUTSF BIT(2)
56
+#define NEWRSR_BCNHITAID BIT(1)
57
+#define NEWRSR_BCNHITAID0 BIT(0)
5758
5859 /*
5960 * bits in the TSR register
6061 */
61
-#define TSR_RETRYTMO 0x08
62
-#define TSR_TMO 0x04
63
-#define TSR_ACKDATA 0x02
64
-#define TSR_VALID 0x01
62
+#define TSR_RETRYTMO BIT(3)
63
+#define TSR_TMO BIT(2)
64
+#define TSR_ACKDATA BIT(1)
65
+#define TSR_VALID BIT(0)
6566
6667 #define FIFOCTL_AUTO_FB_1 0x1000
6768 #define FIFOCTL_AUTO_FB_0 0x0800