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