aboutsummaryrefslogtreecommitdiffstats
path: root/net/ax25/ax25_ip.c
diff options
context:
space:
mode:
authorYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>2007-02-09 09:24:31 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2007-02-11 02:19:18 -0500
commit528930b91ee89a05a6264629cf99109652c19ca8 (patch)
treec4355a75eda74ff78ee776d02ec9152cb76405d0 /net/ax25/ax25_ip.c
parentf7d57453d20e27de69ecafd121005e9d13a0f427 (diff)
[NET] AX25: Fix whitespace errors.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ax25/ax25_ip.c')
-rw-r--r--net/ax25/ax25_ip.c94
1 files changed, 47 insertions, 47 deletions
diff --git a/net/ax25/ax25_ip.c b/net/ax25/ax25_ip.c
index 136c3aefa9de..8d62d8681615 100644
--- a/net/ax25/ax25_ip.c
+++ b/net/ax25/ax25_ip.c
@@ -55,46 +55,46 @@ int ax25_hard_header(struct sk_buff *skb, struct net_device *dev, unsigned short
55 if (type == ETH_P_AX25) 55 if (type == ETH_P_AX25)
56 return 0; 56 return 0;
57 57
58 /* header is an AX.25 UI frame from us to them */ 58 /* header is an AX.25 UI frame from us to them */
59 buff = skb_push(skb, AX25_HEADER_LEN); 59 buff = skb_push(skb, AX25_HEADER_LEN);
60 *buff++ = 0x00; /* KISS DATA */ 60 *buff++ = 0x00; /* KISS DATA */
61 61
62 if (daddr != NULL) 62 if (daddr != NULL)
63 memcpy(buff, daddr, dev->addr_len); /* Address specified */ 63 memcpy(buff, daddr, dev->addr_len); /* Address specified */
64 64
65 buff[6] &= ~AX25_CBIT; 65 buff[6] &= ~AX25_CBIT;
66 buff[6] &= ~AX25_EBIT; 66 buff[6] &= ~AX25_EBIT;
67 buff[6] |= AX25_SSSID_SPARE; 67 buff[6] |= AX25_SSSID_SPARE;
68 buff += AX25_ADDR_LEN; 68 buff += AX25_ADDR_LEN;
69 69
70 if (saddr != NULL) 70 if (saddr != NULL)
71 memcpy(buff, saddr, dev->addr_len); 71 memcpy(buff, saddr, dev->addr_len);
72 else 72 else
73 memcpy(buff, dev->dev_addr, dev->addr_len); 73 memcpy(buff, dev->dev_addr, dev->addr_len);
74 74
75 buff[6] &= ~AX25_CBIT; 75 buff[6] &= ~AX25_CBIT;
76 buff[6] |= AX25_EBIT; 76 buff[6] |= AX25_EBIT;
77 buff[6] |= AX25_SSSID_SPARE; 77 buff[6] |= AX25_SSSID_SPARE;
78 buff += AX25_ADDR_LEN; 78 buff += AX25_ADDR_LEN;
79 79
80 *buff++ = AX25_UI; /* UI */ 80 *buff++ = AX25_UI; /* UI */
81 81
82 /* Append a suitable AX.25 PID */ 82 /* Append a suitable AX.25 PID */
83 switch (type) { 83 switch (type) {
84 case ETH_P_IP: 84 case ETH_P_IP:
85 *buff++ = AX25_P_IP; 85 *buff++ = AX25_P_IP;
86 break; 86 break;
87 case ETH_P_ARP: 87 case ETH_P_ARP:
88 *buff++ = AX25_P_ARP; 88 *buff++ = AX25_P_ARP;
89 break; 89 break;
90 default: 90 default:
91 printk(KERN_ERR "AX.25: ax25_hard_header - wrong protocol type 0x%2.2x\n", type); 91 printk(KERN_ERR "AX.25: ax25_hard_header - wrong protocol type 0x%2.2x\n", type);
92 *buff++ = 0; 92 *buff++ = 0;
93 break; 93 break;
94 } 94 }
95 95
96 if (daddr != NULL) 96 if (daddr != NULL)
97 return AX25_HEADER_LEN; 97 return AX25_HEADER_LEN;
98 98
99 return -AX25_HEADER_LEN; /* Unfinished header */ 99 return -AX25_HEADER_LEN; /* Unfinished header */
100} 100}
@@ -114,8 +114,8 @@ int ax25_rebuild_header(struct sk_buff *skb)
114 dst = (ax25_address *)(bp + 1); 114 dst = (ax25_address *)(bp + 1);
115 src = (ax25_address *)(bp + 8); 115 src = (ax25_address *)(bp + 8);
116 116
117 if (arp_find(bp + 1, skb)) 117 if (arp_find(bp + 1, skb))
118 return 1; 118 return 1;
119 119
120 route = ax25_get_route(dst, NULL); 120 route = ax25_get_route(dst, NULL);
121 if (route) { 121 if (route) {
@@ -127,8 +127,8 @@ int ax25_rebuild_header(struct sk_buff *skb)
127 if (dev == NULL) 127 if (dev == NULL)
128 dev = skb->dev; 128 dev = skb->dev;
129 129
130 if ((ax25_dev = ax25_dev_ax25dev(dev)) == NULL) { 130 if ((ax25_dev = ax25_dev_ax25dev(dev)) == NULL) {
131 goto put; 131 goto put;
132 } 132 }
133 133
134 if (bp[16] == AX25_P_IP) { 134 if (bp[16] == AX25_P_IP) {
@@ -175,8 +175,8 @@ int ax25_rebuild_header(struct sk_buff *skb)
175 ourskb->nh.raw = ourskb->data; 175 ourskb->nh.raw = ourskb->data;
176 176
177 ax25=ax25_send_frame( 177 ax25=ax25_send_frame(
178 ourskb, 178 ourskb,
179 ax25_dev->values[AX25_VALUES_PACLEN], 179 ax25_dev->values[AX25_VALUES_PACLEN],
180 &src_c, 180 &src_c,
181 &dst_c, digipeat, dev); 181 &dst_c, digipeat, dev);
182 if (ax25) { 182 if (ax25) {
@@ -186,13 +186,13 @@ int ax25_rebuild_header(struct sk_buff *skb)
186 } 186 }
187 } 187 }
188 188
189 bp[7] &= ~AX25_CBIT; 189 bp[7] &= ~AX25_CBIT;
190 bp[7] &= ~AX25_EBIT; 190 bp[7] &= ~AX25_EBIT;
191 bp[7] |= AX25_SSSID_SPARE; 191 bp[7] |= AX25_SSSID_SPARE;
192 192
193 bp[14] &= ~AX25_CBIT; 193 bp[14] &= ~AX25_CBIT;
194 bp[14] |= AX25_EBIT; 194 bp[14] |= AX25_EBIT;
195 bp[14] |= AX25_SSSID_SPARE; 195 bp[14] |= AX25_SSSID_SPARE;
196 196
197 skb_pull(skb, AX25_KISS_HEADER_LEN); 197 skb_pull(skb, AX25_KISS_HEADER_LEN);
198 198
@@ -211,7 +211,7 @@ put:
211 if (route) 211 if (route)
212 ax25_put_route(route); 212 ax25_put_route(route);
213 213
214 return 1; 214 return 1;
215} 215}
216 216
217#else /* INET */ 217#else /* INET */