diff options
61 files changed, 111 insertions, 112 deletions
diff --git a/drivers/net/arcnet/arc-rawmode.c b/drivers/net/arcnet/arc-rawmode.c index da017cbb5f64..646dfc5f50c9 100644 --- a/drivers/net/arcnet/arc-rawmode.c +++ b/drivers/net/arcnet/arc-rawmode.c | |||
@@ -122,7 +122,7 @@ static void rx(struct net_device *dev, int bufnum, | |||
122 | 122 | ||
123 | BUGLVL(D_SKB) arcnet_dump_skb(dev, skb, "rx"); | 123 | BUGLVL(D_SKB) arcnet_dump_skb(dev, skb, "rx"); |
124 | 124 | ||
125 | skb->protocol = __constant_htons(ETH_P_ARCNET); | 125 | skb->protocol = cpu_to_be16(ETH_P_ARCNET); |
126 | ; | 126 | ; |
127 | netif_rx(skb); | 127 | netif_rx(skb); |
128 | } | 128 | } |
diff --git a/drivers/net/arcnet/capmode.c b/drivers/net/arcnet/capmode.c index 1613929ff301..083e21094b20 100644 --- a/drivers/net/arcnet/capmode.c +++ b/drivers/net/arcnet/capmode.c | |||
@@ -148,7 +148,7 @@ static void rx(struct net_device *dev, int bufnum, | |||
148 | 148 | ||
149 | BUGLVL(D_SKB) arcnet_dump_skb(dev, skb, "rx"); | 149 | BUGLVL(D_SKB) arcnet_dump_skb(dev, skb, "rx"); |
150 | 150 | ||
151 | skb->protocol = __constant_htons(ETH_P_ARCNET); | 151 | skb->protocol = cpu_to_be16(ETH_P_ARCNET); |
152 | ; | 152 | ; |
153 | netif_rx(skb); | 153 | netif_rx(skb); |
154 | } | 154 | } |
@@ -282,7 +282,7 @@ static int ack_tx(struct net_device *dev, int acked) | |||
282 | BUGMSG(D_PROTO, "Ackknowledge for cap packet %x.\n", | 282 | BUGMSG(D_PROTO, "Ackknowledge for cap packet %x.\n", |
283 | *((int*)&ackpkt->soft.cap.cookie[0])); | 283 | *((int*)&ackpkt->soft.cap.cookie[0])); |
284 | 284 | ||
285 | ackskb->protocol = __constant_htons(ETH_P_ARCNET); | 285 | ackskb->protocol = cpu_to_be16(ETH_P_ARCNET); |
286 | 286 | ||
287 | BUGLVL(D_SKB) arcnet_dump_skb(dev, ackskb, "ack_tx_recv"); | 287 | BUGLVL(D_SKB) arcnet_dump_skb(dev, ackskb, "ack_tx_recv"); |
288 | netif_rx(ackskb); | 288 | netif_rx(ackskb); |
diff --git a/drivers/net/bonding/bond_3ad.h b/drivers/net/bonding/bond_3ad.h index 8a83eb283c21..a306230381c8 100644 --- a/drivers/net/bonding/bond_3ad.h +++ b/drivers/net/bonding/bond_3ad.h | |||
@@ -29,7 +29,7 @@ | |||
29 | 29 | ||
30 | // General definitions | 30 | // General definitions |
31 | #define BOND_ETH_P_LACPDU 0x8809 | 31 | #define BOND_ETH_P_LACPDU 0x8809 |
32 | #define PKT_TYPE_LACPDU __constant_htons(BOND_ETH_P_LACPDU) | 32 | #define PKT_TYPE_LACPDU cpu_to_be16(BOND_ETH_P_LACPDU) |
33 | #define AD_TIMER_INTERVAL 100 /*msec*/ | 33 | #define AD_TIMER_INTERVAL 100 /*msec*/ |
34 | 34 | ||
35 | #define MULTICAST_LACPDU_ADDR {0x01, 0x80, 0xC2, 0x00, 0x00, 0x02} | 35 | #define MULTICAST_LACPDU_ADDR {0x01, 0x80, 0xC2, 0x00, 0x00, 0x02} |
diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c index 27fb7f5c21cf..409b14074275 100644 --- a/drivers/net/bonding/bond_alb.c +++ b/drivers/net/bonding/bond_alb.c | |||
@@ -822,7 +822,7 @@ static int rlb_initialize(struct bonding *bond) | |||
822 | _unlock_rx_hashtbl(bond); | 822 | _unlock_rx_hashtbl(bond); |
823 | 823 | ||
824 | /*initialize packet type*/ | 824 | /*initialize packet type*/ |
825 | pk_type->type = __constant_htons(ETH_P_ARP); | 825 | pk_type->type = cpu_to_be16(ETH_P_ARP); |
826 | pk_type->dev = NULL; | 826 | pk_type->dev = NULL; |
827 | pk_type->func = rlb_arp_recv; | 827 | pk_type->func = rlb_arp_recv; |
828 | 828 | ||
@@ -892,7 +892,7 @@ static void alb_send_learning_packets(struct slave *slave, u8 mac_addr[]) | |||
892 | memset(&pkt, 0, size); | 892 | memset(&pkt, 0, size); |
893 | memcpy(pkt.mac_dst, mac_addr, ETH_ALEN); | 893 | memcpy(pkt.mac_dst, mac_addr, ETH_ALEN); |
894 | memcpy(pkt.mac_src, mac_addr, ETH_ALEN); | 894 | memcpy(pkt.mac_src, mac_addr, ETH_ALEN); |
895 | pkt.type = __constant_htons(ETH_P_LOOP); | 895 | pkt.type = cpu_to_be16(ETH_P_LOOP); |
896 | 896 | ||
897 | for (i = 0; i < MAX_LP_BURST; i++) { | 897 | for (i = 0; i < MAX_LP_BURST; i++) { |
898 | struct sk_buff *skb; | 898 | struct sk_buff *skb; |
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index c4a303023b31..40db34deebde 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c | |||
@@ -2860,11 +2860,11 @@ static bool e1000_tx_csum(struct e1000_adapter *adapter, | |||
2860 | return false; | 2860 | return false; |
2861 | 2861 | ||
2862 | switch (skb->protocol) { | 2862 | switch (skb->protocol) { |
2863 | case __constant_htons(ETH_P_IP): | 2863 | case cpu_to_be16(ETH_P_IP): |
2864 | if (ip_hdr(skb)->protocol == IPPROTO_TCP) | 2864 | if (ip_hdr(skb)->protocol == IPPROTO_TCP) |
2865 | cmd_len |= E1000_TXD_CMD_TCP; | 2865 | cmd_len |= E1000_TXD_CMD_TCP; |
2866 | break; | 2866 | break; |
2867 | case __constant_htons(ETH_P_IPV6): | 2867 | case cpu_to_be16(ETH_P_IPV6): |
2868 | /* XXX not handling all IPV6 headers */ | 2868 | /* XXX not handling all IPV6 headers */ |
2869 | if (ipv6_hdr(skb)->nexthdr == IPPROTO_TCP) | 2869 | if (ipv6_hdr(skb)->nexthdr == IPPROTO_TCP) |
2870 | cmd_len |= E1000_TXD_CMD_TCP; | 2870 | cmd_len |= E1000_TXD_CMD_TCP; |
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c index e04b392c9a59..c425b19e3362 100644 --- a/drivers/net/e1000e/netdev.c +++ b/drivers/net/e1000e/netdev.c | |||
@@ -3770,11 +3770,11 @@ static bool e1000_tx_csum(struct e1000_adapter *adapter, struct sk_buff *skb) | |||
3770 | return 0; | 3770 | return 0; |
3771 | 3771 | ||
3772 | switch (skb->protocol) { | 3772 | switch (skb->protocol) { |
3773 | case __constant_htons(ETH_P_IP): | 3773 | case cpu_to_be16(ETH_P_IP): |
3774 | if (ip_hdr(skb)->protocol == IPPROTO_TCP) | 3774 | if (ip_hdr(skb)->protocol == IPPROTO_TCP) |
3775 | cmd_len |= E1000_TXD_CMD_TCP; | 3775 | cmd_len |= E1000_TXD_CMD_TCP; |
3776 | break; | 3776 | break; |
3777 | case __constant_htons(ETH_P_IPV6): | 3777 | case cpu_to_be16(ETH_P_IPV6): |
3778 | /* XXX not handling all IPV6 headers */ | 3778 | /* XXX not handling all IPV6 headers */ |
3779 | if (ipv6_hdr(skb)->nexthdr == IPPROTO_TCP) | 3779 | if (ipv6_hdr(skb)->nexthdr == IPPROTO_TCP) |
3780 | cmd_len |= E1000_TXD_CMD_TCP; | 3780 | cmd_len |= E1000_TXD_CMD_TCP; |
diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c index 4617956821cd..5dd11563553e 100644 --- a/drivers/net/enic/enic_main.c +++ b/drivers/net/enic/enic_main.c | |||
@@ -570,11 +570,11 @@ static inline void enic_queue_wq_skb_tso(struct enic *enic, | |||
570 | * to each TCP segment resulting from the TSO. | 570 | * to each TCP segment resulting from the TSO. |
571 | */ | 571 | */ |
572 | 572 | ||
573 | if (skb->protocol == __constant_htons(ETH_P_IP)) { | 573 | if (skb->protocol == cpu_to_be16(ETH_P_IP)) { |
574 | ip_hdr(skb)->check = 0; | 574 | ip_hdr(skb)->check = 0; |
575 | tcp_hdr(skb)->check = ~csum_tcpudp_magic(ip_hdr(skb)->saddr, | 575 | tcp_hdr(skb)->check = ~csum_tcpudp_magic(ip_hdr(skb)->saddr, |
576 | ip_hdr(skb)->daddr, 0, IPPROTO_TCP, 0); | 576 | ip_hdr(skb)->daddr, 0, IPPROTO_TCP, 0); |
577 | } else if (skb->protocol == __constant_htons(ETH_P_IPV6)) { | 577 | } else if (skb->protocol == cpu_to_be16(ETH_P_IPV6)) { |
578 | tcp_hdr(skb)->check = ~csum_ipv6_magic(&ipv6_hdr(skb)->saddr, | 578 | tcp_hdr(skb)->check = ~csum_ipv6_magic(&ipv6_hdr(skb)->saddr, |
579 | &ipv6_hdr(skb)->daddr, 0, IPPROTO_TCP, 0); | 579 | &ipv6_hdr(skb)->daddr, 0, IPPROTO_TCP, 0); |
580 | } | 580 | } |
diff --git a/drivers/net/hamachi.c b/drivers/net/hamachi.c index 7e8b3c59a7d6..455641f8677e 100644 --- a/drivers/net/hamachi.c +++ b/drivers/net/hamachi.c | |||
@@ -1244,7 +1244,7 @@ do { \ | |||
1244 | csum_add(sum, (ih)->saddr & 0xffff); \ | 1244 | csum_add(sum, (ih)->saddr & 0xffff); \ |
1245 | csum_add(sum, (ih)->daddr >> 16); \ | 1245 | csum_add(sum, (ih)->daddr >> 16); \ |
1246 | csum_add(sum, (ih)->daddr & 0xffff); \ | 1246 | csum_add(sum, (ih)->daddr & 0xffff); \ |
1247 | csum_add(sum, __constant_htons(IPPROTO_UDP)); \ | 1247 | csum_add(sum, cpu_to_be16(IPPROTO_UDP)); \ |
1248 | csum_add(sum, (uh)->len); \ | 1248 | csum_add(sum, (uh)->len); \ |
1249 | } while (0) | 1249 | } while (0) |
1250 | 1250 | ||
@@ -1255,7 +1255,7 @@ do { \ | |||
1255 | csum_add(sum, (ih)->saddr & 0xffff); \ | 1255 | csum_add(sum, (ih)->saddr & 0xffff); \ |
1256 | csum_add(sum, (ih)->daddr >> 16); \ | 1256 | csum_add(sum, (ih)->daddr >> 16); \ |
1257 | csum_add(sum, (ih)->daddr & 0xffff); \ | 1257 | csum_add(sum, (ih)->daddr & 0xffff); \ |
1258 | csum_add(sum, __constant_htons(IPPROTO_TCP)); \ | 1258 | csum_add(sum, cpu_to_be16(IPPROTO_TCP)); \ |
1259 | csum_add(sum, htons(len)); \ | 1259 | csum_add(sum, htons(len)); \ |
1260 | } while (0) | 1260 | } while (0) |
1261 | #endif | 1261 | #endif |
@@ -1296,7 +1296,7 @@ static int hamachi_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1296 | /* tack on checksum tag */ | 1296 | /* tack on checksum tag */ |
1297 | u32 tagval = 0; | 1297 | u32 tagval = 0; |
1298 | struct ethhdr *eh = (struct ethhdr *)skb->data; | 1298 | struct ethhdr *eh = (struct ethhdr *)skb->data; |
1299 | if (eh->h_proto == __constant_htons(ETH_P_IP)) { | 1299 | if (eh->h_proto == cpu_to_be16(ETH_P_IP)) { |
1300 | struct iphdr *ih = (struct iphdr *)((char *)eh + ETH_HLEN); | 1300 | struct iphdr *ih = (struct iphdr *)((char *)eh + ETH_HLEN); |
1301 | if (ih->protocol == IPPROTO_UDP) { | 1301 | if (ih->protocol == IPPROTO_UDP) { |
1302 | struct udphdr *uh | 1302 | struct udphdr *uh |
@@ -1605,7 +1605,7 @@ static int hamachi_rx(struct net_device *dev) | |||
1605 | */ | 1605 | */ |
1606 | if (ntohs(ih->tot_len) >= 46){ | 1606 | if (ntohs(ih->tot_len) >= 46){ |
1607 | /* don't worry about frags */ | 1607 | /* don't worry about frags */ |
1608 | if (!(ih->frag_off & __constant_htons(IP_MF|IP_OFFSET))) { | 1608 | if (!(ih->frag_off & cpu_to_be16(IP_MF|IP_OFFSET))) { |
1609 | u32 inv = *(u32 *) &buf_addr[data_size - 16]; | 1609 | u32 inv = *(u32 *) &buf_addr[data_size - 16]; |
1610 | u32 *p = (u32 *) &buf_addr[data_size - 20]; | 1610 | u32 *p = (u32 *) &buf_addr[data_size - 20]; |
1611 | register u32 crc, p_r, p_r1; | 1611 | register u32 crc, p_r, p_r1; |
diff --git a/drivers/net/hamradio/bpqether.c b/drivers/net/hamradio/bpqether.c index 1f65d1edf132..2c619bc99ae7 100644 --- a/drivers/net/hamradio/bpqether.c +++ b/drivers/net/hamradio/bpqether.c | |||
@@ -97,7 +97,7 @@ static int bpq_rcv(struct sk_buff *, struct net_device *, struct packet_type *, | |||
97 | static int bpq_device_event(struct notifier_block *, unsigned long, void *); | 97 | static int bpq_device_event(struct notifier_block *, unsigned long, void *); |
98 | 98 | ||
99 | static struct packet_type bpq_packet_type = { | 99 | static struct packet_type bpq_packet_type = { |
100 | .type = __constant_htons(ETH_P_BPQ), | 100 | .type = cpu_to_be16(ETH_P_BPQ), |
101 | .func = bpq_rcv, | 101 | .func = bpq_rcv, |
102 | }; | 102 | }; |
103 | 103 | ||
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c index bd166803671d..cd794bac8b80 100644 --- a/drivers/net/igb/igb_main.c +++ b/drivers/net/igb/igb_main.c | |||
@@ -2749,12 +2749,12 @@ static inline bool igb_tx_csum_adv(struct igb_adapter *adapter, | |||
2749 | 2749 | ||
2750 | if (skb->ip_summed == CHECKSUM_PARTIAL) { | 2750 | if (skb->ip_summed == CHECKSUM_PARTIAL) { |
2751 | switch (skb->protocol) { | 2751 | switch (skb->protocol) { |
2752 | case __constant_htons(ETH_P_IP): | 2752 | case cpu_to_be16(ETH_P_IP): |
2753 | tu_cmd |= E1000_ADVTXD_TUCMD_IPV4; | 2753 | tu_cmd |= E1000_ADVTXD_TUCMD_IPV4; |
2754 | if (ip_hdr(skb)->protocol == IPPROTO_TCP) | 2754 | if (ip_hdr(skb)->protocol == IPPROTO_TCP) |
2755 | tu_cmd |= E1000_ADVTXD_TUCMD_L4T_TCP; | 2755 | tu_cmd |= E1000_ADVTXD_TUCMD_L4T_TCP; |
2756 | break; | 2756 | break; |
2757 | case __constant_htons(ETH_P_IPV6): | 2757 | case cpu_to_be16(ETH_P_IPV6): |
2758 | /* XXX what about other V6 headers?? */ | 2758 | /* XXX what about other V6 headers?? */ |
2759 | if (ipv6_hdr(skb)->nexthdr == IPPROTO_TCP) | 2759 | if (ipv6_hdr(skb)->nexthdr == IPPROTO_TCP) |
2760 | tu_cmd |= E1000_ADVTXD_TUCMD_L4T_TCP; | 2760 | tu_cmd |= E1000_ADVTXD_TUCMD_L4T_TCP; |
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index fe4a4d17c4bc..88615f69976e 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c | |||
@@ -3567,13 +3567,13 @@ static bool ixgbe_tx_csum(struct ixgbe_adapter *adapter, | |||
3567 | 3567 | ||
3568 | if (skb->ip_summed == CHECKSUM_PARTIAL) { | 3568 | if (skb->ip_summed == CHECKSUM_PARTIAL) { |
3569 | switch (skb->protocol) { | 3569 | switch (skb->protocol) { |
3570 | case __constant_htons(ETH_P_IP): | 3570 | case cpu_to_be16(ETH_P_IP): |
3571 | type_tucmd_mlhl |= IXGBE_ADVTXD_TUCMD_IPV4; | 3571 | type_tucmd_mlhl |= IXGBE_ADVTXD_TUCMD_IPV4; |
3572 | if (ip_hdr(skb)->protocol == IPPROTO_TCP) | 3572 | if (ip_hdr(skb)->protocol == IPPROTO_TCP) |
3573 | type_tucmd_mlhl |= | 3573 | type_tucmd_mlhl |= |
3574 | IXGBE_ADVTXD_TUCMD_L4T_TCP; | 3574 | IXGBE_ADVTXD_TUCMD_L4T_TCP; |
3575 | break; | 3575 | break; |
3576 | case __constant_htons(ETH_P_IPV6): | 3576 | case cpu_to_be16(ETH_P_IPV6): |
3577 | /* XXX what about other V6 headers?? */ | 3577 | /* XXX what about other V6 headers?? */ |
3578 | if (ipv6_hdr(skb)->nexthdr == IPPROTO_TCP) | 3578 | if (ipv6_hdr(skb)->nexthdr == IPPROTO_TCP) |
3579 | type_tucmd_mlhl |= | 3579 | type_tucmd_mlhl |= |
diff --git a/drivers/net/myri_sbus.c b/drivers/net/myri_sbus.c index 899ed065a147..88b52883acea 100644 --- a/drivers/net/myri_sbus.c +++ b/drivers/net/myri_sbus.c | |||
@@ -748,7 +748,7 @@ static int myri_rebuild_header(struct sk_buff *skb) | |||
748 | switch (eth->h_proto) | 748 | switch (eth->h_proto) |
749 | { | 749 | { |
750 | #ifdef CONFIG_INET | 750 | #ifdef CONFIG_INET |
751 | case __constant_htons(ETH_P_IP): | 751 | case cpu_to_be16(ETH_P_IP): |
752 | return arp_find(eth->h_dest, skb); | 752 | return arp_find(eth->h_dest, skb); |
753 | #endif | 753 | #endif |
754 | 754 | ||
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c index cc06cc5429fe..ada462e94c96 100644 --- a/drivers/net/netxen/netxen_nic_main.c +++ b/drivers/net/netxen/netxen_nic_main.c | |||
@@ -1170,7 +1170,7 @@ static bool netxen_tso_check(struct net_device *netdev, | |||
1170 | __be16 protocol = skb->protocol; | 1170 | __be16 protocol = skb->protocol; |
1171 | u16 flags = 0; | 1171 | u16 flags = 0; |
1172 | 1172 | ||
1173 | if (protocol == __constant_htons(ETH_P_8021Q)) { | 1173 | if (protocol == cpu_to_be16(ETH_P_8021Q)) { |
1174 | struct vlan_ethhdr *vh = (struct vlan_ethhdr *)skb->data; | 1174 | struct vlan_ethhdr *vh = (struct vlan_ethhdr *)skb->data; |
1175 | protocol = vh->h_vlan_encapsulated_proto; | 1175 | protocol = vh->h_vlan_encapsulated_proto; |
1176 | flags = FLAGS_VLAN_TAGGED; | 1176 | flags = FLAGS_VLAN_TAGGED; |
@@ -1183,21 +1183,21 @@ static bool netxen_tso_check(struct net_device *netdev, | |||
1183 | desc->total_hdr_length = | 1183 | desc->total_hdr_length = |
1184 | skb_transport_offset(skb) + tcp_hdrlen(skb); | 1184 | skb_transport_offset(skb) + tcp_hdrlen(skb); |
1185 | 1185 | ||
1186 | opcode = (protocol == __constant_htons(ETH_P_IPV6)) ? | 1186 | opcode = (protocol == cpu_to_be16(ETH_P_IPV6)) ? |
1187 | TX_TCP_LSO6 : TX_TCP_LSO; | 1187 | TX_TCP_LSO6 : TX_TCP_LSO; |
1188 | tso = true; | 1188 | tso = true; |
1189 | 1189 | ||
1190 | } else if (skb->ip_summed == CHECKSUM_PARTIAL) { | 1190 | } else if (skb->ip_summed == CHECKSUM_PARTIAL) { |
1191 | u8 l4proto; | 1191 | u8 l4proto; |
1192 | 1192 | ||
1193 | if (protocol == __constant_htons(ETH_P_IP)) { | 1193 | if (protocol == cpu_to_be16(ETH_P_IP)) { |
1194 | l4proto = ip_hdr(skb)->protocol; | 1194 | l4proto = ip_hdr(skb)->protocol; |
1195 | 1195 | ||
1196 | if (l4proto == IPPROTO_TCP) | 1196 | if (l4proto == IPPROTO_TCP) |
1197 | opcode = TX_TCP_PKT; | 1197 | opcode = TX_TCP_PKT; |
1198 | else if(l4proto == IPPROTO_UDP) | 1198 | else if(l4proto == IPPROTO_UDP) |
1199 | opcode = TX_UDP_PKT; | 1199 | opcode = TX_UDP_PKT; |
1200 | } else if (protocol == __constant_htons(ETH_P_IPV6)) { | 1200 | } else if (protocol == cpu_to_be16(ETH_P_IPV6)) { |
1201 | l4proto = ipv6_hdr(skb)->nexthdr; | 1201 | l4proto = ipv6_hdr(skb)->nexthdr; |
1202 | 1202 | ||
1203 | if (l4proto == IPPROTO_TCP) | 1203 | if (l4proto == IPPROTO_TCP) |
diff --git a/drivers/net/niu.c b/drivers/net/niu.c index 2346ca6bf5ba..c26325ded20e 100644 --- a/drivers/net/niu.c +++ b/drivers/net/niu.c | |||
@@ -6447,11 +6447,11 @@ static u64 niu_compute_tx_flags(struct sk_buff *skb, struct ethhdr *ehdr, | |||
6447 | 6447 | ||
6448 | ipv6 = ihl = 0; | 6448 | ipv6 = ihl = 0; |
6449 | switch (skb->protocol) { | 6449 | switch (skb->protocol) { |
6450 | case __constant_htons(ETH_P_IP): | 6450 | case cpu_to_be16(ETH_P_IP): |
6451 | ip_proto = ip_hdr(skb)->protocol; | 6451 | ip_proto = ip_hdr(skb)->protocol; |
6452 | ihl = ip_hdr(skb)->ihl; | 6452 | ihl = ip_hdr(skb)->ihl; |
6453 | break; | 6453 | break; |
6454 | case __constant_htons(ETH_P_IPV6): | 6454 | case cpu_to_be16(ETH_P_IPV6): |
6455 | ip_proto = ipv6_hdr(skb)->nexthdr; | 6455 | ip_proto = ipv6_hdr(skb)->nexthdr; |
6456 | ihl = (40 >> 2); | 6456 | ihl = (40 >> 2); |
6457 | ipv6 = 1; | 6457 | ipv6 = 1; |
diff --git a/drivers/net/pppoe.c b/drivers/net/pppoe.c index 074803a78fc6..1011fd64108b 100644 --- a/drivers/net/pppoe.c +++ b/drivers/net/pppoe.c | |||
@@ -514,12 +514,12 @@ out: | |||
514 | } | 514 | } |
515 | 515 | ||
516 | static struct packet_type pppoes_ptype = { | 516 | static struct packet_type pppoes_ptype = { |
517 | .type = __constant_htons(ETH_P_PPP_SES), | 517 | .type = cpu_to_be16(ETH_P_PPP_SES), |
518 | .func = pppoe_rcv, | 518 | .func = pppoe_rcv, |
519 | }; | 519 | }; |
520 | 520 | ||
521 | static struct packet_type pppoed_ptype = { | 521 | static struct packet_type pppoed_ptype = { |
522 | .type = __constant_htons(ETH_P_PPP_DISC), | 522 | .type = cpu_to_be16(ETH_P_PPP_DISC), |
523 | .func = pppoe_disc_rcv, | 523 | .func = pppoe_disc_rcv, |
524 | }; | 524 | }; |
525 | 525 | ||
@@ -877,7 +877,7 @@ static int pppoe_sendmsg(struct kiocb *iocb, struct socket *sock, | |||
877 | skb->dev = dev; | 877 | skb->dev = dev; |
878 | 878 | ||
879 | skb->priority = sk->sk_priority; | 879 | skb->priority = sk->sk_priority; |
880 | skb->protocol = __constant_htons(ETH_P_PPP_SES); | 880 | skb->protocol = cpu_to_be16(ETH_P_PPP_SES); |
881 | 881 | ||
882 | ph = (struct pppoe_hdr *)skb_put(skb, total_len + sizeof(struct pppoe_hdr)); | 882 | ph = (struct pppoe_hdr *)skb_put(skb, total_len + sizeof(struct pppoe_hdr)); |
883 | start = (char *)&ph->tag[0]; | 883 | start = (char *)&ph->tag[0]; |
@@ -937,7 +937,7 @@ static int __pppoe_xmit(struct sock *sk, struct sk_buff *skb) | |||
937 | ph->sid = po->num; | 937 | ph->sid = po->num; |
938 | ph->length = htons(data_len); | 938 | ph->length = htons(data_len); |
939 | 939 | ||
940 | skb->protocol = __constant_htons(ETH_P_PPP_SES); | 940 | skb->protocol = cpu_to_be16(ETH_P_PPP_SES); |
941 | skb->dev = dev; | 941 | skb->dev = dev; |
942 | 942 | ||
943 | dev_hard_header(skb, dev, ETH_P_PPP_SES, | 943 | dev_hard_header(skb, dev, ETH_P_PPP_SES, |
diff --git a/drivers/net/ps3_gelic_net.c b/drivers/net/ps3_gelic_net.c index 06649d0c2098..30900b30d532 100644 --- a/drivers/net/ps3_gelic_net.c +++ b/drivers/net/ps3_gelic_net.c | |||
@@ -745,7 +745,7 @@ static inline struct sk_buff *gelic_put_vlan_tag(struct sk_buff *skb, | |||
745 | /* Move the mac addresses to the top of buffer */ | 745 | /* Move the mac addresses to the top of buffer */ |
746 | memmove(skb->data, skb->data + VLAN_HLEN, 2 * ETH_ALEN); | 746 | memmove(skb->data, skb->data + VLAN_HLEN, 2 * ETH_ALEN); |
747 | 747 | ||
748 | veth->h_vlan_proto = __constant_htons(ETH_P_8021Q); | 748 | veth->h_vlan_proto = cpu_to_be16(ETH_P_8021Q); |
749 | veth->h_vlan_TCI = htons(tag); | 749 | veth->h_vlan_TCI = htons(tag); |
750 | 750 | ||
751 | return skb; | 751 | return skb; |
diff --git a/drivers/net/sfc/bitfield.h b/drivers/net/sfc/bitfield.h index d95c21828014..d54d84c267b9 100644 --- a/drivers/net/sfc/bitfield.h +++ b/drivers/net/sfc/bitfield.h | |||
@@ -543,7 +543,7 @@ typedef union efx_oword { | |||
543 | 543 | ||
544 | /* Static initialiser */ | 544 | /* Static initialiser */ |
545 | #define EFX_OWORD32(a, b, c, d) \ | 545 | #define EFX_OWORD32(a, b, c, d) \ |
546 | { .u32 = { __constant_cpu_to_le32(a), __constant_cpu_to_le32(b), \ | 546 | { .u32 = { cpu_to_le32(a), cpu_to_le32(b), \ |
547 | __constant_cpu_to_le32(c), __constant_cpu_to_le32(d) } } | 547 | cpu_to_le32(c), cpu_to_le32(d) } } |
548 | 548 | ||
549 | #endif /* EFX_BITFIELD_H */ | 549 | #endif /* EFX_BITFIELD_H */ |
diff --git a/drivers/net/tun.c b/drivers/net/tun.c index e9bcbdfe015a..457f2d7430cf 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c | |||
@@ -543,7 +543,7 @@ static struct sk_buff *tun_alloc_skb(size_t prepad, size_t len, size_t linear, | |||
543 | /* Get packet from user space buffer */ | 543 | /* Get packet from user space buffer */ |
544 | static __inline__ ssize_t tun_get_user(struct tun_struct *tun, struct iovec *iv, size_t count) | 544 | static __inline__ ssize_t tun_get_user(struct tun_struct *tun, struct iovec *iv, size_t count) |
545 | { | 545 | { |
546 | struct tun_pi pi = { 0, __constant_htons(ETH_P_IP) }; | 546 | struct tun_pi pi = { 0, cpu_to_be16(ETH_P_IP) }; |
547 | struct sk_buff *skb; | 547 | struct sk_buff *skb; |
548 | size_t len = count, align = 0; | 548 | size_t len = count, align = 0; |
549 | struct virtio_net_hdr gso = { 0 }; | 549 | struct virtio_net_hdr gso = { 0 }; |
diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c index 0d0fa91c0251..806cc5da56ce 100644 --- a/drivers/net/usb/hso.c +++ b/drivers/net/usb/hso.c | |||
@@ -934,8 +934,7 @@ static void packetizeRx(struct hso_net *odev, unsigned char *ip_pkt, | |||
934 | if (!odev->rx_buf_missing) { | 934 | if (!odev->rx_buf_missing) { |
935 | /* Packet is complete. Inject into stack. */ | 935 | /* Packet is complete. Inject into stack. */ |
936 | /* We have IP packet here */ | 936 | /* We have IP packet here */ |
937 | odev->skb_rx_buf->protocol = | 937 | odev->skb_rx_buf->protocol = cpu_to_be16(ETH_P_IP); |
938 | __constant_htons(ETH_P_IP); | ||
939 | /* don't check it */ | 938 | /* don't check it */ |
940 | odev->skb_rx_buf->ip_summed = | 939 | odev->skb_rx_buf->ip_summed = |
941 | CHECKSUM_UNNECESSARY; | 940 | CHECKSUM_UNNECESSARY; |
diff --git a/drivers/net/via-velocity.h b/drivers/net/via-velocity.h index 29a33090d3d4..ea43e1832afb 100644 --- a/drivers/net/via-velocity.h +++ b/drivers/net/via-velocity.h | |||
@@ -183,7 +183,7 @@ struct rdesc1 { | |||
183 | }; | 183 | }; |
184 | 184 | ||
185 | enum { | 185 | enum { |
186 | RX_INTEN = __constant_cpu_to_le16(0x8000) | 186 | RX_INTEN = cpu_to_le16(0x8000) |
187 | }; | 187 | }; |
188 | 188 | ||
189 | struct rx_desc { | 189 | struct rx_desc { |
@@ -210,7 +210,7 @@ struct tdesc1 { | |||
210 | } __attribute__ ((__packed__)); | 210 | } __attribute__ ((__packed__)); |
211 | 211 | ||
212 | enum { | 212 | enum { |
213 | TD_QUEUE = __constant_cpu_to_le16(0x8000) | 213 | TD_QUEUE = cpu_to_le16(0x8000) |
214 | }; | 214 | }; |
215 | 215 | ||
216 | struct td_buf { | 216 | struct td_buf { |
@@ -242,7 +242,7 @@ struct velocity_td_info { | |||
242 | 242 | ||
243 | enum velocity_owner { | 243 | enum velocity_owner { |
244 | OWNED_BY_HOST = 0, | 244 | OWNED_BY_HOST = 0, |
245 | OWNED_BY_NIC = __constant_cpu_to_le16(0x8000) | 245 | OWNED_BY_NIC = cpu_to_le16(0x8000) |
246 | }; | 246 | }; |
247 | 247 | ||
248 | 248 | ||
diff --git a/drivers/net/wan/hdlc.c b/drivers/net/wan/hdlc.c index 43da8bd72973..5ce437205558 100644 --- a/drivers/net/wan/hdlc.c +++ b/drivers/net/wan/hdlc.c | |||
@@ -349,7 +349,7 @@ EXPORT_SYMBOL(attach_hdlc_protocol); | |||
349 | EXPORT_SYMBOL(detach_hdlc_protocol); | 349 | EXPORT_SYMBOL(detach_hdlc_protocol); |
350 | 350 | ||
351 | static struct packet_type hdlc_packet_type = { | 351 | static struct packet_type hdlc_packet_type = { |
352 | .type = __constant_htons(ETH_P_HDLC), | 352 | .type = cpu_to_be16(ETH_P_HDLC), |
353 | .func = hdlc_rcv, | 353 | .func = hdlc_rcv, |
354 | }; | 354 | }; |
355 | 355 | ||
diff --git a/drivers/net/wan/hdlc_cisco.c b/drivers/net/wan/hdlc_cisco.c index af3fd4fead8a..cf5fd17ad707 100644 --- a/drivers/net/wan/hdlc_cisco.c +++ b/drivers/net/wan/hdlc_cisco.c | |||
@@ -117,7 +117,7 @@ static void cisco_keepalive_send(struct net_device *dev, u32 type, | |||
117 | data->type = htonl(type); | 117 | data->type = htonl(type); |
118 | data->par1 = par1; | 118 | data->par1 = par1; |
119 | data->par2 = par2; | 119 | data->par2 = par2; |
120 | data->rel = __constant_htons(0xFFFF); | 120 | data->rel = cpu_to_be16(0xFFFF); |
121 | /* we will need do_div here if 1000 % HZ != 0 */ | 121 | /* we will need do_div here if 1000 % HZ != 0 */ |
122 | data->time = htonl((jiffies - INITIAL_JIFFIES) * (1000 / HZ)); | 122 | data->time = htonl((jiffies - INITIAL_JIFFIES) * (1000 / HZ)); |
123 | 123 | ||
@@ -136,20 +136,20 @@ static __be16 cisco_type_trans(struct sk_buff *skb, struct net_device *dev) | |||
136 | struct hdlc_header *data = (struct hdlc_header*)skb->data; | 136 | struct hdlc_header *data = (struct hdlc_header*)skb->data; |
137 | 137 | ||
138 | if (skb->len < sizeof(struct hdlc_header)) | 138 | if (skb->len < sizeof(struct hdlc_header)) |
139 | return __constant_htons(ETH_P_HDLC); | 139 | return cpu_to_be16(ETH_P_HDLC); |
140 | 140 | ||
141 | if (data->address != CISCO_MULTICAST && | 141 | if (data->address != CISCO_MULTICAST && |
142 | data->address != CISCO_UNICAST) | 142 | data->address != CISCO_UNICAST) |
143 | return __constant_htons(ETH_P_HDLC); | 143 | return cpu_to_be16(ETH_P_HDLC); |
144 | 144 | ||
145 | switch(data->protocol) { | 145 | switch(data->protocol) { |
146 | case __constant_htons(ETH_P_IP): | 146 | case cpu_to_be16(ETH_P_IP): |
147 | case __constant_htons(ETH_P_IPX): | 147 | case cpu_to_be16(ETH_P_IPX): |
148 | case __constant_htons(ETH_P_IPV6): | 148 | case cpu_to_be16(ETH_P_IPV6): |
149 | skb_pull(skb, sizeof(struct hdlc_header)); | 149 | skb_pull(skb, sizeof(struct hdlc_header)); |
150 | return data->protocol; | 150 | return data->protocol; |
151 | default: | 151 | default: |
152 | return __constant_htons(ETH_P_HDLC); | 152 | return cpu_to_be16(ETH_P_HDLC); |
153 | } | 153 | } |
154 | } | 154 | } |
155 | 155 | ||
@@ -194,7 +194,7 @@ static int cisco_rx(struct sk_buff *skb) | |||
194 | case CISCO_ADDR_REQ: /* Stolen from syncppp.c :-) */ | 194 | case CISCO_ADDR_REQ: /* Stolen from syncppp.c :-) */ |
195 | in_dev = dev->ip_ptr; | 195 | in_dev = dev->ip_ptr; |
196 | addr = 0; | 196 | addr = 0; |
197 | mask = __constant_htonl(~0); /* is the mask correct? */ | 197 | mask = ~cpu_to_be32(0); /* is the mask correct? */ |
198 | 198 | ||
199 | if (in_dev != NULL) { | 199 | if (in_dev != NULL) { |
200 | struct in_ifaddr **ifap = &in_dev->ifa_list; | 200 | struct in_ifaddr **ifap = &in_dev->ifa_list; |
diff --git a/drivers/net/wan/hdlc_fr.c b/drivers/net/wan/hdlc_fr.c index 70e57cebc955..800530101093 100644 --- a/drivers/net/wan/hdlc_fr.c +++ b/drivers/net/wan/hdlc_fr.c | |||
@@ -278,31 +278,31 @@ static int fr_hard_header(struct sk_buff **skb_p, u16 dlci) | |||
278 | struct sk_buff *skb = *skb_p; | 278 | struct sk_buff *skb = *skb_p; |
279 | 279 | ||
280 | switch (skb->protocol) { | 280 | switch (skb->protocol) { |
281 | case __constant_htons(NLPID_CCITT_ANSI_LMI): | 281 | case cpu_to_be16(NLPID_CCITT_ANSI_LMI): |
282 | head_len = 4; | 282 | head_len = 4; |
283 | skb_push(skb, head_len); | 283 | skb_push(skb, head_len); |
284 | skb->data[3] = NLPID_CCITT_ANSI_LMI; | 284 | skb->data[3] = NLPID_CCITT_ANSI_LMI; |
285 | break; | 285 | break; |
286 | 286 | ||
287 | case __constant_htons(NLPID_CISCO_LMI): | 287 | case cpu_to_be16(NLPID_CISCO_LMI): |
288 | head_len = 4; | 288 | head_len = 4; |
289 | skb_push(skb, head_len); | 289 | skb_push(skb, head_len); |
290 | skb->data[3] = NLPID_CISCO_LMI; | 290 | skb->data[3] = NLPID_CISCO_LMI; |
291 | break; | 291 | break; |
292 | 292 | ||
293 | case __constant_htons(ETH_P_IP): | 293 | case cpu_to_be16(ETH_P_IP): |
294 | head_len = 4; | 294 | head_len = 4; |
295 | skb_push(skb, head_len); | 295 | skb_push(skb, head_len); |
296 | skb->data[3] = NLPID_IP; | 296 | skb->data[3] = NLPID_IP; |
297 | break; | 297 | break; |
298 | 298 | ||
299 | case __constant_htons(ETH_P_IPV6): | 299 | case cpu_to_be16(ETH_P_IPV6): |
300 | head_len = 4; | 300 | head_len = 4; |
301 | skb_push(skb, head_len); | 301 | skb_push(skb, head_len); |
302 | skb->data[3] = NLPID_IPV6; | 302 | skb->data[3] = NLPID_IPV6; |
303 | break; | 303 | break; |
304 | 304 | ||
305 | case __constant_htons(ETH_P_802_3): | 305 | case cpu_to_be16(ETH_P_802_3): |
306 | head_len = 10; | 306 | head_len = 10; |
307 | if (skb_headroom(skb) < head_len) { | 307 | if (skb_headroom(skb) < head_len) { |
308 | struct sk_buff *skb2 = skb_realloc_headroom(skb, | 308 | struct sk_buff *skb2 = skb_realloc_headroom(skb, |
@@ -426,7 +426,7 @@ static int pvc_xmit(struct sk_buff *skb, struct net_device *dev) | |||
426 | skb_put(skb, pad); | 426 | skb_put(skb, pad); |
427 | memset(skb->data + len, 0, pad); | 427 | memset(skb->data + len, 0, pad); |
428 | } | 428 | } |
429 | skb->protocol = __constant_htons(ETH_P_802_3); | 429 | skb->protocol = cpu_to_be16(ETH_P_802_3); |
430 | } | 430 | } |
431 | if (!fr_hard_header(&skb, pvc->dlci)) { | 431 | if (!fr_hard_header(&skb, pvc->dlci)) { |
432 | dev->stats.tx_bytes += skb->len; | 432 | dev->stats.tx_bytes += skb->len; |
@@ -496,10 +496,10 @@ static void fr_lmi_send(struct net_device *dev, int fullrep) | |||
496 | memset(skb->data, 0, len); | 496 | memset(skb->data, 0, len); |
497 | skb_reserve(skb, 4); | 497 | skb_reserve(skb, 4); |
498 | if (lmi == LMI_CISCO) { | 498 | if (lmi == LMI_CISCO) { |
499 | skb->protocol = __constant_htons(NLPID_CISCO_LMI); | 499 | skb->protocol = cpu_to_be16(NLPID_CISCO_LMI); |
500 | fr_hard_header(&skb, LMI_CISCO_DLCI); | 500 | fr_hard_header(&skb, LMI_CISCO_DLCI); |
501 | } else { | 501 | } else { |
502 | skb->protocol = __constant_htons(NLPID_CCITT_ANSI_LMI); | 502 | skb->protocol = cpu_to_be16(NLPID_CCITT_ANSI_LMI); |
503 | fr_hard_header(&skb, LMI_CCITT_ANSI_DLCI); | 503 | fr_hard_header(&skb, LMI_CCITT_ANSI_DLCI); |
504 | } | 504 | } |
505 | data = skb_tail_pointer(skb); | 505 | data = skb_tail_pointer(skb); |
diff --git a/drivers/net/wan/hdlc_ppp.c b/drivers/net/wan/hdlc_ppp.c index 7b8a5eae201d..72a7cdab4245 100644 --- a/drivers/net/wan/hdlc_ppp.c +++ b/drivers/net/wan/hdlc_ppp.c | |||
@@ -150,11 +150,11 @@ static __be16 ppp_type_trans(struct sk_buff *skb, struct net_device *dev) | |||
150 | return htons(ETH_P_HDLC); | 150 | return htons(ETH_P_HDLC); |
151 | 151 | ||
152 | switch (data->protocol) { | 152 | switch (data->protocol) { |
153 | case __constant_htons(PID_IP): | 153 | case cpu_to_be16(PID_IP): |
154 | skb_pull(skb, sizeof(struct hdlc_header)); | 154 | skb_pull(skb, sizeof(struct hdlc_header)); |
155 | return htons(ETH_P_IP); | 155 | return htons(ETH_P_IP); |
156 | 156 | ||
157 | case __constant_htons(PID_IPV6): | 157 | case cpu_to_be16(PID_IPV6): |
158 | skb_pull(skb, sizeof(struct hdlc_header)); | 158 | skb_pull(skb, sizeof(struct hdlc_header)); |
159 | return htons(ETH_P_IPV6); | 159 | return htons(ETH_P_IPV6); |
160 | 160 | ||
diff --git a/drivers/net/wan/hdlc_raw.c b/drivers/net/wan/hdlc_raw.c index 6e92c64ebd0f..19f51fdd5522 100644 --- a/drivers/net/wan/hdlc_raw.c +++ b/drivers/net/wan/hdlc_raw.c | |||
@@ -27,7 +27,7 @@ static int raw_ioctl(struct net_device *dev, struct ifreq *ifr); | |||
27 | 27 | ||
28 | static __be16 raw_type_trans(struct sk_buff *skb, struct net_device *dev) | 28 | static __be16 raw_type_trans(struct sk_buff *skb, struct net_device *dev) |
29 | { | 29 | { |
30 | return __constant_htons(ETH_P_IP); | 30 | return cpu_to_be16(ETH_P_IP); |
31 | } | 31 | } |
32 | 32 | ||
33 | static struct hdlc_proto proto = { | 33 | static struct hdlc_proto proto = { |
diff --git a/drivers/net/wan/lapbether.c b/drivers/net/wan/lapbether.c index 5b61b3eef45f..da9dcf59de24 100644 --- a/drivers/net/wan/lapbether.c +++ b/drivers/net/wan/lapbether.c | |||
@@ -422,7 +422,7 @@ static int lapbeth_device_event(struct notifier_block *this, | |||
422 | /* ------------------------------------------------------------------------ */ | 422 | /* ------------------------------------------------------------------------ */ |
423 | 423 | ||
424 | static struct packet_type lapbeth_packet_type = { | 424 | static struct packet_type lapbeth_packet_type = { |
425 | .type = __constant_htons(ETH_P_DEC), | 425 | .type = cpu_to_be16(ETH_P_DEC), |
426 | .func = lapbeth_rcv, | 426 | .func = lapbeth_rcv, |
427 | }; | 427 | }; |
428 | 428 | ||
diff --git a/net/802/psnap.c b/net/802/psnap.c index 70980baeb682..6ed711748f26 100644 --- a/net/802/psnap.c +++ b/net/802/psnap.c | |||
@@ -51,7 +51,7 @@ static int snap_rcv(struct sk_buff *skb, struct net_device *dev, | |||
51 | int rc = 1; | 51 | int rc = 1; |
52 | struct datalink_proto *proto; | 52 | struct datalink_proto *proto; |
53 | static struct packet_type snap_packet_type = { | 53 | static struct packet_type snap_packet_type = { |
54 | .type = __constant_htons(ETH_P_SNAP), | 54 | .type = cpu_to_be16(ETH_P_SNAP), |
55 | }; | 55 | }; |
56 | 56 | ||
57 | if (unlikely(!pskb_may_pull(skb, 5))) | 57 | if (unlikely(!pskb_may_pull(skb, 5))) |
diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c index 41e8f65bd3f0..4163ea65bf41 100644 --- a/net/8021q/vlan.c +++ b/net/8021q/vlan.c | |||
@@ -52,7 +52,7 @@ static const char vlan_copyright[] = "Ben Greear <greearb@candelatech.com>"; | |||
52 | static const char vlan_buggyright[] = "David S. Miller <davem@redhat.com>"; | 52 | static const char vlan_buggyright[] = "David S. Miller <davem@redhat.com>"; |
53 | 53 | ||
54 | static struct packet_type vlan_packet_type = { | 54 | static struct packet_type vlan_packet_type = { |
55 | .type = __constant_htons(ETH_P_8021Q), | 55 | .type = cpu_to_be16(ETH_P_8021Q), |
56 | .func = vlan_skb_recv, /* VLAN receive method */ | 56 | .func = vlan_skb_recv, /* VLAN receive method */ |
57 | }; | 57 | }; |
58 | 58 | ||
diff --git a/net/appletalk/ddp.c b/net/appletalk/ddp.c index 5abce07fb50a..510a6782da8f 100644 --- a/net/appletalk/ddp.c +++ b/net/appletalk/ddp.c | |||
@@ -1861,12 +1861,12 @@ static struct notifier_block ddp_notifier = { | |||
1861 | }; | 1861 | }; |
1862 | 1862 | ||
1863 | static struct packet_type ltalk_packet_type = { | 1863 | static struct packet_type ltalk_packet_type = { |
1864 | .type = __constant_htons(ETH_P_LOCALTALK), | 1864 | .type = cpu_to_be16(ETH_P_LOCALTALK), |
1865 | .func = ltalk_rcv, | 1865 | .func = ltalk_rcv, |
1866 | }; | 1866 | }; |
1867 | 1867 | ||
1868 | static struct packet_type ppptalk_packet_type = { | 1868 | static struct packet_type ppptalk_packet_type = { |
1869 | .type = __constant_htons(ETH_P_PPPTALK), | 1869 | .type = cpu_to_be16(ETH_P_PPPTALK), |
1870 | .func = atalk_rcv, | 1870 | .func = atalk_rcv, |
1871 | }; | 1871 | }; |
1872 | 1872 | ||
diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c index 00d9e5e13158..d127fd3ba5c6 100644 --- a/net/ax25/af_ax25.c +++ b/net/ax25/af_ax25.c | |||
@@ -1986,7 +1986,7 @@ static const struct proto_ops ax25_proto_ops = { | |||
1986 | * Called by socket.c on kernel start up | 1986 | * Called by socket.c on kernel start up |
1987 | */ | 1987 | */ |
1988 | static struct packet_type ax25_packet_type = { | 1988 | static struct packet_type ax25_packet_type = { |
1989 | .type = __constant_htons(ETH_P_AX25), | 1989 | .type = cpu_to_be16(ETH_P_AX25), |
1990 | .dev = NULL, /* All devices */ | 1990 | .dev = NULL, /* All devices */ |
1991 | .func = ax25_kiss_rcv, | 1991 | .func = ax25_kiss_rcv, |
1992 | }; | 1992 | }; |
diff --git a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c index cf754ace0b75..3953ac4214c8 100644 --- a/net/bridge/br_netfilter.c +++ b/net/bridge/br_netfilter.c | |||
@@ -107,7 +107,7 @@ static void fake_update_pmtu(struct dst_entry *dst, u32 mtu) | |||
107 | 107 | ||
108 | static struct dst_ops fake_dst_ops = { | 108 | static struct dst_ops fake_dst_ops = { |
109 | .family = AF_INET, | 109 | .family = AF_INET, |
110 | .protocol = __constant_htons(ETH_P_IP), | 110 | .protocol = cpu_to_be16(ETH_P_IP), |
111 | .update_pmtu = fake_update_pmtu, | 111 | .update_pmtu = fake_update_pmtu, |
112 | .entries = ATOMIC_INIT(0), | 112 | .entries = ATOMIC_INIT(0), |
113 | }; | 113 | }; |
diff --git a/net/can/af_can.c b/net/can/af_can.c index fa417ca6cbe6..d90e8dd975fc 100644 --- a/net/can/af_can.c +++ b/net/can/af_can.c | |||
@@ -828,7 +828,7 @@ static int can_notifier(struct notifier_block *nb, unsigned long msg, | |||
828 | */ | 828 | */ |
829 | 829 | ||
830 | static struct packet_type can_packet __read_mostly = { | 830 | static struct packet_type can_packet __read_mostly = { |
831 | .type = __constant_htons(ETH_P_CAN), | 831 | .type = cpu_to_be16(ETH_P_CAN), |
832 | .dev = NULL, | 832 | .dev = NULL, |
833 | .func = can_rcv, | 833 | .func = can_rcv, |
834 | }; | 834 | }; |
diff --git a/net/decnet/af_decnet.c b/net/decnet/af_decnet.c index cf0e18499297..12bf7d4c16c6 100644 --- a/net/decnet/af_decnet.c +++ b/net/decnet/af_decnet.c | |||
@@ -2113,7 +2113,7 @@ static struct notifier_block dn_dev_notifier = { | |||
2113 | extern int dn_route_rcv(struct sk_buff *, struct net_device *, struct packet_type *, struct net_device *); | 2113 | extern int dn_route_rcv(struct sk_buff *, struct net_device *, struct packet_type *, struct net_device *); |
2114 | 2114 | ||
2115 | static struct packet_type dn_dix_packet_type = { | 2115 | static struct packet_type dn_dix_packet_type = { |
2116 | .type = __constant_htons(ETH_P_DNA_RT), | 2116 | .type = cpu_to_be16(ETH_P_DNA_RT), |
2117 | .dev = NULL, /* All devices */ | 2117 | .dev = NULL, /* All devices */ |
2118 | .func = dn_route_rcv, | 2118 | .func = dn_route_rcv, |
2119 | }; | 2119 | }; |
diff --git a/net/decnet/dn_route.c b/net/decnet/dn_route.c index c754670b7fca..5130dee0b384 100644 --- a/net/decnet/dn_route.c +++ b/net/decnet/dn_route.c | |||
@@ -124,7 +124,7 @@ int decnet_dst_gc_interval = 2; | |||
124 | 124 | ||
125 | static struct dst_ops dn_dst_ops = { | 125 | static struct dst_ops dn_dst_ops = { |
126 | .family = PF_DECnet, | 126 | .family = PF_DECnet, |
127 | .protocol = __constant_htons(ETH_P_DNA_RT), | 127 | .protocol = cpu_to_be16(ETH_P_DNA_RT), |
128 | .gc_thresh = 128, | 128 | .gc_thresh = 128, |
129 | .gc = dn_dst_gc, | 129 | .gc = dn_dst_gc, |
130 | .check = dn_dst_check, | 130 | .check = dn_dst_check, |
diff --git a/net/dsa/mv88e6123_61_65.c b/net/dsa/mv88e6123_61_65.c index ec8c6a0482d3..100318722214 100644 --- a/net/dsa/mv88e6123_61_65.c +++ b/net/dsa/mv88e6123_61_65.c | |||
@@ -394,7 +394,7 @@ static int mv88e6123_61_65_get_sset_count(struct dsa_switch *ds) | |||
394 | } | 394 | } |
395 | 395 | ||
396 | static struct dsa_switch_driver mv88e6123_61_65_switch_driver = { | 396 | static struct dsa_switch_driver mv88e6123_61_65_switch_driver = { |
397 | .tag_protocol = __constant_htons(ETH_P_EDSA), | 397 | .tag_protocol = cpu_to_be16(ETH_P_EDSA), |
398 | .priv_size = sizeof(struct mv88e6xxx_priv_state), | 398 | .priv_size = sizeof(struct mv88e6xxx_priv_state), |
399 | .probe = mv88e6123_61_65_probe, | 399 | .probe = mv88e6123_61_65_probe, |
400 | .setup = mv88e6123_61_65_setup, | 400 | .setup = mv88e6123_61_65_setup, |
diff --git a/net/dsa/mv88e6131.c b/net/dsa/mv88e6131.c index 374d46a01265..70fae2444cb6 100644 --- a/net/dsa/mv88e6131.c +++ b/net/dsa/mv88e6131.c | |||
@@ -353,7 +353,7 @@ static int mv88e6131_get_sset_count(struct dsa_switch *ds) | |||
353 | } | 353 | } |
354 | 354 | ||
355 | static struct dsa_switch_driver mv88e6131_switch_driver = { | 355 | static struct dsa_switch_driver mv88e6131_switch_driver = { |
356 | .tag_protocol = __constant_htons(ETH_P_DSA), | 356 | .tag_protocol = cpu_to_be16(ETH_P_DSA), |
357 | .priv_size = sizeof(struct mv88e6xxx_priv_state), | 357 | .priv_size = sizeof(struct mv88e6xxx_priv_state), |
358 | .probe = mv88e6131_probe, | 358 | .probe = mv88e6131_probe, |
359 | .setup = mv88e6131_setup, | 359 | .setup = mv88e6131_setup, |
diff --git a/net/dsa/tag_dsa.c b/net/dsa/tag_dsa.c index f99a019b939e..63e532a69fdb 100644 --- a/net/dsa/tag_dsa.c +++ b/net/dsa/tag_dsa.c | |||
@@ -176,7 +176,7 @@ out: | |||
176 | } | 176 | } |
177 | 177 | ||
178 | static struct packet_type dsa_packet_type = { | 178 | static struct packet_type dsa_packet_type = { |
179 | .type = __constant_htons(ETH_P_DSA), | 179 | .type = cpu_to_be16(ETH_P_DSA), |
180 | .func = dsa_rcv, | 180 | .func = dsa_rcv, |
181 | }; | 181 | }; |
182 | 182 | ||
diff --git a/net/dsa/tag_edsa.c b/net/dsa/tag_edsa.c index 328ec957f786..6197f9a7ef42 100644 --- a/net/dsa/tag_edsa.c +++ b/net/dsa/tag_edsa.c | |||
@@ -195,7 +195,7 @@ out: | |||
195 | } | 195 | } |
196 | 196 | ||
197 | static struct packet_type edsa_packet_type = { | 197 | static struct packet_type edsa_packet_type = { |
198 | .type = __constant_htons(ETH_P_EDSA), | 198 | .type = cpu_to_be16(ETH_P_EDSA), |
199 | .func = edsa_rcv, | 199 | .func = edsa_rcv, |
200 | }; | 200 | }; |
201 | 201 | ||
diff --git a/net/dsa/tag_trailer.c b/net/dsa/tag_trailer.c index b59132878ad1..d7e7f424ff0c 100644 --- a/net/dsa/tag_trailer.c +++ b/net/dsa/tag_trailer.c | |||
@@ -112,7 +112,7 @@ out: | |||
112 | } | 112 | } |
113 | 113 | ||
114 | static struct packet_type trailer_packet_type = { | 114 | static struct packet_type trailer_packet_type = { |
115 | .type = __constant_htons(ETH_P_TRAILER), | 115 | .type = cpu_to_be16(ETH_P_TRAILER), |
116 | .func = trailer_rcv, | 116 | .func = trailer_rcv, |
117 | }; | 117 | }; |
118 | 118 | ||
diff --git a/net/econet/af_econet.c b/net/econet/af_econet.c index 8789d2bb1b06..7bf35582f656 100644 --- a/net/econet/af_econet.c +++ b/net/econet/af_econet.c | |||
@@ -1103,7 +1103,7 @@ drop: | |||
1103 | } | 1103 | } |
1104 | 1104 | ||
1105 | static struct packet_type econet_packet_type = { | 1105 | static struct packet_type econet_packet_type = { |
1106 | .type = __constant_htons(ETH_P_ECONET), | 1106 | .type = cpu_to_be16(ETH_P_ECONET), |
1107 | .func = econet_rcv, | 1107 | .func = econet_rcv, |
1108 | }; | 1108 | }; |
1109 | 1109 | ||
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c index d6770f295d5b..957cd054732c 100644 --- a/net/ipv4/af_inet.c +++ b/net/ipv4/af_inet.c | |||
@@ -1501,7 +1501,7 @@ static int ipv4_proc_init(void); | |||
1501 | */ | 1501 | */ |
1502 | 1502 | ||
1503 | static struct packet_type ip_packet_type = { | 1503 | static struct packet_type ip_packet_type = { |
1504 | .type = __constant_htons(ETH_P_IP), | 1504 | .type = cpu_to_be16(ETH_P_IP), |
1505 | .func = ip_rcv, | 1505 | .func = ip_rcv, |
1506 | .gso_send_check = inet_gso_send_check, | 1506 | .gso_send_check = inet_gso_send_check, |
1507 | .gso_segment = inet_gso_segment, | 1507 | .gso_segment = inet_gso_segment, |
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c index 29a74c01d8de..3f6b7354699b 100644 --- a/net/ipv4/arp.c +++ b/net/ipv4/arp.c | |||
@@ -1226,7 +1226,7 @@ void arp_ifdown(struct net_device *dev) | |||
1226 | */ | 1226 | */ |
1227 | 1227 | ||
1228 | static struct packet_type arp_packet_type = { | 1228 | static struct packet_type arp_packet_type = { |
1229 | .type = __constant_htons(ETH_P_ARP), | 1229 | .type = cpu_to_be16(ETH_P_ARP), |
1230 | .func = arp_rcv, | 1230 | .func = arp_rcv, |
1231 | }; | 1231 | }; |
1232 | 1232 | ||
diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c index d722013c1cae..90d22ae0a419 100644 --- a/net/ipv4/ipconfig.c +++ b/net/ipv4/ipconfig.c | |||
@@ -100,8 +100,8 @@ | |||
100 | #define CONF_NAMESERVERS_MAX 3 /* Maximum number of nameservers | 100 | #define CONF_NAMESERVERS_MAX 3 /* Maximum number of nameservers |
101 | - '3' from resolv.h */ | 101 | - '3' from resolv.h */ |
102 | 102 | ||
103 | #define NONE __constant_htonl(INADDR_NONE) | 103 | #define NONE cpu_to_be32(INADDR_NONE) |
104 | #define ANY __constant_htonl(INADDR_ANY) | 104 | #define ANY cpu_to_be32(INADDR_ANY) |
105 | 105 | ||
106 | /* | 106 | /* |
107 | * Public IP configuration | 107 | * Public IP configuration |
@@ -406,7 +406,7 @@ static int __init ic_defaults(void) | |||
406 | static int ic_rarp_recv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev); | 406 | static int ic_rarp_recv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev); |
407 | 407 | ||
408 | static struct packet_type rarp_packet_type __initdata = { | 408 | static struct packet_type rarp_packet_type __initdata = { |
409 | .type = __constant_htons(ETH_P_RARP), | 409 | .type = cpu_to_be16(ETH_P_RARP), |
410 | .func = ic_rarp_recv, | 410 | .func = ic_rarp_recv, |
411 | }; | 411 | }; |
412 | 412 | ||
@@ -568,7 +568,7 @@ struct bootp_pkt { /* BOOTP packet format */ | |||
568 | static int ic_bootp_recv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev); | 568 | static int ic_bootp_recv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev); |
569 | 569 | ||
570 | static struct packet_type bootp_packet_type __initdata = { | 570 | static struct packet_type bootp_packet_type __initdata = { |
571 | .type = __constant_htons(ETH_P_IP), | 571 | .type = cpu_to_be16(ETH_P_IP), |
572 | .func = ic_bootp_recv, | 572 | .func = ic_bootp_recv, |
573 | }; | 573 | }; |
574 | 574 | ||
diff --git a/net/ipv4/netfilter/nf_nat_snmp_basic.c b/net/ipv4/netfilter/nf_nat_snmp_basic.c index 182f845de92f..d9521f6f9ed0 100644 --- a/net/ipv4/netfilter/nf_nat_snmp_basic.c +++ b/net/ipv4/netfilter/nf_nat_snmp_basic.c | |||
@@ -1292,7 +1292,7 @@ static struct nf_conntrack_helper snmp_helper __read_mostly = { | |||
1292 | .expect_policy = &snmp_exp_policy, | 1292 | .expect_policy = &snmp_exp_policy, |
1293 | .name = "snmp", | 1293 | .name = "snmp", |
1294 | .tuple.src.l3num = AF_INET, | 1294 | .tuple.src.l3num = AF_INET, |
1295 | .tuple.src.u.udp.port = __constant_htons(SNMP_PORT), | 1295 | .tuple.src.u.udp.port = cpu_to_be16(SNMP_PORT), |
1296 | .tuple.dst.protonum = IPPROTO_UDP, | 1296 | .tuple.dst.protonum = IPPROTO_UDP, |
1297 | }; | 1297 | }; |
1298 | 1298 | ||
@@ -1302,7 +1302,7 @@ static struct nf_conntrack_helper snmp_trap_helper __read_mostly = { | |||
1302 | .expect_policy = &snmp_exp_policy, | 1302 | .expect_policy = &snmp_exp_policy, |
1303 | .name = "snmp_trap", | 1303 | .name = "snmp_trap", |
1304 | .tuple.src.l3num = AF_INET, | 1304 | .tuple.src.l3num = AF_INET, |
1305 | .tuple.src.u.udp.port = __constant_htons(SNMP_TRAP_PORT), | 1305 | .tuple.src.u.udp.port = cpu_to_be16(SNMP_TRAP_PORT), |
1306 | .tuple.dst.protonum = IPPROTO_UDP, | 1306 | .tuple.dst.protonum = IPPROTO_UDP, |
1307 | }; | 1307 | }; |
1308 | 1308 | ||
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 6a9e204c8024..5caee609be06 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
@@ -151,7 +151,7 @@ static void rt_emergency_hash_rebuild(struct net *net); | |||
151 | 151 | ||
152 | static struct dst_ops ipv4_dst_ops = { | 152 | static struct dst_ops ipv4_dst_ops = { |
153 | .family = AF_INET, | 153 | .family = AF_INET, |
154 | .protocol = __constant_htons(ETH_P_IP), | 154 | .protocol = cpu_to_be16(ETH_P_IP), |
155 | .gc = rt_garbage_collect, | 155 | .gc = rt_garbage_collect, |
156 | .check = ipv4_dst_check, | 156 | .check = ipv4_dst_check, |
157 | .destroy = ipv4_dst_destroy, | 157 | .destroy = ipv4_dst_destroy, |
@@ -2696,7 +2696,7 @@ static void ipv4_rt_blackhole_update_pmtu(struct dst_entry *dst, u32 mtu) | |||
2696 | 2696 | ||
2697 | static struct dst_ops ipv4_dst_blackhole_ops = { | 2697 | static struct dst_ops ipv4_dst_blackhole_ops = { |
2698 | .family = AF_INET, | 2698 | .family = AF_INET, |
2699 | .protocol = __constant_htons(ETH_P_IP), | 2699 | .protocol = cpu_to_be16(ETH_P_IP), |
2700 | .destroy = ipv4_dst_destroy, | 2700 | .destroy = ipv4_dst_destroy, |
2701 | .check = ipv4_dst_check, | 2701 | .check = ipv4_dst_check, |
2702 | .update_pmtu = ipv4_rt_blackhole_update_pmtu, | 2702 | .update_pmtu = ipv4_rt_blackhole_update_pmtu, |
diff --git a/net/ipv4/xfrm4_policy.c b/net/ipv4/xfrm4_policy.c index 2ad24ba31f9d..60d918c96a4f 100644 --- a/net/ipv4/xfrm4_policy.c +++ b/net/ipv4/xfrm4_policy.c | |||
@@ -241,7 +241,7 @@ static void xfrm4_dst_ifdown(struct dst_entry *dst, struct net_device *dev, | |||
241 | 241 | ||
242 | static struct dst_ops xfrm4_dst_ops = { | 242 | static struct dst_ops xfrm4_dst_ops = { |
243 | .family = AF_INET, | 243 | .family = AF_INET, |
244 | .protocol = __constant_htons(ETH_P_IP), | 244 | .protocol = cpu_to_be16(ETH_P_IP), |
245 | .gc = xfrm4_garbage_collect, | 245 | .gc = xfrm4_garbage_collect, |
246 | .update_pmtu = xfrm4_update_pmtu, | 246 | .update_pmtu = xfrm4_update_pmtu, |
247 | .destroy = xfrm4_dst_destroy, | 247 | .destroy = xfrm4_dst_destroy, |
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c index bd91eadcbe3f..fa2ac7ee662f 100644 --- a/net/ipv6/af_inet6.c +++ b/net/ipv6/af_inet6.c | |||
@@ -890,7 +890,7 @@ out_unlock: | |||
890 | } | 890 | } |
891 | 891 | ||
892 | static struct packet_type ipv6_packet_type = { | 892 | static struct packet_type ipv6_packet_type = { |
893 | .type = __constant_htons(ETH_P_IPV6), | 893 | .type = cpu_to_be16(ETH_P_IPV6), |
894 | .func = ipv6_rcv, | 894 | .func = ipv6_rcv, |
895 | .gso_send_check = ipv6_gso_send_check, | 895 | .gso_send_check = ipv6_gso_send_check, |
896 | .gso_segment = ipv6_gso_segment, | 896 | .gso_segment = ipv6_gso_segment, |
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 9c574235c905..c3d486a3edad 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
@@ -98,7 +98,7 @@ static struct rt6_info *rt6_get_route_info(struct net *net, | |||
98 | 98 | ||
99 | static struct dst_ops ip6_dst_ops_template = { | 99 | static struct dst_ops ip6_dst_ops_template = { |
100 | .family = AF_INET6, | 100 | .family = AF_INET6, |
101 | .protocol = __constant_htons(ETH_P_IPV6), | 101 | .protocol = cpu_to_be16(ETH_P_IPV6), |
102 | .gc = ip6_dst_gc, | 102 | .gc = ip6_dst_gc, |
103 | .gc_thresh = 1024, | 103 | .gc_thresh = 1024, |
104 | .check = ip6_dst_check, | 104 | .check = ip6_dst_check, |
@@ -117,7 +117,7 @@ static void ip6_rt_blackhole_update_pmtu(struct dst_entry *dst, u32 mtu) | |||
117 | 117 | ||
118 | static struct dst_ops ip6_dst_blackhole_ops = { | 118 | static struct dst_ops ip6_dst_blackhole_ops = { |
119 | .family = AF_INET6, | 119 | .family = AF_INET6, |
120 | .protocol = __constant_htons(ETH_P_IPV6), | 120 | .protocol = cpu_to_be16(ETH_P_IPV6), |
121 | .destroy = ip6_dst_destroy, | 121 | .destroy = ip6_dst_destroy, |
122 | .check = ip6_dst_check, | 122 | .check = ip6_dst_check, |
123 | .update_pmtu = ip6_rt_blackhole_update_pmtu, | 123 | .update_pmtu = ip6_rt_blackhole_update_pmtu, |
diff --git a/net/ipv6/xfrm6_policy.c b/net/ipv6/xfrm6_policy.c index 97ab068e8ccc..b4b16a43f277 100644 --- a/net/ipv6/xfrm6_policy.c +++ b/net/ipv6/xfrm6_policy.c | |||
@@ -272,7 +272,7 @@ static void xfrm6_dst_ifdown(struct dst_entry *dst, struct net_device *dev, | |||
272 | 272 | ||
273 | static struct dst_ops xfrm6_dst_ops = { | 273 | static struct dst_ops xfrm6_dst_ops = { |
274 | .family = AF_INET6, | 274 | .family = AF_INET6, |
275 | .protocol = __constant_htons(ETH_P_IPV6), | 275 | .protocol = cpu_to_be16(ETH_P_IPV6), |
276 | .gc = xfrm6_garbage_collect, | 276 | .gc = xfrm6_garbage_collect, |
277 | .update_pmtu = xfrm6_update_pmtu, | 277 | .update_pmtu = xfrm6_update_pmtu, |
278 | .destroy = xfrm6_dst_destroy, | 278 | .destroy = xfrm6_dst_destroy, |
diff --git a/net/ipx/af_ipx.c b/net/ipx/af_ipx.c index b6e70f92e7fb..43d0ffc6d565 100644 --- a/net/ipx/af_ipx.c +++ b/net/ipx/af_ipx.c | |||
@@ -1959,12 +1959,12 @@ static const struct proto_ops SOCKOPS_WRAPPED(ipx_dgram_ops) = { | |||
1959 | SOCKOPS_WRAP(ipx_dgram, PF_IPX); | 1959 | SOCKOPS_WRAP(ipx_dgram, PF_IPX); |
1960 | 1960 | ||
1961 | static struct packet_type ipx_8023_packet_type = { | 1961 | static struct packet_type ipx_8023_packet_type = { |
1962 | .type = __constant_htons(ETH_P_802_3), | 1962 | .type = cpu_to_be16(ETH_P_802_3), |
1963 | .func = ipx_rcv, | 1963 | .func = ipx_rcv, |
1964 | }; | 1964 | }; |
1965 | 1965 | ||
1966 | static struct packet_type ipx_dix_packet_type = { | 1966 | static struct packet_type ipx_dix_packet_type = { |
1967 | .type = __constant_htons(ETH_P_IPX), | 1967 | .type = cpu_to_be16(ETH_P_IPX), |
1968 | .func = ipx_rcv, | 1968 | .func = ipx_rcv, |
1969 | }; | 1969 | }; |
1970 | 1970 | ||
diff --git a/net/irda/irmod.c b/net/irda/irmod.c index 4c487a883725..1bb607f2f5c7 100644 --- a/net/irda/irmod.c +++ b/net/irda/irmod.c | |||
@@ -56,7 +56,7 @@ EXPORT_SYMBOL(irda_debug); | |||
56 | * Tell the kernel how IrDA packets should be handled. | 56 | * Tell the kernel how IrDA packets should be handled. |
57 | */ | 57 | */ |
58 | static struct packet_type irda_packet_type = { | 58 | static struct packet_type irda_packet_type = { |
59 | .type = __constant_htons(ETH_P_IRDA), | 59 | .type = cpu_to_be16(ETH_P_IRDA), |
60 | .func = irlap_driver_rcv, /* Packet type handler irlap_frame.c */ | 60 | .func = irlap_driver_rcv, /* Packet type handler irlap_frame.c */ |
61 | }; | 61 | }; |
62 | 62 | ||
diff --git a/net/llc/llc_core.c b/net/llc/llc_core.c index 50d5b10e23a2..a7fe1adc378d 100644 --- a/net/llc/llc_core.c +++ b/net/llc/llc_core.c | |||
@@ -148,12 +148,12 @@ void llc_sap_close(struct llc_sap *sap) | |||
148 | } | 148 | } |
149 | 149 | ||
150 | static struct packet_type llc_packet_type = { | 150 | static struct packet_type llc_packet_type = { |
151 | .type = __constant_htons(ETH_P_802_2), | 151 | .type = cpu_to_be16(ETH_P_802_2), |
152 | .func = llc_rcv, | 152 | .func = llc_rcv, |
153 | }; | 153 | }; |
154 | 154 | ||
155 | static struct packet_type llc_tr_packet_type = { | 155 | static struct packet_type llc_tr_packet_type = { |
156 | .type = __constant_htons(ETH_P_TR_802_2), | 156 | .type = cpu_to_be16(ETH_P_TR_802_2), |
157 | .func = llc_rcv, | 157 | .func = llc_rcv, |
158 | }; | 158 | }; |
159 | 159 | ||
diff --git a/net/netfilter/ipvs/ip_vs_sync.c b/net/netfilter/ipvs/ip_vs_sync.c index 6be5d4efa51b..5c48378a852f 100644 --- a/net/netfilter/ipvs/ip_vs_sync.c +++ b/net/netfilter/ipvs/ip_vs_sync.c | |||
@@ -149,8 +149,8 @@ static struct task_struct *sync_backup_thread; | |||
149 | /* multicast addr */ | 149 | /* multicast addr */ |
150 | static struct sockaddr_in mcast_addr = { | 150 | static struct sockaddr_in mcast_addr = { |
151 | .sin_family = AF_INET, | 151 | .sin_family = AF_INET, |
152 | .sin_port = __constant_htons(IP_VS_SYNC_PORT), | 152 | .sin_port = cpu_to_be16(IP_VS_SYNC_PORT), |
153 | .sin_addr.s_addr = __constant_htonl(IP_VS_SYNC_GROUP), | 153 | .sin_addr.s_addr = cpu_to_be32(IP_VS_SYNC_GROUP), |
154 | }; | 154 | }; |
155 | 155 | ||
156 | 156 | ||
diff --git a/net/netfilter/nf_conntrack_amanda.c b/net/netfilter/nf_conntrack_amanda.c index 4f8fcf498545..07d9d8857e5d 100644 --- a/net/netfilter/nf_conntrack_amanda.c +++ b/net/netfilter/nf_conntrack_amanda.c | |||
@@ -177,7 +177,7 @@ static struct nf_conntrack_helper amanda_helper[2] __read_mostly = { | |||
177 | .me = THIS_MODULE, | 177 | .me = THIS_MODULE, |
178 | .help = amanda_help, | 178 | .help = amanda_help, |
179 | .tuple.src.l3num = AF_INET, | 179 | .tuple.src.l3num = AF_INET, |
180 | .tuple.src.u.udp.port = __constant_htons(10080), | 180 | .tuple.src.u.udp.port = cpu_to_be16(10080), |
181 | .tuple.dst.protonum = IPPROTO_UDP, | 181 | .tuple.dst.protonum = IPPROTO_UDP, |
182 | .expect_policy = &amanda_exp_policy, | 182 | .expect_policy = &amanda_exp_policy, |
183 | }, | 183 | }, |
@@ -186,7 +186,7 @@ static struct nf_conntrack_helper amanda_helper[2] __read_mostly = { | |||
186 | .me = THIS_MODULE, | 186 | .me = THIS_MODULE, |
187 | .help = amanda_help, | 187 | .help = amanda_help, |
188 | .tuple.src.l3num = AF_INET6, | 188 | .tuple.src.l3num = AF_INET6, |
189 | .tuple.src.u.udp.port = __constant_htons(10080), | 189 | .tuple.src.u.udp.port = cpu_to_be16(10080), |
190 | .tuple.dst.protonum = IPPROTO_UDP, | 190 | .tuple.dst.protonum = IPPROTO_UDP, |
191 | .expect_policy = &amanda_exp_policy, | 191 | .expect_policy = &amanda_exp_policy, |
192 | }, | 192 | }, |
diff --git a/net/netfilter/nf_conntrack_h323_main.c b/net/netfilter/nf_conntrack_h323_main.c index 687bd633c3d7..66369490230e 100644 --- a/net/netfilter/nf_conntrack_h323_main.c +++ b/net/netfilter/nf_conntrack_h323_main.c | |||
@@ -1167,7 +1167,7 @@ static struct nf_conntrack_helper nf_conntrack_helper_q931[] __read_mostly = { | |||
1167 | .name = "Q.931", | 1167 | .name = "Q.931", |
1168 | .me = THIS_MODULE, | 1168 | .me = THIS_MODULE, |
1169 | .tuple.src.l3num = AF_INET, | 1169 | .tuple.src.l3num = AF_INET, |
1170 | .tuple.src.u.tcp.port = __constant_htons(Q931_PORT), | 1170 | .tuple.src.u.tcp.port = cpu_to_be16(Q931_PORT), |
1171 | .tuple.dst.protonum = IPPROTO_TCP, | 1171 | .tuple.dst.protonum = IPPROTO_TCP, |
1172 | .help = q931_help, | 1172 | .help = q931_help, |
1173 | .expect_policy = &q931_exp_policy, | 1173 | .expect_policy = &q931_exp_policy, |
@@ -1176,7 +1176,7 @@ static struct nf_conntrack_helper nf_conntrack_helper_q931[] __read_mostly = { | |||
1176 | .name = "Q.931", | 1176 | .name = "Q.931", |
1177 | .me = THIS_MODULE, | 1177 | .me = THIS_MODULE, |
1178 | .tuple.src.l3num = AF_INET6, | 1178 | .tuple.src.l3num = AF_INET6, |
1179 | .tuple.src.u.tcp.port = __constant_htons(Q931_PORT), | 1179 | .tuple.src.u.tcp.port = cpu_to_be16(Q931_PORT), |
1180 | .tuple.dst.protonum = IPPROTO_TCP, | 1180 | .tuple.dst.protonum = IPPROTO_TCP, |
1181 | .help = q931_help, | 1181 | .help = q931_help, |
1182 | .expect_policy = &q931_exp_policy, | 1182 | .expect_policy = &q931_exp_policy, |
@@ -1741,7 +1741,7 @@ static struct nf_conntrack_helper nf_conntrack_helper_ras[] __read_mostly = { | |||
1741 | .name = "RAS", | 1741 | .name = "RAS", |
1742 | .me = THIS_MODULE, | 1742 | .me = THIS_MODULE, |
1743 | .tuple.src.l3num = AF_INET, | 1743 | .tuple.src.l3num = AF_INET, |
1744 | .tuple.src.u.udp.port = __constant_htons(RAS_PORT), | 1744 | .tuple.src.u.udp.port = cpu_to_be16(RAS_PORT), |
1745 | .tuple.dst.protonum = IPPROTO_UDP, | 1745 | .tuple.dst.protonum = IPPROTO_UDP, |
1746 | .help = ras_help, | 1746 | .help = ras_help, |
1747 | .expect_policy = &ras_exp_policy, | 1747 | .expect_policy = &ras_exp_policy, |
@@ -1750,7 +1750,7 @@ static struct nf_conntrack_helper nf_conntrack_helper_ras[] __read_mostly = { | |||
1750 | .name = "RAS", | 1750 | .name = "RAS", |
1751 | .me = THIS_MODULE, | 1751 | .me = THIS_MODULE, |
1752 | .tuple.src.l3num = AF_INET6, | 1752 | .tuple.src.l3num = AF_INET6, |
1753 | .tuple.src.u.udp.port = __constant_htons(RAS_PORT), | 1753 | .tuple.src.u.udp.port = cpu_to_be16(RAS_PORT), |
1754 | .tuple.dst.protonum = IPPROTO_UDP, | 1754 | .tuple.dst.protonum = IPPROTO_UDP, |
1755 | .help = ras_help, | 1755 | .help = ras_help, |
1756 | .expect_policy = &ras_exp_policy, | 1756 | .expect_policy = &ras_exp_policy, |
diff --git a/net/netfilter/nf_conntrack_netbios_ns.c b/net/netfilter/nf_conntrack_netbios_ns.c index 5af4273b4668..8a3875e36ec2 100644 --- a/net/netfilter/nf_conntrack_netbios_ns.c +++ b/net/netfilter/nf_conntrack_netbios_ns.c | |||
@@ -105,7 +105,7 @@ static struct nf_conntrack_expect_policy exp_policy = { | |||
105 | static struct nf_conntrack_helper helper __read_mostly = { | 105 | static struct nf_conntrack_helper helper __read_mostly = { |
106 | .name = "netbios-ns", | 106 | .name = "netbios-ns", |
107 | .tuple.src.l3num = AF_INET, | 107 | .tuple.src.l3num = AF_INET, |
108 | .tuple.src.u.udp.port = __constant_htons(NMBD_PORT), | 108 | .tuple.src.u.udp.port = cpu_to_be16(NMBD_PORT), |
109 | .tuple.dst.protonum = IPPROTO_UDP, | 109 | .tuple.dst.protonum = IPPROTO_UDP, |
110 | .me = THIS_MODULE, | 110 | .me = THIS_MODULE, |
111 | .help = help, | 111 | .help = help, |
diff --git a/net/netfilter/nf_conntrack_pptp.c b/net/netfilter/nf_conntrack_pptp.c index 9e169ef2e854..72cca638a82d 100644 --- a/net/netfilter/nf_conntrack_pptp.c +++ b/net/netfilter/nf_conntrack_pptp.c | |||
@@ -591,7 +591,7 @@ static struct nf_conntrack_helper pptp __read_mostly = { | |||
591 | .name = "pptp", | 591 | .name = "pptp", |
592 | .me = THIS_MODULE, | 592 | .me = THIS_MODULE, |
593 | .tuple.src.l3num = AF_INET, | 593 | .tuple.src.l3num = AF_INET, |
594 | .tuple.src.u.tcp.port = __constant_htons(PPTP_CONTROL_PORT), | 594 | .tuple.src.u.tcp.port = cpu_to_be16(PPTP_CONTROL_PORT), |
595 | .tuple.dst.protonum = IPPROTO_TCP, | 595 | .tuple.dst.protonum = IPPROTO_TCP, |
596 | .help = conntrack_pptp_help, | 596 | .help = conntrack_pptp_help, |
597 | .destroy = pptp_destroy_siblings, | 597 | .destroy = pptp_destroy_siblings, |
diff --git a/net/phonet/af_phonet.c b/net/phonet/af_phonet.c index 95bc49ddb8bf..81795ea87794 100644 --- a/net/phonet/af_phonet.c +++ b/net/phonet/af_phonet.c | |||
@@ -383,7 +383,7 @@ out: | |||
383 | } | 383 | } |
384 | 384 | ||
385 | static struct packet_type phonet_packet_type = { | 385 | static struct packet_type phonet_packet_type = { |
386 | .type = __constant_htons(ETH_P_PHONET), | 386 | .type = cpu_to_be16(ETH_P_PHONET), |
387 | .dev = NULL, | 387 | .dev = NULL, |
388 | .func = phonet_rcv, | 388 | .func = phonet_rcv, |
389 | }; | 389 | }; |
diff --git a/net/sctp/output.c b/net/sctp/output.c index 73639355157e..47bfba6c03ec 100644 --- a/net/sctp/output.c +++ b/net/sctp/output.c | |||
@@ -367,7 +367,7 @@ int sctp_packet_transmit(struct sctp_packet *packet) | |||
367 | struct sctp_transport *tp = packet->transport; | 367 | struct sctp_transport *tp = packet->transport; |
368 | struct sctp_association *asoc = tp->asoc; | 368 | struct sctp_association *asoc = tp->asoc; |
369 | struct sctphdr *sh; | 369 | struct sctphdr *sh; |
370 | __be32 crc32 = __constant_cpu_to_be32(0); | 370 | __be32 crc32 = cpu_to_be32(0); |
371 | struct sk_buff *nskb; | 371 | struct sk_buff *nskb; |
372 | struct sctp_chunk *chunk, *tmp; | 372 | struct sctp_chunk *chunk, *tmp; |
373 | struct sock *sk; | 373 | struct sock *sk; |
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c index fd8acb48c3f2..b40e95f9851b 100644 --- a/net/sctp/sm_make_chunk.c +++ b/net/sctp/sm_make_chunk.c | |||
@@ -100,11 +100,11 @@ int sctp_chunk_iif(const struct sctp_chunk *chunk) | |||
100 | */ | 100 | */ |
101 | static const struct sctp_paramhdr ecap_param = { | 101 | static const struct sctp_paramhdr ecap_param = { |
102 | SCTP_PARAM_ECN_CAPABLE, | 102 | SCTP_PARAM_ECN_CAPABLE, |
103 | __constant_htons(sizeof(struct sctp_paramhdr)), | 103 | cpu_to_be16(sizeof(struct sctp_paramhdr)), |
104 | }; | 104 | }; |
105 | static const struct sctp_paramhdr prsctp_param = { | 105 | static const struct sctp_paramhdr prsctp_param = { |
106 | SCTP_PARAM_FWD_TSN_SUPPORT, | 106 | SCTP_PARAM_FWD_TSN_SUPPORT, |
107 | __constant_htons(sizeof(struct sctp_paramhdr)), | 107 | cpu_to_be16(sizeof(struct sctp_paramhdr)), |
108 | }; | 108 | }; |
109 | 109 | ||
110 | /* A helper to initialize to initialize an op error inside a | 110 | /* A helper to initialize to initialize an op error inside a |
diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c index 9fc5b023d111..8f76f4009c24 100644 --- a/net/x25/af_x25.c +++ b/net/x25/af_x25.c | |||
@@ -1609,7 +1609,7 @@ static const struct proto_ops SOCKOPS_WRAPPED(x25_proto_ops) = { | |||
1609 | SOCKOPS_WRAP(x25_proto, AF_X25); | 1609 | SOCKOPS_WRAP(x25_proto, AF_X25); |
1610 | 1610 | ||
1611 | static struct packet_type x25_packet_type = { | 1611 | static struct packet_type x25_packet_type = { |
1612 | .type = __constant_htons(ETH_P_X25), | 1612 | .type = cpu_to_be16(ETH_P_X25), |
1613 | .func = x25_lapb_receive_frame, | 1613 | .func = x25_lapb_receive_frame, |
1614 | }; | 1614 | }; |
1615 | 1615 | ||