aboutsummaryrefslogtreecommitdiffstats
path: root/net/8021q/vlan_dev.c
diff options
context:
space:
mode:
authorYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>2007-02-09 09:24:25 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2007-02-11 02:19:11 -0500
commit122952fc2d6b5ca865e8475ec471d8944fa921c7 (patch)
tree50e2d31d1e53d5291a960cf36d683ea01adae2a4 /net/8021q/vlan_dev.c
parent9afa0949eea959f28248b717757c201765f1c19b (diff)
[NET] 8021Q: 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/8021q/vlan_dev.c')
-rw-r--r--net/8021q/vlan_dev.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
index 60a508eb1945..2fc8fe2cb366 100644
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -5,14 +5,14 @@
5 * Authors: Ben Greear <greearb@candelatech.com> 5 * Authors: Ben Greear <greearb@candelatech.com>
6 * Please send support related email to: vlan@scry.wanfear.com 6 * Please send support related email to: vlan@scry.wanfear.com
7 * VLAN Home Page: http://www.candelatech.com/~greear/vlan.html 7 * VLAN Home Page: http://www.candelatech.com/~greear/vlan.html
8 * 8 *
9 * Fixes: Mar 22 2001: Martin Bokaemper <mbokaemper@unispherenetworks.com> 9 * Fixes: Mar 22 2001: Martin Bokaemper <mbokaemper@unispherenetworks.com>
10 * - reset skb->pkt_type on incoming packets when MAC was changed 10 * - reset skb->pkt_type on incoming packets when MAC was changed
11 * - see that changed MAC is saddr for outgoing packets 11 * - see that changed MAC is saddr for outgoing packets
12 * Oct 20, 2001: Ard van Breeman: 12 * Oct 20, 2001: Ard van Breeman:
13 * - Fix MC-list, finally. 13 * - Fix MC-list, finally.
14 * - Flush MC-list on VLAN destroy. 14 * - Flush MC-list on VLAN destroy.
15 * 15 *
16 * 16 *
17 * This program is free software; you can redistribute it and/or 17 * This program is free software; you can redistribute it and/or
18 * modify it under the terms of the GNU General Public License 18 * modify it under the terms of the GNU General Public License
@@ -58,12 +58,12 @@ int vlan_dev_rebuild_header(struct sk_buff *skb)
58 58
59 /* TODO: Confirm this will work with VLAN headers... */ 59 /* TODO: Confirm this will work with VLAN headers... */
60 return arp_find(veth->h_dest, skb); 60 return arp_find(veth->h_dest, skb);
61#endif 61#endif
62 default: 62 default:
63 printk(VLAN_DBG 63 printk(VLAN_DBG
64 "%s: unable to resolve type %X addresses.\n", 64 "%s: unable to resolve type %X addresses.\n",
65 dev->name, ntohs(veth->h_vlan_encapsulated_proto)); 65 dev->name, ntohs(veth->h_vlan_encapsulated_proto));
66 66
67 memcpy(veth->h_source, dev->dev_addr, ETH_ALEN); 67 memcpy(veth->h_source, dev->dev_addr, ETH_ALEN);
68 break; 68 break;
69 }; 69 };
@@ -91,7 +91,7 @@ static inline struct sk_buff *vlan_check_reorder_header(struct sk_buff *skb)
91} 91}
92 92
93/* 93/*
94 * Determine the packet's protocol ID. The rule here is that we 94 * Determine the packet's protocol ID. The rule here is that we
95 * assume 802.3 if the type field is short enough to be a length. 95 * assume 802.3 if the type field is short enough to be a length.
96 * This is normal practice and works for any 'now in use' protocol. 96 * This is normal practice and works for any 'now in use' protocol.
97 * 97 *
@@ -113,7 +113,7 @@ static inline struct sk_buff *vlan_check_reorder_header(struct sk_buff *skb)
113 * 113 *
114 */ 114 */
115int vlan_skb_recv(struct sk_buff *skb, struct net_device *dev, 115int vlan_skb_recv(struct sk_buff *skb, struct net_device *dev,
116 struct packet_type* ptype, struct net_device *orig_dev) 116 struct packet_type* ptype, struct net_device *orig_dev)
117{ 117{
118 unsigned char *rawp = NULL; 118 unsigned char *rawp = NULL;
119 struct vlan_hdr *vhdr = (struct vlan_hdr *)(skb->data); 119 struct vlan_hdr *vhdr = (struct vlan_hdr *)(skb->data);
@@ -175,8 +175,8 @@ int vlan_skb_recv(struct sk_buff *skb, struct net_device *dev,
175 175
176#ifdef VLAN_DEBUG 176#ifdef VLAN_DEBUG
177 printk(VLAN_DBG "%s: dropping skb: %p because came in on wrong device, dev: %s real_dev: %s, skb_dev: %s\n", 177 printk(VLAN_DBG "%s: dropping skb: %p because came in on wrong device, dev: %s real_dev: %s, skb_dev: %s\n",
178 __FUNCTION__, skb, dev->name, 178 __FUNCTION__, skb, dev->name,
179 VLAN_DEV_INFO(skb->dev)->real_dev->name, 179 VLAN_DEV_INFO(skb->dev)->real_dev->name,
180 skb->dev->name); 180 skb->dev->name);
181#endif 181#endif
182 kfree_skb(skb); 182 kfree_skb(skb);
@@ -191,7 +191,7 @@ int vlan_skb_recv(struct sk_buff *skb, struct net_device *dev,
191 191
192#ifdef VLAN_DEBUG 192#ifdef VLAN_DEBUG
193 printk(VLAN_DBG "%s: priority: %lu for TCI: %hu (hbo)\n", 193 printk(VLAN_DBG "%s: priority: %lu for TCI: %hu (hbo)\n",
194 __FUNCTION__, (unsigned long)(skb->priority), 194 __FUNCTION__, (unsigned long)(skb->priority),
195 ntohs(vhdr->h_vlan_TCI)); 195 ntohs(vhdr->h_vlan_TCI));
196#endif 196#endif
197 197
@@ -207,7 +207,7 @@ int vlan_skb_recv(struct sk_buff *skb, struct net_device *dev,
207 stats->multicast++; 207 stats->multicast++;
208 break; 208 break;
209 209
210 case PACKET_OTHERHOST: 210 case PACKET_OTHERHOST:
211 /* Our lower layer thinks this is not local, let's make sure. 211 /* Our lower layer thinks this is not local, let's make sure.
212 * This allows the VLAN to have a different MAC than the underlying 212 * This allows the VLAN to have a different MAC than the underlying
213 * device, and still route correctly. 213 * device, and still route correctly.
@@ -319,7 +319,7 @@ static inline unsigned short vlan_dev_get_egress_qos_mask(struct net_device* dev
319} 319}
320 320
321/* 321/*
322 * Create the VLAN header for an arbitrary protocol layer 322 * Create the VLAN header for an arbitrary protocol layer
323 * 323 *
324 * saddr=NULL means use device source address 324 * saddr=NULL means use device source address
325 * daddr=NULL means leave destination address (eg unresolved arp) 325 * daddr=NULL means leave destination address (eg unresolved arp)
@@ -328,8 +328,8 @@ static inline unsigned short vlan_dev_get_egress_qos_mask(struct net_device* dev
328 * physical devices. 328 * physical devices.
329 */ 329 */
330int vlan_dev_hard_header(struct sk_buff *skb, struct net_device *dev, 330int vlan_dev_hard_header(struct sk_buff *skb, struct net_device *dev,
331 unsigned short type, void *daddr, void *saddr, 331 unsigned short type, void *daddr, void *saddr,
332 unsigned len) 332 unsigned len)
333{ 333{
334 struct vlan_hdr *vhdr; 334 struct vlan_hdr *vhdr;
335 unsigned short veth_TCI = 0; 335 unsigned short veth_TCI = 0;
@@ -346,7 +346,7 @@ int vlan_dev_hard_header(struct sk_buff *skb, struct net_device *dev,
346 * fixes some programs that get confused when they see a VLAN device 346 * fixes some programs that get confused when they see a VLAN device
347 * sending a frame that is VLAN encoded (the consensus is that the VLAN 347 * sending a frame that is VLAN encoded (the consensus is that the VLAN
348 * device should look completely like an Ethernet device when the 348 * device should look completely like an Ethernet device when the
349 * REORDER_HEADER flag is set) The drawback to this is some extra 349 * REORDER_HEADER flag is set) The drawback to this is some extra
350 * header shuffling in the hard_start_xmit. Users can turn off this 350 * header shuffling in the hard_start_xmit. Users can turn off this
351 * REORDER behaviour with the vconfig tool. 351 * REORDER behaviour with the vconfig tool.
352 */ 352 */
@@ -553,7 +553,7 @@ int vlan_dev_set_egress_priority(char *dev_name, __u32 skb_prio, short vlan_prio
553 struct net_device *dev = dev_get_by_name(dev_name); 553 struct net_device *dev = dev_get_by_name(dev_name);
554 struct vlan_priority_tci_mapping *mp = NULL; 554 struct vlan_priority_tci_mapping *mp = NULL;
555 struct vlan_priority_tci_mapping *np; 555 struct vlan_priority_tci_mapping *np;
556 556
557 if (dev) { 557 if (dev) {
558 if (dev->priv_flags & IFF_802_1Q_VLAN) { 558 if (dev->priv_flags & IFF_802_1Q_VLAN) {
559 /* See if a priority mapping exists.. */ 559 /* See if a priority mapping exists.. */
@@ -610,13 +610,13 @@ int vlan_dev_set_vlan_flag(char *dev_name, __u32 flag, short flag_val)
610 return -EINVAL; 610 return -EINVAL;
611 } 611 }
612 } else { 612 } else {
613 printk(KERN_ERR 613 printk(KERN_ERR
614 "%s: %s is not a vlan device, priv_flags: %hX.\n", 614 "%s: %s is not a vlan device, priv_flags: %hX.\n",
615 __FUNCTION__, dev->name, dev->priv_flags); 615 __FUNCTION__, dev->name, dev->priv_flags);
616 dev_put(dev); 616 dev_put(dev);
617 } 617 }
618 } else { 618 } else {
619 printk(KERN_ERR "%s: Could not find device: %s\n", 619 printk(KERN_ERR "%s: Could not find device: %s\n",
620 __FUNCTION__, dev_name); 620 __FUNCTION__, dev_name);
621 } 621 }
622 622
@@ -700,7 +700,7 @@ int vlan_dev_set_mac_address(struct net_device *dev, void *addr_struct_p)
700} 700}
701 701
702static inline int vlan_dmi_equals(struct dev_mc_list *dmi1, 702static inline int vlan_dmi_equals(struct dev_mc_list *dmi1,
703 struct dev_mc_list *dmi2) 703 struct dev_mc_list *dmi2)
704{ 704{
705 return ((dmi1->dmi_addrlen == dmi2->dmi_addrlen) && 705 return ((dmi1->dmi_addrlen == dmi2->dmi_addrlen) &&
706 (memcmp(dmi1->dmi_addr, dmi2->dmi_addr, dmi1->dmi_addrlen) == 0)); 706 (memcmp(dmi1->dmi_addr, dmi2->dmi_addr, dmi1->dmi_addrlen) == 0));
@@ -810,7 +810,7 @@ int vlan_dev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
810 case SIOCGMIIPHY: 810 case SIOCGMIIPHY:
811 case SIOCGMIIREG: 811 case SIOCGMIIREG:
812 case SIOCSMIIREG: 812 case SIOCSMIIREG:
813 if (real_dev->do_ioctl && netif_device_present(real_dev)) 813 if (real_dev->do_ioctl && netif_device_present(real_dev))
814 err = real_dev->do_ioctl(real_dev, &ifrr, cmd); 814 err = real_dev->do_ioctl(real_dev, &ifrr, cmd);
815 break; 815 break;
816 816
@@ -818,7 +818,7 @@ int vlan_dev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
818 err = dev_ethtool(&ifrr); 818 err = dev_ethtool(&ifrr);
819 } 819 }
820 820
821 if (!err) 821 if (!err)
822 ifr->ifr_ifru = ifrr.ifr_ifru; 822 ifr->ifr_ifru = ifrr.ifr_ifru;
823 823
824 return err; 824 return err;