.. | .. |
---|
1 | | -// SPDX-License-Identifier: GPL-2.0+ |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0+ */ |
---|
2 | 2 | /* |
---|
3 | 3 | * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc. |
---|
4 | 4 | * All rights reserved. |
---|
.. | .. |
---|
18 | 18 | #ifndef __DESC_H__ |
---|
19 | 19 | #define __DESC_H__ |
---|
20 | 20 | |
---|
| 21 | +#include <linux/bits.h> |
---|
21 | 22 | #include <linux/types.h> |
---|
22 | 23 | #include <linux/mm.h> |
---|
23 | 24 | |
---|
.. | .. |
---|
36 | 37 | /* |
---|
37 | 38 | * bits in the RSR register |
---|
38 | 39 | */ |
---|
39 | | -#define RSR_ADDRBROAD 0x80 |
---|
40 | | -#define RSR_ADDRMULTI 0x40 |
---|
| 40 | +#define RSR_ADDRBROAD BIT(7) |
---|
| 41 | +#define RSR_ADDRMULTI BIT(6) |
---|
41 | 42 | #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) |
---|
48 | 49 | |
---|
49 | 50 | /* |
---|
50 | 51 | * bits in the new RSR register |
---|
51 | 52 | */ |
---|
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) |
---|
57 | 58 | |
---|
58 | 59 | /* |
---|
59 | 60 | * bits in the TSR register |
---|
60 | 61 | */ |
---|
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) |
---|
65 | 66 | |
---|
66 | 67 | #define FIFOCTL_AUTO_FB_1 0x1000 |
---|
67 | 68 | #define FIFOCTL_AUTO_FB_0 0x0800 |
---|