diff options
Diffstat (limited to 'drivers/ieee1394/eth1394.h')
-rw-r--r-- | drivers/ieee1394/eth1394.h | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/drivers/ieee1394/eth1394.h b/drivers/ieee1394/eth1394.h index 2a88ee466354..a3439ee7cb4e 100644 --- a/drivers/ieee1394/eth1394.h +++ b/drivers/ieee1394/eth1394.h | |||
@@ -25,6 +25,8 @@ | |||
25 | #define __ETH1394_H | 25 | #define __ETH1394_H |
26 | 26 | ||
27 | #include <linux/netdevice.h> | 27 | #include <linux/netdevice.h> |
28 | #include <linux/skbuff.h> | ||
29 | #include <asm/byteorder.h> | ||
28 | 30 | ||
29 | #include "ieee1394.h" | 31 | #include "ieee1394.h" |
30 | #include "ieee1394_types.h" | 32 | #include "ieee1394_types.h" |
@@ -35,22 +37,15 @@ | |||
35 | 37 | ||
36 | /* GASP identifier numbers for IPv4 over IEEE 1394 */ | 38 | /* GASP identifier numbers for IPv4 over IEEE 1394 */ |
37 | #define ETHER1394_GASP_SPECIFIER_ID 0x00005E | 39 | #define ETHER1394_GASP_SPECIFIER_ID 0x00005E |
38 | #define ETHER1394_GASP_SPECIFIER_ID_HI ((ETHER1394_GASP_SPECIFIER_ID >> 8) & 0xffff) | 40 | #define ETHER1394_GASP_SPECIFIER_ID_HI ((0x00005E >> 8) & 0xffff) |
39 | #define ETHER1394_GASP_SPECIFIER_ID_LO (ETHER1394_GASP_SPECIFIER_ID & 0xff) | 41 | #define ETHER1394_GASP_SPECIFIER_ID_LO (0x00005E & 0xff) |
40 | #define ETHER1394_GASP_VERSION 1 | 42 | #define ETHER1394_GASP_VERSION 1 |
41 | 43 | ||
42 | #define ETHER1394_GASP_OVERHEAD (2 * sizeof(quadlet_t)) /* GASP header overhead */ | 44 | #define ETHER1394_GASP_OVERHEAD (2 * sizeof(quadlet_t)) /* for GASP header */ |
43 | 45 | ||
44 | #define ETHER1394_GASP_BUFFERS 16 | 46 | #define ETHER1394_GASP_BUFFERS 16 |
45 | 47 | ||
46 | /* rawiso buffer size - due to a limitation in rawiso, we must limit each | 48 | #define NODE_SET (ALL_NODES + 1) /* Node set == 64 */ |
47 | * GASP buffer to be less than PAGE_SIZE. */ | ||
48 | #define ETHER1394_ISO_BUF_SIZE ETHER1394_GASP_BUFFERS * \ | ||
49 | min((unsigned int)PAGE_SIZE, \ | ||
50 | 2 * (1U << (priv->host->csr.max_rec + 1))) | ||
51 | |||
52 | /* Node set == 64 */ | ||
53 | #define NODE_SET (ALL_NODES + 1) | ||
54 | 49 | ||
55 | enum eth1394_bc_states { ETHER1394_BC_ERROR, | 50 | enum eth1394_bc_states { ETHER1394_BC_ERROR, |
56 | ETHER1394_BC_RUNNING, | 51 | ETHER1394_BC_RUNNING, |
@@ -86,19 +81,14 @@ struct eth1394hdr { | |||
86 | unsigned short h_proto; /* packet type ID field */ | 81 | unsigned short h_proto; /* packet type ID field */ |
87 | } __attribute__((packed)); | 82 | } __attribute__((packed)); |
88 | 83 | ||
89 | #ifdef __KERNEL__ | ||
90 | #include <linux/skbuff.h> | ||
91 | |||
92 | static inline struct eth1394hdr *eth1394_hdr(const struct sk_buff *skb) | 84 | static inline struct eth1394hdr *eth1394_hdr(const struct sk_buff *skb) |
93 | { | 85 | { |
94 | return (struct eth1394hdr *)skb_mac_header(skb); | 86 | return (struct eth1394hdr *)skb_mac_header(skb); |
95 | } | 87 | } |
96 | #endif | ||
97 | 88 | ||
98 | typedef enum {ETH1394_GASP, ETH1394_WRREQ} eth1394_tx_type; | 89 | typedef enum {ETH1394_GASP, ETH1394_WRREQ} eth1394_tx_type; |
99 | 90 | ||
100 | /* IP1394 headers */ | 91 | /* IP1394 headers */ |
101 | #include <asm/byteorder.h> | ||
102 | 92 | ||
103 | /* Unfragmented */ | 93 | /* Unfragmented */ |
104 | #if defined __BIG_ENDIAN_BITFIELD | 94 | #if defined __BIG_ENDIAN_BITFIELD |