diff options
-rw-r--r-- | drivers/net/ehea/ehea.h | 2 | ||||
-rw-r--r-- | drivers/net/ehea/ehea_main.c | 1 | ||||
-rw-r--r-- | drivers/net/tun.c | 2 | ||||
-rw-r--r-- | drivers/net/usb/rndis_host.c | 25 | ||||
-rw-r--r-- | drivers/net/wireless/rndis_wlan.c | 90 | ||||
-rw-r--r-- | drivers/usb/gadget/rndis.c | 92 | ||||
-rw-r--r-- | include/linux/if_pppox.h | 20 | ||||
-rw-r--r-- | include/linux/if_tunnel.h | 16 | ||||
-rw-r--r-- | include/linux/ncp_no.h | 26 | ||||
-rw-r--r-- | include/linux/netdevice.h | 4 | ||||
-rw-r--r-- | include/linux/netfilter_bridge.h | 4 | ||||
-rw-r--r-- | include/linux/pim.h | 4 | ||||
-rw-r--r-- | include/linux/sctp.h | 90 | ||||
-rw-r--r-- | include/linux/tcp.h | 20 | ||||
-rw-r--r-- | include/linux/usb/rndis_host.h | 85 | ||||
-rw-r--r-- | include/net/inet_ecn.h | 4 | ||||
-rw-r--r-- | include/net/ip_vs.h | 4 | ||||
-rw-r--r-- | include/net/ipv6.h | 4 | ||||
-rw-r--r-- | include/net/ipx.h | 2 | ||||
-rw-r--r-- | include/net/transp_v6.h | 2 | ||||
-rw-r--r-- | include/rdma/ib_verbs.h | 2 | ||||
-rw-r--r-- | net/core/skbuff.c | 7 |
22 files changed, 253 insertions, 253 deletions
diff --git a/drivers/net/ehea/ehea.h b/drivers/net/ehea/ehea.h index f7e2ccfd3e8c..656cf1b8d32b 100644 --- a/drivers/net/ehea/ehea.h +++ b/drivers/net/ehea/ehea.h | |||
@@ -40,7 +40,7 @@ | |||
40 | #include <asm/io.h> | 40 | #include <asm/io.h> |
41 | 41 | ||
42 | #define DRV_NAME "ehea" | 42 | #define DRV_NAME "ehea" |
43 | #define DRV_VERSION "EHEA_0097" | 43 | #define DRV_VERSION "EHEA_0098" |
44 | 44 | ||
45 | /* eHEA capability flags */ | 45 | /* eHEA capability flags */ |
46 | #define DLPAR_PORT_ADD_REM 1 | 46 | #define DLPAR_PORT_ADD_REM 1 |
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c index 489fdb90f764..958dacbb4974 100644 --- a/drivers/net/ehea/ehea_main.c +++ b/drivers/net/ehea/ehea_main.c | |||
@@ -3448,6 +3448,7 @@ out_kill_eq: | |||
3448 | ehea_destroy_eq(adapter->neq); | 3448 | ehea_destroy_eq(adapter->neq); |
3449 | 3449 | ||
3450 | out_free_ad: | 3450 | out_free_ad: |
3451 | list_del(&adapter->list); | ||
3451 | kfree(adapter); | 3452 | kfree(adapter); |
3452 | 3453 | ||
3453 | out: | 3454 | out: |
diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 4825c52924bf..a1b0697340ba 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c | |||
@@ -660,7 +660,7 @@ static ssize_t tun_chr_aio_write(struct kiocb *iocb, const struct iovec *iv, | |||
660 | unsigned long count, loff_t pos) | 660 | unsigned long count, loff_t pos) |
661 | { | 661 | { |
662 | struct file *file = iocb->ki_filp; | 662 | struct file *file = iocb->ki_filp; |
663 | struct tun_struct *tun = file->private_data; | 663 | struct tun_struct *tun = tun_get(file); |
664 | ssize_t result; | 664 | ssize_t result; |
665 | 665 | ||
666 | if (!tun) | 666 | if (!tun) |
diff --git a/drivers/net/usb/rndis_host.c b/drivers/net/usb/rndis_host.c index bcd858c567e0..b7f763e1298c 100644 --- a/drivers/net/usb/rndis_host.c +++ b/drivers/net/usb/rndis_host.c | |||
@@ -169,7 +169,7 @@ int rndis_command(struct usbnet *dev, struct rndis_msg_hdr *buf, int buflen) | |||
169 | struct rndis_keepalive_c *msg = (void *)buf; | 169 | struct rndis_keepalive_c *msg = (void *)buf; |
170 | 170 | ||
171 | msg->msg_type = RNDIS_MSG_KEEPALIVE_C; | 171 | msg->msg_type = RNDIS_MSG_KEEPALIVE_C; |
172 | msg->msg_len = ccpu2(sizeof *msg); | 172 | msg->msg_len = cpu_to_le32(sizeof *msg); |
173 | msg->status = RNDIS_STATUS_SUCCESS; | 173 | msg->status = RNDIS_STATUS_SUCCESS; |
174 | retval = usb_control_msg(dev->udev, | 174 | retval = usb_control_msg(dev->udev, |
175 | usb_sndctrlpipe(dev->udev, 0), | 175 | usb_sndctrlpipe(dev->udev, 0), |
@@ -237,7 +237,7 @@ static int rndis_query(struct usbnet *dev, struct usb_interface *intf, | |||
237 | u.get->msg_len = cpu_to_le32(sizeof *u.get + in_len); | 237 | u.get->msg_len = cpu_to_le32(sizeof *u.get + in_len); |
238 | u.get->oid = oid; | 238 | u.get->oid = oid; |
239 | u.get->len = cpu_to_le32(in_len); | 239 | u.get->len = cpu_to_le32(in_len); |
240 | u.get->offset = ccpu2(20); | 240 | u.get->offset = cpu_to_le32(20); |
241 | 241 | ||
242 | retval = rndis_command(dev, u.header, CONTROL_BUFFER_SIZE); | 242 | retval = rndis_command(dev, u.header, CONTROL_BUFFER_SIZE); |
243 | if (unlikely(retval < 0)) { | 243 | if (unlikely(retval < 0)) { |
@@ -297,9 +297,9 @@ generic_rndis_bind(struct usbnet *dev, struct usb_interface *intf, int flags) | |||
297 | goto fail; | 297 | goto fail; |
298 | 298 | ||
299 | u.init->msg_type = RNDIS_MSG_INIT; | 299 | u.init->msg_type = RNDIS_MSG_INIT; |
300 | u.init->msg_len = ccpu2(sizeof *u.init); | 300 | u.init->msg_len = cpu_to_le32(sizeof *u.init); |
301 | u.init->major_version = ccpu2(1); | 301 | u.init->major_version = cpu_to_le32(1); |
302 | u.init->minor_version = ccpu2(0); | 302 | u.init->minor_version = cpu_to_le32(0); |
303 | 303 | ||
304 | /* max transfer (in spec) is 0x4000 at full speed, but for | 304 | /* max transfer (in spec) is 0x4000 at full speed, but for |
305 | * TX we'll stick to one Ethernet packet plus RNDIS framing. | 305 | * TX we'll stick to one Ethernet packet plus RNDIS framing. |
@@ -403,10 +403,10 @@ generic_rndis_bind(struct usbnet *dev, struct usb_interface *intf, int flags) | |||
403 | /* set a nonzero filter to enable data transfers */ | 403 | /* set a nonzero filter to enable data transfers */ |
404 | memset(u.set, 0, sizeof *u.set); | 404 | memset(u.set, 0, sizeof *u.set); |
405 | u.set->msg_type = RNDIS_MSG_SET; | 405 | u.set->msg_type = RNDIS_MSG_SET; |
406 | u.set->msg_len = ccpu2(4 + sizeof *u.set); | 406 | u.set->msg_len = cpu_to_le32(4 + sizeof *u.set); |
407 | u.set->oid = OID_GEN_CURRENT_PACKET_FILTER; | 407 | u.set->oid = OID_GEN_CURRENT_PACKET_FILTER; |
408 | u.set->len = ccpu2(4); | 408 | u.set->len = cpu_to_le32(4); |
409 | u.set->offset = ccpu2((sizeof *u.set) - 8); | 409 | u.set->offset = cpu_to_le32((sizeof *u.set) - 8); |
410 | *(__le32 *)(u.buf + sizeof *u.set) = RNDIS_DEFAULT_FILTER; | 410 | *(__le32 *)(u.buf + sizeof *u.set) = RNDIS_DEFAULT_FILTER; |
411 | 411 | ||
412 | retval = rndis_command(dev, u.header, CONTROL_BUFFER_SIZE); | 412 | retval = rndis_command(dev, u.header, CONTROL_BUFFER_SIZE); |
@@ -423,7 +423,7 @@ generic_rndis_bind(struct usbnet *dev, struct usb_interface *intf, int flags) | |||
423 | halt_fail_and_release: | 423 | halt_fail_and_release: |
424 | memset(u.halt, 0, sizeof *u.halt); | 424 | memset(u.halt, 0, sizeof *u.halt); |
425 | u.halt->msg_type = RNDIS_MSG_HALT; | 425 | u.halt->msg_type = RNDIS_MSG_HALT; |
426 | u.halt->msg_len = ccpu2(sizeof *u.halt); | 426 | u.halt->msg_len = cpu_to_le32(sizeof *u.halt); |
427 | (void) rndis_command(dev, (void *)u.halt, CONTROL_BUFFER_SIZE); | 427 | (void) rndis_command(dev, (void *)u.halt, CONTROL_BUFFER_SIZE); |
428 | fail_and_release: | 428 | fail_and_release: |
429 | usb_set_intfdata(info->data, NULL); | 429 | usb_set_intfdata(info->data, NULL); |
@@ -448,7 +448,7 @@ void rndis_unbind(struct usbnet *dev, struct usb_interface *intf) | |||
448 | halt = kzalloc(CONTROL_BUFFER_SIZE, GFP_KERNEL); | 448 | halt = kzalloc(CONTROL_BUFFER_SIZE, GFP_KERNEL); |
449 | if (halt) { | 449 | if (halt) { |
450 | halt->msg_type = RNDIS_MSG_HALT; | 450 | halt->msg_type = RNDIS_MSG_HALT; |
451 | halt->msg_len = ccpu2(sizeof *halt); | 451 | halt->msg_len = cpu_to_le32(sizeof *halt); |
452 | (void) rndis_command(dev, (void *)halt, CONTROL_BUFFER_SIZE); | 452 | (void) rndis_command(dev, (void *)halt, CONTROL_BUFFER_SIZE); |
453 | kfree(halt); | 453 | kfree(halt); |
454 | } | 454 | } |
@@ -543,7 +543,7 @@ fill: | |||
543 | memset(hdr, 0, sizeof *hdr); | 543 | memset(hdr, 0, sizeof *hdr); |
544 | hdr->msg_type = RNDIS_MSG_PACKET; | 544 | hdr->msg_type = RNDIS_MSG_PACKET; |
545 | hdr->msg_len = cpu_to_le32(skb->len); | 545 | hdr->msg_len = cpu_to_le32(skb->len); |
546 | hdr->data_offset = ccpu2(sizeof(*hdr) - 8); | 546 | hdr->data_offset = cpu_to_le32(sizeof(*hdr) - 8); |
547 | hdr->data_len = cpu_to_le32(len); | 547 | hdr->data_len = cpu_to_le32(len); |
548 | 548 | ||
549 | /* FIXME make the last packet always be short ... */ | 549 | /* FIXME make the last packet always be short ... */ |
@@ -562,9 +562,6 @@ static const struct driver_info rndis_info = { | |||
562 | .tx_fixup = rndis_tx_fixup, | 562 | .tx_fixup = rndis_tx_fixup, |
563 | }; | 563 | }; |
564 | 564 | ||
565 | #undef ccpu2 | ||
566 | |||
567 | |||
568 | /*-------------------------------------------------------------------------*/ | 565 | /*-------------------------------------------------------------------------*/ |
569 | 566 | ||
570 | static const struct usb_device_id products [] = { | 567 | static const struct usb_device_id products [] = { |
diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c index 105f214e21f4..82af21eeb592 100644 --- a/drivers/net/wireless/rndis_wlan.c +++ b/drivers/net/wireless/rndis_wlan.c | |||
@@ -90,44 +90,44 @@ MODULE_PARM_DESC(workaround_interval, | |||
90 | 90 | ||
91 | 91 | ||
92 | /* various RNDIS OID defs */ | 92 | /* various RNDIS OID defs */ |
93 | #define OID_GEN_LINK_SPEED ccpu2(0x00010107) | 93 | #define OID_GEN_LINK_SPEED cpu_to_le32(0x00010107) |
94 | #define OID_GEN_RNDIS_CONFIG_PARAMETER ccpu2(0x0001021b) | 94 | #define OID_GEN_RNDIS_CONFIG_PARAMETER cpu_to_le32(0x0001021b) |
95 | 95 | ||
96 | #define OID_GEN_XMIT_OK ccpu2(0x00020101) | 96 | #define OID_GEN_XMIT_OK cpu_to_le32(0x00020101) |
97 | #define OID_GEN_RCV_OK ccpu2(0x00020102) | 97 | #define OID_GEN_RCV_OK cpu_to_le32(0x00020102) |
98 | #define OID_GEN_XMIT_ERROR ccpu2(0x00020103) | 98 | #define OID_GEN_XMIT_ERROR cpu_to_le32(0x00020103) |
99 | #define OID_GEN_RCV_ERROR ccpu2(0x00020104) | 99 | #define OID_GEN_RCV_ERROR cpu_to_le32(0x00020104) |
100 | #define OID_GEN_RCV_NO_BUFFER ccpu2(0x00020105) | 100 | #define OID_GEN_RCV_NO_BUFFER cpu_to_le32(0x00020105) |
101 | 101 | ||
102 | #define OID_802_3_PERMANENT_ADDRESS ccpu2(0x01010101) | 102 | #define OID_802_3_PERMANENT_ADDRESS cpu_to_le32(0x01010101) |
103 | #define OID_802_3_CURRENT_ADDRESS ccpu2(0x01010102) | 103 | #define OID_802_3_CURRENT_ADDRESS cpu_to_le32(0x01010102) |
104 | #define OID_802_3_MULTICAST_LIST ccpu2(0x01010103) | 104 | #define OID_802_3_MULTICAST_LIST cpu_to_le32(0x01010103) |
105 | #define OID_802_3_MAXIMUM_LIST_SIZE ccpu2(0x01010104) | 105 | #define OID_802_3_MAXIMUM_LIST_SIZE cpu_to_le32(0x01010104) |
106 | 106 | ||
107 | #define OID_802_11_BSSID ccpu2(0x0d010101) | 107 | #define OID_802_11_BSSID cpu_to_le32(0x0d010101) |
108 | #define OID_802_11_SSID ccpu2(0x0d010102) | 108 | #define OID_802_11_SSID cpu_to_le32(0x0d010102) |
109 | #define OID_802_11_INFRASTRUCTURE_MODE ccpu2(0x0d010108) | 109 | #define OID_802_11_INFRASTRUCTURE_MODE cpu_to_le32(0x0d010108) |
110 | #define OID_802_11_ADD_WEP ccpu2(0x0d010113) | 110 | #define OID_802_11_ADD_WEP cpu_to_le32(0x0d010113) |
111 | #define OID_802_11_REMOVE_WEP ccpu2(0x0d010114) | 111 | #define OID_802_11_REMOVE_WEP cpu_to_le32(0x0d010114) |
112 | #define OID_802_11_DISASSOCIATE ccpu2(0x0d010115) | 112 | #define OID_802_11_DISASSOCIATE cpu_to_le32(0x0d010115) |
113 | #define OID_802_11_AUTHENTICATION_MODE ccpu2(0x0d010118) | 113 | #define OID_802_11_AUTHENTICATION_MODE cpu_to_le32(0x0d010118) |
114 | #define OID_802_11_PRIVACY_FILTER ccpu2(0x0d010119) | 114 | #define OID_802_11_PRIVACY_FILTER cpu_to_le32(0x0d010119) |
115 | #define OID_802_11_BSSID_LIST_SCAN ccpu2(0x0d01011a) | 115 | #define OID_802_11_BSSID_LIST_SCAN cpu_to_le32(0x0d01011a) |
116 | #define OID_802_11_ENCRYPTION_STATUS ccpu2(0x0d01011b) | 116 | #define OID_802_11_ENCRYPTION_STATUS cpu_to_le32(0x0d01011b) |
117 | #define OID_802_11_ADD_KEY ccpu2(0x0d01011d) | 117 | #define OID_802_11_ADD_KEY cpu_to_le32(0x0d01011d) |
118 | #define OID_802_11_REMOVE_KEY ccpu2(0x0d01011e) | 118 | #define OID_802_11_REMOVE_KEY cpu_to_le32(0x0d01011e) |
119 | #define OID_802_11_ASSOCIATION_INFORMATION ccpu2(0x0d01011f) | 119 | #define OID_802_11_ASSOCIATION_INFORMATION cpu_to_le32(0x0d01011f) |
120 | #define OID_802_11_PMKID ccpu2(0x0d010123) | 120 | #define OID_802_11_PMKID cpu_to_le32(0x0d010123) |
121 | #define OID_802_11_NETWORK_TYPES_SUPPORTED ccpu2(0x0d010203) | 121 | #define OID_802_11_NETWORK_TYPES_SUPPORTED cpu_to_le32(0x0d010203) |
122 | #define OID_802_11_NETWORK_TYPE_IN_USE ccpu2(0x0d010204) | 122 | #define OID_802_11_NETWORK_TYPE_IN_USE cpu_to_le32(0x0d010204) |
123 | #define OID_802_11_TX_POWER_LEVEL ccpu2(0x0d010205) | 123 | #define OID_802_11_TX_POWER_LEVEL cpu_to_le32(0x0d010205) |
124 | #define OID_802_11_RSSI ccpu2(0x0d010206) | 124 | #define OID_802_11_RSSI cpu_to_le32(0x0d010206) |
125 | #define OID_802_11_RSSI_TRIGGER ccpu2(0x0d010207) | 125 | #define OID_802_11_RSSI_TRIGGER cpu_to_le32(0x0d010207) |
126 | #define OID_802_11_FRAGMENTATION_THRESHOLD ccpu2(0x0d010209) | 126 | #define OID_802_11_FRAGMENTATION_THRESHOLD cpu_to_le32(0x0d010209) |
127 | #define OID_802_11_RTS_THRESHOLD ccpu2(0x0d01020a) | 127 | #define OID_802_11_RTS_THRESHOLD cpu_to_le32(0x0d01020a) |
128 | #define OID_802_11_SUPPORTED_RATES ccpu2(0x0d01020e) | 128 | #define OID_802_11_SUPPORTED_RATES cpu_to_le32(0x0d01020e) |
129 | #define OID_802_11_CONFIGURATION ccpu2(0x0d010211) | 129 | #define OID_802_11_CONFIGURATION cpu_to_le32(0x0d010211) |
130 | #define OID_802_11_BSSID_LIST ccpu2(0x0d010217) | 130 | #define OID_802_11_BSSID_LIST cpu_to_le32(0x0d010217) |
131 | 131 | ||
132 | 132 | ||
133 | /* Typical noise/maximum signal level values taken from ndiswrapper iw_ndis.h */ | 133 | /* Typical noise/maximum signal level values taken from ndiswrapper iw_ndis.h */ |
@@ -144,8 +144,8 @@ MODULE_PARM_DESC(workaround_interval, | |||
144 | 144 | ||
145 | 145 | ||
146 | /* codes for "status" field of completion messages */ | 146 | /* codes for "status" field of completion messages */ |
147 | #define RNDIS_STATUS_ADAPTER_NOT_READY ccpu2(0xc0010011) | 147 | #define RNDIS_STATUS_ADAPTER_NOT_READY cpu_to_le32(0xc0010011) |
148 | #define RNDIS_STATUS_ADAPTER_NOT_OPEN ccpu2(0xc0010012) | 148 | #define RNDIS_STATUS_ADAPTER_NOT_OPEN cpu_to_le32(0xc0010012) |
149 | 149 | ||
150 | 150 | ||
151 | /* NDIS data structures. Taken from wpa_supplicant driver_ndis.c | 151 | /* NDIS data structures. Taken from wpa_supplicant driver_ndis.c |
@@ -442,7 +442,7 @@ static int rndis_query_oid(struct usbnet *dev, __le32 oid, void *data, int *len) | |||
442 | 442 | ||
443 | memset(u.get, 0, sizeof *u.get); | 443 | memset(u.get, 0, sizeof *u.get); |
444 | u.get->msg_type = RNDIS_MSG_QUERY; | 444 | u.get->msg_type = RNDIS_MSG_QUERY; |
445 | u.get->msg_len = ccpu2(sizeof *u.get); | 445 | u.get->msg_len = cpu_to_le32(sizeof *u.get); |
446 | u.get->oid = oid; | 446 | u.get->oid = oid; |
447 | 447 | ||
448 | ret = rndis_command(dev, u.header, buflen); | 448 | ret = rndis_command(dev, u.header, buflen); |
@@ -491,8 +491,8 @@ static int rndis_set_oid(struct usbnet *dev, __le32 oid, void *data, int len) | |||
491 | u.set->msg_len = cpu_to_le32(sizeof(*u.set) + len); | 491 | u.set->msg_len = cpu_to_le32(sizeof(*u.set) + len); |
492 | u.set->oid = oid; | 492 | u.set->oid = oid; |
493 | u.set->len = cpu_to_le32(len); | 493 | u.set->len = cpu_to_le32(len); |
494 | u.set->offset = ccpu2(sizeof(*u.set) - 8); | 494 | u.set->offset = cpu_to_le32(sizeof(*u.set) - 8); |
495 | u.set->handle = ccpu2(0); | 495 | u.set->handle = cpu_to_le32(0); |
496 | memcpy(u.buf + sizeof(*u.set), data, len); | 496 | memcpy(u.buf + sizeof(*u.set), data, len); |
497 | 497 | ||
498 | ret = rndis_command(dev, u.header, buflen); | 498 | ret = rndis_command(dev, u.header, buflen); |
@@ -1630,7 +1630,7 @@ static int rndis_iw_set_scan(struct net_device *dev, | |||
1630 | devdbg(usbdev, "SIOCSIWSCAN"); | 1630 | devdbg(usbdev, "SIOCSIWSCAN"); |
1631 | 1631 | ||
1632 | if (wrqu->data.flags == 0) { | 1632 | if (wrqu->data.flags == 0) { |
1633 | tmp = ccpu2(1); | 1633 | tmp = cpu_to_le32(1); |
1634 | ret = rndis_set_oid(usbdev, OID_802_11_BSSID_LIST_SCAN, &tmp, | 1634 | ret = rndis_set_oid(usbdev, OID_802_11_BSSID_LIST_SCAN, &tmp, |
1635 | sizeof(tmp)); | 1635 | sizeof(tmp)); |
1636 | evt.data.flags = 0; | 1636 | evt.data.flags = 0; |
@@ -2428,7 +2428,7 @@ static void rndis_update_wireless_stats(struct work_struct *work) | |||
2428 | /* Send scan OID. Use of both OIDs is required to get device | 2428 | /* Send scan OID. Use of both OIDs is required to get device |
2429 | * working. | 2429 | * working. |
2430 | */ | 2430 | */ |
2431 | tmp = ccpu2(1); | 2431 | tmp = cpu_to_le32(1); |
2432 | rndis_set_oid(usbdev, OID_802_11_BSSID_LIST_SCAN, &tmp, | 2432 | rndis_set_oid(usbdev, OID_802_11_BSSID_LIST_SCAN, &tmp, |
2433 | sizeof(tmp)); | 2433 | sizeof(tmp)); |
2434 | 2434 | ||
diff --git a/drivers/usb/gadget/rndis.c b/drivers/usb/gadget/rndis.c index 8c26f5ea2b83..d2860a823680 100644 --- a/drivers/usb/gadget/rndis.c +++ b/drivers/usb/gadget/rndis.c | |||
@@ -63,7 +63,7 @@ MODULE_PARM_DESC (rndis_debug, "enable debugging"); | |||
63 | static rndis_params rndis_per_dev_params [RNDIS_MAX_CONFIGS]; | 63 | static rndis_params rndis_per_dev_params [RNDIS_MAX_CONFIGS]; |
64 | 64 | ||
65 | /* Driver Version */ | 65 | /* Driver Version */ |
66 | static const __le32 rndis_driver_version = __constant_cpu_to_le32 (1); | 66 | static const __le32 rndis_driver_version = cpu_to_le32 (1); |
67 | 67 | ||
68 | /* Function Prototypes */ | 68 | /* Function Prototypes */ |
69 | static rndis_resp_t *rndis_add_response (int configNr, u32 length); | 69 | static rndis_resp_t *rndis_add_response (int configNr, u32 length); |
@@ -190,7 +190,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
190 | 190 | ||
191 | /* response goes here, right after the header */ | 191 | /* response goes here, right after the header */ |
192 | outbuf = (__le32 *) &resp[1]; | 192 | outbuf = (__le32 *) &resp[1]; |
193 | resp->InformationBufferOffset = __constant_cpu_to_le32 (16); | 193 | resp->InformationBufferOffset = cpu_to_le32 (16); |
194 | 194 | ||
195 | net = rndis_per_dev_params[configNr].dev; | 195 | net = rndis_per_dev_params[configNr].dev; |
196 | if (net->get_stats) | 196 | if (net->get_stats) |
@@ -221,7 +221,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
221 | * reddite ergo quae sunt Caesaris Caesari | 221 | * reddite ergo quae sunt Caesaris Caesari |
222 | * et quae sunt Dei Deo! | 222 | * et quae sunt Dei Deo! |
223 | */ | 223 | */ |
224 | *outbuf = __constant_cpu_to_le32 (0); | 224 | *outbuf = cpu_to_le32 (0); |
225 | retval = 0; | 225 | retval = 0; |
226 | break; | 226 | break; |
227 | 227 | ||
@@ -256,7 +256,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
256 | pr_debug("%s: OID_GEN_LINK_SPEED\n", __func__); | 256 | pr_debug("%s: OID_GEN_LINK_SPEED\n", __func__); |
257 | if (rndis_per_dev_params [configNr].media_state | 257 | if (rndis_per_dev_params [configNr].media_state |
258 | == NDIS_MEDIA_STATE_DISCONNECTED) | 258 | == NDIS_MEDIA_STATE_DISCONNECTED) |
259 | *outbuf = __constant_cpu_to_le32 (0); | 259 | *outbuf = cpu_to_le32 (0); |
260 | else | 260 | else |
261 | *outbuf = cpu_to_le32 ( | 261 | *outbuf = cpu_to_le32 ( |
262 | rndis_per_dev_params [configNr].speed); | 262 | rndis_per_dev_params [configNr].speed); |
@@ -317,7 +317,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
317 | /* mandatory */ | 317 | /* mandatory */ |
318 | case OID_GEN_MAXIMUM_TOTAL_SIZE: | 318 | case OID_GEN_MAXIMUM_TOTAL_SIZE: |
319 | pr_debug("%s: OID_GEN_MAXIMUM_TOTAL_SIZE\n", __func__); | 319 | pr_debug("%s: OID_GEN_MAXIMUM_TOTAL_SIZE\n", __func__); |
320 | *outbuf = __constant_cpu_to_le32(RNDIS_MAX_TOTAL_SIZE); | 320 | *outbuf = cpu_to_le32(RNDIS_MAX_TOTAL_SIZE); |
321 | retval = 0; | 321 | retval = 0; |
322 | break; | 322 | break; |
323 | 323 | ||
@@ -332,7 +332,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
332 | 332 | ||
333 | case OID_GEN_PHYSICAL_MEDIUM: | 333 | case OID_GEN_PHYSICAL_MEDIUM: |
334 | pr_debug("%s: OID_GEN_PHYSICAL_MEDIUM\n", __func__); | 334 | pr_debug("%s: OID_GEN_PHYSICAL_MEDIUM\n", __func__); |
335 | *outbuf = __constant_cpu_to_le32 (0); | 335 | *outbuf = cpu_to_le32 (0); |
336 | retval = 0; | 336 | retval = 0; |
337 | break; | 337 | break; |
338 | 338 | ||
@@ -342,7 +342,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
342 | */ | 342 | */ |
343 | case OID_GEN_MAC_OPTIONS: /* from WinME */ | 343 | case OID_GEN_MAC_OPTIONS: /* from WinME */ |
344 | pr_debug("%s: OID_GEN_MAC_OPTIONS\n", __func__); | 344 | pr_debug("%s: OID_GEN_MAC_OPTIONS\n", __func__); |
345 | *outbuf = __constant_cpu_to_le32( | 345 | *outbuf = cpu_to_le32( |
346 | NDIS_MAC_OPTION_RECEIVE_SERIALIZED | 346 | NDIS_MAC_OPTION_RECEIVE_SERIALIZED |
347 | | NDIS_MAC_OPTION_FULL_DUPLEX); | 347 | | NDIS_MAC_OPTION_FULL_DUPLEX); |
348 | retval = 0; | 348 | retval = 0; |
@@ -431,7 +431,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
431 | case OID_802_3_MULTICAST_LIST: | 431 | case OID_802_3_MULTICAST_LIST: |
432 | pr_debug("%s: OID_802_3_MULTICAST_LIST\n", __func__); | 432 | pr_debug("%s: OID_802_3_MULTICAST_LIST\n", __func__); |
433 | /* Multicast base address only */ | 433 | /* Multicast base address only */ |
434 | *outbuf = __constant_cpu_to_le32 (0xE0000000); | 434 | *outbuf = cpu_to_le32 (0xE0000000); |
435 | retval = 0; | 435 | retval = 0; |
436 | break; | 436 | break; |
437 | 437 | ||
@@ -439,7 +439,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
439 | case OID_802_3_MAXIMUM_LIST_SIZE: | 439 | case OID_802_3_MAXIMUM_LIST_SIZE: |
440 | pr_debug("%s: OID_802_3_MAXIMUM_LIST_SIZE\n", __func__); | 440 | pr_debug("%s: OID_802_3_MAXIMUM_LIST_SIZE\n", __func__); |
441 | /* Multicast base address only */ | 441 | /* Multicast base address only */ |
442 | *outbuf = __constant_cpu_to_le32 (1); | 442 | *outbuf = cpu_to_le32 (1); |
443 | retval = 0; | 443 | retval = 0; |
444 | break; | 444 | break; |
445 | 445 | ||
@@ -461,14 +461,14 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
461 | /* mandatory */ | 461 | /* mandatory */ |
462 | case OID_802_3_XMIT_ONE_COLLISION: | 462 | case OID_802_3_XMIT_ONE_COLLISION: |
463 | pr_debug("%s: OID_802_3_XMIT_ONE_COLLISION\n", __func__); | 463 | pr_debug("%s: OID_802_3_XMIT_ONE_COLLISION\n", __func__); |
464 | *outbuf = __constant_cpu_to_le32 (0); | 464 | *outbuf = cpu_to_le32 (0); |
465 | retval = 0; | 465 | retval = 0; |
466 | break; | 466 | break; |
467 | 467 | ||
468 | /* mandatory */ | 468 | /* mandatory */ |
469 | case OID_802_3_XMIT_MORE_COLLISIONS: | 469 | case OID_802_3_XMIT_MORE_COLLISIONS: |
470 | pr_debug("%s: OID_802_3_XMIT_MORE_COLLISIONS\n", __func__); | 470 | pr_debug("%s: OID_802_3_XMIT_MORE_COLLISIONS\n", __func__); |
471 | *outbuf = __constant_cpu_to_le32 (0); | 471 | *outbuf = cpu_to_le32 (0); |
472 | retval = 0; | 472 | retval = 0; |
473 | break; | 473 | break; |
474 | 474 | ||
@@ -572,24 +572,24 @@ static int rndis_init_response (int configNr, rndis_init_msg_type *buf) | |||
572 | return -ENOMEM; | 572 | return -ENOMEM; |
573 | resp = (rndis_init_cmplt_type *) r->buf; | 573 | resp = (rndis_init_cmplt_type *) r->buf; |
574 | 574 | ||
575 | resp->MessageType = __constant_cpu_to_le32 ( | 575 | resp->MessageType = cpu_to_le32 ( |
576 | REMOTE_NDIS_INITIALIZE_CMPLT); | 576 | REMOTE_NDIS_INITIALIZE_CMPLT); |
577 | resp->MessageLength = __constant_cpu_to_le32 (52); | 577 | resp->MessageLength = cpu_to_le32 (52); |
578 | resp->RequestID = buf->RequestID; /* Still LE in msg buffer */ | 578 | resp->RequestID = buf->RequestID; /* Still LE in msg buffer */ |
579 | resp->Status = __constant_cpu_to_le32 (RNDIS_STATUS_SUCCESS); | 579 | resp->Status = cpu_to_le32 (RNDIS_STATUS_SUCCESS); |
580 | resp->MajorVersion = __constant_cpu_to_le32 (RNDIS_MAJOR_VERSION); | 580 | resp->MajorVersion = cpu_to_le32 (RNDIS_MAJOR_VERSION); |
581 | resp->MinorVersion = __constant_cpu_to_le32 (RNDIS_MINOR_VERSION); | 581 | resp->MinorVersion = cpu_to_le32 (RNDIS_MINOR_VERSION); |
582 | resp->DeviceFlags = __constant_cpu_to_le32 (RNDIS_DF_CONNECTIONLESS); | 582 | resp->DeviceFlags = cpu_to_le32 (RNDIS_DF_CONNECTIONLESS); |
583 | resp->Medium = __constant_cpu_to_le32 (RNDIS_MEDIUM_802_3); | 583 | resp->Medium = cpu_to_le32 (RNDIS_MEDIUM_802_3); |
584 | resp->MaxPacketsPerTransfer = __constant_cpu_to_le32 (1); | 584 | resp->MaxPacketsPerTransfer = cpu_to_le32 (1); |
585 | resp->MaxTransferSize = cpu_to_le32 ( | 585 | resp->MaxTransferSize = cpu_to_le32 ( |
586 | params->dev->mtu | 586 | params->dev->mtu |
587 | + sizeof (struct ethhdr) | 587 | + sizeof (struct ethhdr) |
588 | + sizeof (struct rndis_packet_msg_type) | 588 | + sizeof (struct rndis_packet_msg_type) |
589 | + 22); | 589 | + 22); |
590 | resp->PacketAlignmentFactor = __constant_cpu_to_le32 (0); | 590 | resp->PacketAlignmentFactor = cpu_to_le32 (0); |
591 | resp->AFListOffset = __constant_cpu_to_le32 (0); | 591 | resp->AFListOffset = cpu_to_le32 (0); |
592 | resp->AFListSize = __constant_cpu_to_le32 (0); | 592 | resp->AFListSize = cpu_to_le32 (0); |
593 | 593 | ||
594 | params->resp_avail(params->v); | 594 | params->resp_avail(params->v); |
595 | return 0; | 595 | return 0; |
@@ -617,7 +617,7 @@ static int rndis_query_response (int configNr, rndis_query_msg_type *buf) | |||
617 | return -ENOMEM; | 617 | return -ENOMEM; |
618 | resp = (rndis_query_cmplt_type *) r->buf; | 618 | resp = (rndis_query_cmplt_type *) r->buf; |
619 | 619 | ||
620 | resp->MessageType = __constant_cpu_to_le32 (REMOTE_NDIS_QUERY_CMPLT); | 620 | resp->MessageType = cpu_to_le32 (REMOTE_NDIS_QUERY_CMPLT); |
621 | resp->RequestID = buf->RequestID; /* Still LE in msg buffer */ | 621 | resp->RequestID = buf->RequestID; /* Still LE in msg buffer */ |
622 | 622 | ||
623 | if (gen_ndis_query_resp (configNr, le32_to_cpu (buf->OID), | 623 | if (gen_ndis_query_resp (configNr, le32_to_cpu (buf->OID), |
@@ -626,13 +626,13 @@ static int rndis_query_response (int configNr, rndis_query_msg_type *buf) | |||
626 | le32_to_cpu(buf->InformationBufferLength), | 626 | le32_to_cpu(buf->InformationBufferLength), |
627 | r)) { | 627 | r)) { |
628 | /* OID not supported */ | 628 | /* OID not supported */ |
629 | resp->Status = __constant_cpu_to_le32 ( | 629 | resp->Status = cpu_to_le32 ( |
630 | RNDIS_STATUS_NOT_SUPPORTED); | 630 | RNDIS_STATUS_NOT_SUPPORTED); |
631 | resp->MessageLength = __constant_cpu_to_le32 (sizeof *resp); | 631 | resp->MessageLength = cpu_to_le32 (sizeof *resp); |
632 | resp->InformationBufferLength = __constant_cpu_to_le32 (0); | 632 | resp->InformationBufferLength = cpu_to_le32 (0); |
633 | resp->InformationBufferOffset = __constant_cpu_to_le32 (0); | 633 | resp->InformationBufferOffset = cpu_to_le32 (0); |
634 | } else | 634 | } else |
635 | resp->Status = __constant_cpu_to_le32 (RNDIS_STATUS_SUCCESS); | 635 | resp->Status = cpu_to_le32 (RNDIS_STATUS_SUCCESS); |
636 | 636 | ||
637 | params->resp_avail(params->v); | 637 | params->resp_avail(params->v); |
638 | return 0; | 638 | return 0; |
@@ -665,14 +665,14 @@ static int rndis_set_response (int configNr, rndis_set_msg_type *buf) | |||
665 | pr_debug("\n"); | 665 | pr_debug("\n"); |
666 | #endif | 666 | #endif |
667 | 667 | ||
668 | resp->MessageType = __constant_cpu_to_le32 (REMOTE_NDIS_SET_CMPLT); | 668 | resp->MessageType = cpu_to_le32 (REMOTE_NDIS_SET_CMPLT); |
669 | resp->MessageLength = __constant_cpu_to_le32 (16); | 669 | resp->MessageLength = cpu_to_le32 (16); |
670 | resp->RequestID = buf->RequestID; /* Still LE in msg buffer */ | 670 | resp->RequestID = buf->RequestID; /* Still LE in msg buffer */ |
671 | if (gen_ndis_set_resp (configNr, le32_to_cpu (buf->OID), | 671 | if (gen_ndis_set_resp (configNr, le32_to_cpu (buf->OID), |
672 | ((u8 *) buf) + 8 + BufOffset, BufLength, r)) | 672 | ((u8 *) buf) + 8 + BufOffset, BufLength, r)) |
673 | resp->Status = __constant_cpu_to_le32 (RNDIS_STATUS_NOT_SUPPORTED); | 673 | resp->Status = cpu_to_le32 (RNDIS_STATUS_NOT_SUPPORTED); |
674 | else | 674 | else |
675 | resp->Status = __constant_cpu_to_le32 (RNDIS_STATUS_SUCCESS); | 675 | resp->Status = cpu_to_le32 (RNDIS_STATUS_SUCCESS); |
676 | 676 | ||
677 | params->resp_avail(params->v); | 677 | params->resp_avail(params->v); |
678 | return 0; | 678 | return 0; |
@@ -689,11 +689,11 @@ static int rndis_reset_response (int configNr, rndis_reset_msg_type *buf) | |||
689 | return -ENOMEM; | 689 | return -ENOMEM; |
690 | resp = (rndis_reset_cmplt_type *) r->buf; | 690 | resp = (rndis_reset_cmplt_type *) r->buf; |
691 | 691 | ||
692 | resp->MessageType = __constant_cpu_to_le32 (REMOTE_NDIS_RESET_CMPLT); | 692 | resp->MessageType = cpu_to_le32 (REMOTE_NDIS_RESET_CMPLT); |
693 | resp->MessageLength = __constant_cpu_to_le32 (16); | 693 | resp->MessageLength = cpu_to_le32 (16); |
694 | resp->Status = __constant_cpu_to_le32 (RNDIS_STATUS_SUCCESS); | 694 | resp->Status = cpu_to_le32 (RNDIS_STATUS_SUCCESS); |
695 | /* resent information */ | 695 | /* resent information */ |
696 | resp->AddressingReset = __constant_cpu_to_le32 (1); | 696 | resp->AddressingReset = cpu_to_le32 (1); |
697 | 697 | ||
698 | params->resp_avail(params->v); | 698 | params->resp_avail(params->v); |
699 | return 0; | 699 | return 0; |
@@ -713,11 +713,11 @@ static int rndis_keepalive_response (int configNr, | |||
713 | return -ENOMEM; | 713 | return -ENOMEM; |
714 | resp = (rndis_keepalive_cmplt_type *) r->buf; | 714 | resp = (rndis_keepalive_cmplt_type *) r->buf; |
715 | 715 | ||
716 | resp->MessageType = __constant_cpu_to_le32 ( | 716 | resp->MessageType = cpu_to_le32 ( |
717 | REMOTE_NDIS_KEEPALIVE_CMPLT); | 717 | REMOTE_NDIS_KEEPALIVE_CMPLT); |
718 | resp->MessageLength = __constant_cpu_to_le32 (16); | 718 | resp->MessageLength = cpu_to_le32 (16); |
719 | resp->RequestID = buf->RequestID; /* Still LE in msg buffer */ | 719 | resp->RequestID = buf->RequestID; /* Still LE in msg buffer */ |
720 | resp->Status = __constant_cpu_to_le32 (RNDIS_STATUS_SUCCESS); | 720 | resp->Status = cpu_to_le32 (RNDIS_STATUS_SUCCESS); |
721 | 721 | ||
722 | params->resp_avail(params->v); | 722 | params->resp_avail(params->v); |
723 | return 0; | 723 | return 0; |
@@ -742,12 +742,12 @@ static int rndis_indicate_status_msg (int configNr, u32 status) | |||
742 | return -ENOMEM; | 742 | return -ENOMEM; |
743 | resp = (rndis_indicate_status_msg_type *) r->buf; | 743 | resp = (rndis_indicate_status_msg_type *) r->buf; |
744 | 744 | ||
745 | resp->MessageType = __constant_cpu_to_le32 ( | 745 | resp->MessageType = cpu_to_le32 ( |
746 | REMOTE_NDIS_INDICATE_STATUS_MSG); | 746 | REMOTE_NDIS_INDICATE_STATUS_MSG); |
747 | resp->MessageLength = __constant_cpu_to_le32 (20); | 747 | resp->MessageLength = cpu_to_le32 (20); |
748 | resp->Status = cpu_to_le32 (status); | 748 | resp->Status = cpu_to_le32 (status); |
749 | resp->StatusBufferLength = __constant_cpu_to_le32 (0); | 749 | resp->StatusBufferLength = cpu_to_le32 (0); |
750 | resp->StatusBufferOffset = __constant_cpu_to_le32 (0); | 750 | resp->StatusBufferOffset = cpu_to_le32 (0); |
751 | 751 | ||
752 | params->resp_avail(params->v); | 752 | params->resp_avail(params->v); |
753 | return 0; | 753 | return 0; |
@@ -963,9 +963,9 @@ void rndis_add_hdr (struct sk_buff *skb) | |||
963 | return; | 963 | return; |
964 | header = (void *) skb_push (skb, sizeof *header); | 964 | header = (void *) skb_push (skb, sizeof *header); |
965 | memset (header, 0, sizeof *header); | 965 | memset (header, 0, sizeof *header); |
966 | header->MessageType = __constant_cpu_to_le32(REMOTE_NDIS_PACKET_MSG); | 966 | header->MessageType = cpu_to_le32(REMOTE_NDIS_PACKET_MSG); |
967 | header->MessageLength = cpu_to_le32(skb->len); | 967 | header->MessageLength = cpu_to_le32(skb->len); |
968 | header->DataOffset = __constant_cpu_to_le32 (36); | 968 | header->DataOffset = cpu_to_le32 (36); |
969 | header->DataLength = cpu_to_le32(skb->len - sizeof *header); | 969 | header->DataLength = cpu_to_le32(skb->len - sizeof *header); |
970 | } | 970 | } |
971 | 971 | ||
@@ -1029,7 +1029,7 @@ int rndis_rm_hdr(struct sk_buff *skb) | |||
1029 | __le32 *tmp = (void *) skb->data; | 1029 | __le32 *tmp = (void *) skb->data; |
1030 | 1030 | ||
1031 | /* MessageType, MessageLength */ | 1031 | /* MessageType, MessageLength */ |
1032 | if (__constant_cpu_to_le32(REMOTE_NDIS_PACKET_MSG) | 1032 | if (cpu_to_le32(REMOTE_NDIS_PACKET_MSG) |
1033 | != get_unaligned(tmp++)) | 1033 | != get_unaligned(tmp++)) |
1034 | return -EINVAL; | 1034 | return -EINVAL; |
1035 | tmp++; | 1035 | tmp++; |
diff --git a/include/linux/if_pppox.h b/include/linux/if_pppox.h index 30c88b2245ff..90b5fae5d714 100644 --- a/include/linux/if_pppox.h +++ b/include/linux/if_pppox.h | |||
@@ -95,16 +95,16 @@ struct pppoe_tag { | |||
95 | } __attribute ((packed)); | 95 | } __attribute ((packed)); |
96 | 96 | ||
97 | /* Tag identifiers */ | 97 | /* Tag identifiers */ |
98 | #define PTT_EOL __constant_htons(0x0000) | 98 | #define PTT_EOL __cpu_to_be16(0x0000) |
99 | #define PTT_SRV_NAME __constant_htons(0x0101) | 99 | #define PTT_SRV_NAME __cpu_to_be16(0x0101) |
100 | #define PTT_AC_NAME __constant_htons(0x0102) | 100 | #define PTT_AC_NAME __cpu_to_be16(0x0102) |
101 | #define PTT_HOST_UNIQ __constant_htons(0x0103) | 101 | #define PTT_HOST_UNIQ __cpu_to_be16(0x0103) |
102 | #define PTT_AC_COOKIE __constant_htons(0x0104) | 102 | #define PTT_AC_COOKIE __cpu_to_be16(0x0104) |
103 | #define PTT_VENDOR __constant_htons(0x0105) | 103 | #define PTT_VENDOR __cpu_to_be16(0x0105) |
104 | #define PTT_RELAY_SID __constant_htons(0x0110) | 104 | #define PTT_RELAY_SID __cpu_to_be16(0x0110) |
105 | #define PTT_SRV_ERR __constant_htons(0x0201) | 105 | #define PTT_SRV_ERR __cpu_to_be16(0x0201) |
106 | #define PTT_SYS_ERR __constant_htons(0x0202) | 106 | #define PTT_SYS_ERR __cpu_to_be16(0x0202) |
107 | #define PTT_GEN_ERR __constant_htons(0x0203) | 107 | #define PTT_GEN_ERR __cpu_to_be16(0x0203) |
108 | 108 | ||
109 | struct pppoe_hdr { | 109 | struct pppoe_hdr { |
110 | #if defined(__LITTLE_ENDIAN_BITFIELD) | 110 | #if defined(__LITTLE_ENDIAN_BITFIELD) |
diff --git a/include/linux/if_tunnel.h b/include/linux/if_tunnel.h index 82c43624c067..5a9aae4adb44 100644 --- a/include/linux/if_tunnel.h +++ b/include/linux/if_tunnel.h | |||
@@ -16,14 +16,14 @@ | |||
16 | #define SIOCDELPRL (SIOCDEVPRIVATE + 6) | 16 | #define SIOCDELPRL (SIOCDEVPRIVATE + 6) |
17 | #define SIOCCHGPRL (SIOCDEVPRIVATE + 7) | 17 | #define SIOCCHGPRL (SIOCDEVPRIVATE + 7) |
18 | 18 | ||
19 | #define GRE_CSUM __constant_htons(0x8000) | 19 | #define GRE_CSUM __cpu_to_be16(0x8000) |
20 | #define GRE_ROUTING __constant_htons(0x4000) | 20 | #define GRE_ROUTING __cpu_to_be16(0x4000) |
21 | #define GRE_KEY __constant_htons(0x2000) | 21 | #define GRE_KEY __cpu_to_be16(0x2000) |
22 | #define GRE_SEQ __constant_htons(0x1000) | 22 | #define GRE_SEQ __cpu_to_be16(0x1000) |
23 | #define GRE_STRICT __constant_htons(0x0800) | 23 | #define GRE_STRICT __cpu_to_be16(0x0800) |
24 | #define GRE_REC __constant_htons(0x0700) | 24 | #define GRE_REC __cpu_to_be16(0x0700) |
25 | #define GRE_FLAGS __constant_htons(0x00F8) | 25 | #define GRE_FLAGS __cpu_to_be16(0x00F8) |
26 | #define GRE_VERSION __constant_htons(0x0007) | 26 | #define GRE_VERSION __cpu_to_be16(0x0007) |
27 | 27 | ||
28 | struct ip_tunnel_parm | 28 | struct ip_tunnel_parm |
29 | { | 29 | { |
diff --git a/include/linux/ncp_no.h b/include/linux/ncp_no.h index f56a696a7cc6..cddaa48fb182 100644 --- a/include/linux/ncp_no.h +++ b/include/linux/ncp_no.h | |||
@@ -2,18 +2,18 @@ | |||
2 | #define _NCP_NO | 2 | #define _NCP_NO |
3 | 3 | ||
4 | /* these define the attribute byte as seen by NCP */ | 4 | /* these define the attribute byte as seen by NCP */ |
5 | #define aRONLY (__constant_cpu_to_le32(1)) | 5 | #define aRONLY (__cpu_to_le32(1)) |
6 | #define aHIDDEN (__constant_cpu_to_le32(2)) | 6 | #define aHIDDEN (__cpu_to_le32(2)) |
7 | #define aSYSTEM (__constant_cpu_to_le32(4)) | 7 | #define aSYSTEM (__cpu_to_le32(4)) |
8 | #define aEXECUTE (__constant_cpu_to_le32(8)) | 8 | #define aEXECUTE (__cpu_to_le32(8)) |
9 | #define aDIR (__constant_cpu_to_le32(0x10)) | 9 | #define aDIR (__cpu_to_le32(0x10)) |
10 | #define aARCH (__constant_cpu_to_le32(0x20)) | 10 | #define aARCH (__cpu_to_le32(0x20)) |
11 | #define aSHARED (__constant_cpu_to_le32(0x80)) | 11 | #define aSHARED (__cpu_to_le32(0x80)) |
12 | #define aDONTSUBALLOCATE (__constant_cpu_to_le32(1L<<11)) | 12 | #define aDONTSUBALLOCATE (__cpu_to_le32(1L<<11)) |
13 | #define aTRANSACTIONAL (__constant_cpu_to_le32(1L<<12)) | 13 | #define aTRANSACTIONAL (__cpu_to_le32(1L<<12)) |
14 | #define aPURGE (__constant_cpu_to_le32(1L<<16)) | 14 | #define aPURGE (__cpu_to_le32(1L<<16)) |
15 | #define aRENAMEINHIBIT (__constant_cpu_to_le32(1L<<17)) | 15 | #define aRENAMEINHIBIT (__cpu_to_le32(1L<<17)) |
16 | #define aDELETEINHIBIT (__constant_cpu_to_le32(1L<<18)) | 16 | #define aDELETEINHIBIT (__cpu_to_le32(1L<<18)) |
17 | #define aDONTCOMPRESS (__constant_cpu_to_le32(1L<<27)) | 17 | #define aDONTCOMPRESS (__cpu_to_le32(1L<<27)) |
18 | 18 | ||
19 | #endif /* _NCP_NO */ | 19 | #endif /* _NCP_NO */ |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 355662aac940..bd8b4ca85a2a 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -1863,7 +1863,7 @@ static inline int skb_bond_should_drop(struct sk_buff *skb) | |||
1863 | 1863 | ||
1864 | if (dev->priv_flags & IFF_SLAVE_INACTIVE) { | 1864 | if (dev->priv_flags & IFF_SLAVE_INACTIVE) { |
1865 | if ((dev->priv_flags & IFF_SLAVE_NEEDARP) && | 1865 | if ((dev->priv_flags & IFF_SLAVE_NEEDARP) && |
1866 | skb->protocol == __constant_htons(ETH_P_ARP)) | 1866 | skb->protocol == __cpu_to_be16(ETH_P_ARP)) |
1867 | return 0; | 1867 | return 0; |
1868 | 1868 | ||
1869 | if (master->priv_flags & IFF_MASTER_ALB) { | 1869 | if (master->priv_flags & IFF_MASTER_ALB) { |
@@ -1872,7 +1872,7 @@ static inline int skb_bond_should_drop(struct sk_buff *skb) | |||
1872 | return 0; | 1872 | return 0; |
1873 | } | 1873 | } |
1874 | if (master->priv_flags & IFF_MASTER_8023AD && | 1874 | if (master->priv_flags & IFF_MASTER_8023AD && |
1875 | skb->protocol == __constant_htons(ETH_P_SLOW)) | 1875 | skb->protocol == __cpu_to_be16(ETH_P_SLOW)) |
1876 | return 0; | 1876 | return 0; |
1877 | 1877 | ||
1878 | return 1; | 1878 | return 1; |
diff --git a/include/linux/netfilter_bridge.h b/include/linux/netfilter_bridge.h index 499aa9375901..f8105e54716a 100644 --- a/include/linux/netfilter_bridge.h +++ b/include/linux/netfilter_bridge.h | |||
@@ -59,9 +59,9 @@ static inline int nf_bridge_maybe_copy_header(struct sk_buff *skb) | |||
59 | static inline unsigned int nf_bridge_encap_header_len(const struct sk_buff *skb) | 59 | static inline unsigned int nf_bridge_encap_header_len(const struct sk_buff *skb) |
60 | { | 60 | { |
61 | switch (skb->protocol) { | 61 | switch (skb->protocol) { |
62 | case __constant_htons(ETH_P_8021Q): | 62 | case __cpu_to_be16(ETH_P_8021Q): |
63 | return VLAN_HLEN; | 63 | return VLAN_HLEN; |
64 | case __constant_htons(ETH_P_PPP_SES): | 64 | case __cpu_to_be16(ETH_P_PPP_SES): |
65 | return PPPOE_SES_HLEN; | 65 | return PPPOE_SES_HLEN; |
66 | default: | 66 | default: |
67 | return 0; | 67 | return 0; |
diff --git a/include/linux/pim.h b/include/linux/pim.h index 1ba0661561a4..252bf6644c51 100644 --- a/include/linux/pim.h +++ b/include/linux/pim.h | |||
@@ -4,14 +4,14 @@ | |||
4 | #include <asm/byteorder.h> | 4 | #include <asm/byteorder.h> |
5 | 5 | ||
6 | /* Message types - V1 */ | 6 | /* Message types - V1 */ |
7 | #define PIM_V1_VERSION __constant_htonl(0x10000000) | 7 | #define PIM_V1_VERSION cpu_to_be32(0x10000000) |
8 | #define PIM_V1_REGISTER 1 | 8 | #define PIM_V1_REGISTER 1 |
9 | 9 | ||
10 | /* Message types - V2 */ | 10 | /* Message types - V2 */ |
11 | #define PIM_VERSION 2 | 11 | #define PIM_VERSION 2 |
12 | #define PIM_REGISTER 1 | 12 | #define PIM_REGISTER 1 |
13 | 13 | ||
14 | #define PIM_NULL_REGISTER __constant_htonl(0x40000000) | 14 | #define PIM_NULL_REGISTER cpu_to_be32(0x40000000) |
15 | 15 | ||
16 | /* PIMv2 register message header layout (ietf-draft-idmr-pimvsm-v2-00.ps */ | 16 | /* PIMv2 register message header layout (ietf-draft-idmr-pimvsm-v2-00.ps */ |
17 | struct pimreghdr | 17 | struct pimreghdr |
diff --git a/include/linux/sctp.h b/include/linux/sctp.h index 8ba1c320f975..bd50b371ffaa 100644 --- a/include/linux/sctp.h +++ b/include/linux/sctp.h | |||
@@ -172,35 +172,35 @@ typedef struct sctp_paramhdr { | |||
172 | typedef enum { | 172 | typedef enum { |
173 | 173 | ||
174 | /* RFC 2960 Section 3.3.5 */ | 174 | /* RFC 2960 Section 3.3.5 */ |
175 | SCTP_PARAM_HEARTBEAT_INFO = __constant_htons(1), | 175 | SCTP_PARAM_HEARTBEAT_INFO = cpu_to_be16(1), |
176 | /* RFC 2960 Section 3.3.2.1 */ | 176 | /* RFC 2960 Section 3.3.2.1 */ |
177 | SCTP_PARAM_IPV4_ADDRESS = __constant_htons(5), | 177 | SCTP_PARAM_IPV4_ADDRESS = cpu_to_be16(5), |
178 | SCTP_PARAM_IPV6_ADDRESS = __constant_htons(6), | 178 | SCTP_PARAM_IPV6_ADDRESS = cpu_to_be16(6), |
179 | SCTP_PARAM_STATE_COOKIE = __constant_htons(7), | 179 | SCTP_PARAM_STATE_COOKIE = cpu_to_be16(7), |
180 | SCTP_PARAM_UNRECOGNIZED_PARAMETERS = __constant_htons(8), | 180 | SCTP_PARAM_UNRECOGNIZED_PARAMETERS = cpu_to_be16(8), |
181 | SCTP_PARAM_COOKIE_PRESERVATIVE = __constant_htons(9), | 181 | SCTP_PARAM_COOKIE_PRESERVATIVE = cpu_to_be16(9), |
182 | SCTP_PARAM_HOST_NAME_ADDRESS = __constant_htons(11), | 182 | SCTP_PARAM_HOST_NAME_ADDRESS = cpu_to_be16(11), |
183 | SCTP_PARAM_SUPPORTED_ADDRESS_TYPES = __constant_htons(12), | 183 | SCTP_PARAM_SUPPORTED_ADDRESS_TYPES = cpu_to_be16(12), |
184 | SCTP_PARAM_ECN_CAPABLE = __constant_htons(0x8000), | 184 | SCTP_PARAM_ECN_CAPABLE = cpu_to_be16(0x8000), |
185 | 185 | ||
186 | /* AUTH Extension Section 3 */ | 186 | /* AUTH Extension Section 3 */ |
187 | SCTP_PARAM_RANDOM = __constant_htons(0x8002), | 187 | SCTP_PARAM_RANDOM = cpu_to_be16(0x8002), |
188 | SCTP_PARAM_CHUNKS = __constant_htons(0x8003), | 188 | SCTP_PARAM_CHUNKS = cpu_to_be16(0x8003), |
189 | SCTP_PARAM_HMAC_ALGO = __constant_htons(0x8004), | 189 | SCTP_PARAM_HMAC_ALGO = cpu_to_be16(0x8004), |
190 | 190 | ||
191 | /* Add-IP: Supported Extensions, Section 4.2 */ | 191 | /* Add-IP: Supported Extensions, Section 4.2 */ |
192 | SCTP_PARAM_SUPPORTED_EXT = __constant_htons(0x8008), | 192 | SCTP_PARAM_SUPPORTED_EXT = cpu_to_be16(0x8008), |
193 | 193 | ||
194 | /* PR-SCTP Sec 3.1 */ | 194 | /* PR-SCTP Sec 3.1 */ |
195 | SCTP_PARAM_FWD_TSN_SUPPORT = __constant_htons(0xc000), | 195 | SCTP_PARAM_FWD_TSN_SUPPORT = cpu_to_be16(0xc000), |
196 | 196 | ||
197 | /* Add-IP Extension. Section 3.2 */ | 197 | /* Add-IP Extension. Section 3.2 */ |
198 | SCTP_PARAM_ADD_IP = __constant_htons(0xc001), | 198 | SCTP_PARAM_ADD_IP = cpu_to_be16(0xc001), |
199 | SCTP_PARAM_DEL_IP = __constant_htons(0xc002), | 199 | SCTP_PARAM_DEL_IP = cpu_to_be16(0xc002), |
200 | SCTP_PARAM_ERR_CAUSE = __constant_htons(0xc003), | 200 | SCTP_PARAM_ERR_CAUSE = cpu_to_be16(0xc003), |
201 | SCTP_PARAM_SET_PRIMARY = __constant_htons(0xc004), | 201 | SCTP_PARAM_SET_PRIMARY = cpu_to_be16(0xc004), |
202 | SCTP_PARAM_SUCCESS_REPORT = __constant_htons(0xc005), | 202 | SCTP_PARAM_SUCCESS_REPORT = cpu_to_be16(0xc005), |
203 | SCTP_PARAM_ADAPTATION_LAYER_IND = __constant_htons(0xc006), | 203 | SCTP_PARAM_ADAPTATION_LAYER_IND = cpu_to_be16(0xc006), |
204 | 204 | ||
205 | } sctp_param_t; /* enum */ | 205 | } sctp_param_t; /* enum */ |
206 | 206 | ||
@@ -212,13 +212,13 @@ typedef enum { | |||
212 | * | 212 | * |
213 | */ | 213 | */ |
214 | typedef enum { | 214 | typedef enum { |
215 | SCTP_PARAM_ACTION_DISCARD = __constant_htons(0x0000), | 215 | SCTP_PARAM_ACTION_DISCARD = cpu_to_be16(0x0000), |
216 | SCTP_PARAM_ACTION_DISCARD_ERR = __constant_htons(0x4000), | 216 | SCTP_PARAM_ACTION_DISCARD_ERR = cpu_to_be16(0x4000), |
217 | SCTP_PARAM_ACTION_SKIP = __constant_htons(0x8000), | 217 | SCTP_PARAM_ACTION_SKIP = cpu_to_be16(0x8000), |
218 | SCTP_PARAM_ACTION_SKIP_ERR = __constant_htons(0xc000), | 218 | SCTP_PARAM_ACTION_SKIP_ERR = cpu_to_be16(0xc000), |
219 | } sctp_param_action_t; | 219 | } sctp_param_action_t; |
220 | 220 | ||
221 | enum { SCTP_PARAM_ACTION_MASK = __constant_htons(0xc000), }; | 221 | enum { SCTP_PARAM_ACTION_MASK = cpu_to_be16(0xc000), }; |
222 | 222 | ||
223 | /* RFC 2960 Section 3.3.1 Payload Data (DATA) (0) */ | 223 | /* RFC 2960 Section 3.3.1 Payload Data (DATA) (0) */ |
224 | 224 | ||
@@ -457,17 +457,17 @@ typedef struct sctp_operr_chunk { | |||
457 | */ | 457 | */ |
458 | typedef enum { | 458 | typedef enum { |
459 | 459 | ||
460 | SCTP_ERROR_NO_ERROR = __constant_htons(0x00), | 460 | SCTP_ERROR_NO_ERROR = cpu_to_be16(0x00), |
461 | SCTP_ERROR_INV_STRM = __constant_htons(0x01), | 461 | SCTP_ERROR_INV_STRM = cpu_to_be16(0x01), |
462 | SCTP_ERROR_MISS_PARAM = __constant_htons(0x02), | 462 | SCTP_ERROR_MISS_PARAM = cpu_to_be16(0x02), |
463 | SCTP_ERROR_STALE_COOKIE = __constant_htons(0x03), | 463 | SCTP_ERROR_STALE_COOKIE = cpu_to_be16(0x03), |
464 | SCTP_ERROR_NO_RESOURCE = __constant_htons(0x04), | 464 | SCTP_ERROR_NO_RESOURCE = cpu_to_be16(0x04), |
465 | SCTP_ERROR_DNS_FAILED = __constant_htons(0x05), | 465 | SCTP_ERROR_DNS_FAILED = cpu_to_be16(0x05), |
466 | SCTP_ERROR_UNKNOWN_CHUNK = __constant_htons(0x06), | 466 | SCTP_ERROR_UNKNOWN_CHUNK = cpu_to_be16(0x06), |
467 | SCTP_ERROR_INV_PARAM = __constant_htons(0x07), | 467 | SCTP_ERROR_INV_PARAM = cpu_to_be16(0x07), |
468 | SCTP_ERROR_UNKNOWN_PARAM = __constant_htons(0x08), | 468 | SCTP_ERROR_UNKNOWN_PARAM = cpu_to_be16(0x08), |
469 | SCTP_ERROR_NO_DATA = __constant_htons(0x09), | 469 | SCTP_ERROR_NO_DATA = cpu_to_be16(0x09), |
470 | SCTP_ERROR_COOKIE_IN_SHUTDOWN = __constant_htons(0x0a), | 470 | SCTP_ERROR_COOKIE_IN_SHUTDOWN = cpu_to_be16(0x0a), |
471 | 471 | ||
472 | 472 | ||
473 | /* SCTP Implementation Guide: | 473 | /* SCTP Implementation Guide: |
@@ -476,9 +476,9 @@ typedef enum { | |||
476 | * 13 Protocol Violation | 476 | * 13 Protocol Violation |
477 | */ | 477 | */ |
478 | 478 | ||
479 | SCTP_ERROR_RESTART = __constant_htons(0x0b), | 479 | SCTP_ERROR_RESTART = cpu_to_be16(0x0b), |
480 | SCTP_ERROR_USER_ABORT = __constant_htons(0x0c), | 480 | SCTP_ERROR_USER_ABORT = cpu_to_be16(0x0c), |
481 | SCTP_ERROR_PROTO_VIOLATION = __constant_htons(0x0d), | 481 | SCTP_ERROR_PROTO_VIOLATION = cpu_to_be16(0x0d), |
482 | 482 | ||
483 | /* ADDIP Section 3.3 New Error Causes | 483 | /* ADDIP Section 3.3 New Error Causes |
484 | * | 484 | * |
@@ -493,11 +493,11 @@ typedef enum { | |||
493 | * 0x0103 Association Aborted due to illegal ASCONF-ACK | 493 | * 0x0103 Association Aborted due to illegal ASCONF-ACK |
494 | * 0x0104 Request refused - no authorization. | 494 | * 0x0104 Request refused - no authorization. |
495 | */ | 495 | */ |
496 | SCTP_ERROR_DEL_LAST_IP = __constant_htons(0x0100), | 496 | SCTP_ERROR_DEL_LAST_IP = cpu_to_be16(0x0100), |
497 | SCTP_ERROR_RSRC_LOW = __constant_htons(0x0101), | 497 | SCTP_ERROR_RSRC_LOW = cpu_to_be16(0x0101), |
498 | SCTP_ERROR_DEL_SRC_IP = __constant_htons(0x0102), | 498 | SCTP_ERROR_DEL_SRC_IP = cpu_to_be16(0x0102), |
499 | SCTP_ERROR_ASCONF_ACK = __constant_htons(0x0103), | 499 | SCTP_ERROR_ASCONF_ACK = cpu_to_be16(0x0103), |
500 | SCTP_ERROR_REQ_REFUSED = __constant_htons(0x0104), | 500 | SCTP_ERROR_REQ_REFUSED = cpu_to_be16(0x0104), |
501 | 501 | ||
502 | /* AUTH Section 4. New Error Cause | 502 | /* AUTH Section 4. New Error Cause |
503 | * | 503 | * |
@@ -509,7 +509,7 @@ typedef enum { | |||
509 | * -------------------------------------------------------------- | 509 | * -------------------------------------------------------------- |
510 | * 0x0105 Unsupported HMAC Identifier | 510 | * 0x0105 Unsupported HMAC Identifier |
511 | */ | 511 | */ |
512 | SCTP_ERROR_UNSUP_HMAC = __constant_htons(0x0105) | 512 | SCTP_ERROR_UNSUP_HMAC = cpu_to_be16(0x0105) |
513 | } sctp_error_t; | 513 | } sctp_error_t; |
514 | 514 | ||
515 | 515 | ||
diff --git a/include/linux/tcp.h b/include/linux/tcp.h index fe77e1499ab7..0cd99e6baca5 100644 --- a/include/linux/tcp.h +++ b/include/linux/tcp.h | |||
@@ -69,16 +69,16 @@ union tcp_word_hdr { | |||
69 | #define tcp_flag_word(tp) ( ((union tcp_word_hdr *)(tp))->words [3]) | 69 | #define tcp_flag_word(tp) ( ((union tcp_word_hdr *)(tp))->words [3]) |
70 | 70 | ||
71 | enum { | 71 | enum { |
72 | TCP_FLAG_CWR = __constant_htonl(0x00800000), | 72 | TCP_FLAG_CWR = __cpu_to_be32(0x00800000), |
73 | TCP_FLAG_ECE = __constant_htonl(0x00400000), | 73 | TCP_FLAG_ECE = __cpu_to_be32(0x00400000), |
74 | TCP_FLAG_URG = __constant_htonl(0x00200000), | 74 | TCP_FLAG_URG = __cpu_to_be32(0x00200000), |
75 | TCP_FLAG_ACK = __constant_htonl(0x00100000), | 75 | TCP_FLAG_ACK = __cpu_to_be32(0x00100000), |
76 | TCP_FLAG_PSH = __constant_htonl(0x00080000), | 76 | TCP_FLAG_PSH = __cpu_to_be32(0x00080000), |
77 | TCP_FLAG_RST = __constant_htonl(0x00040000), | 77 | TCP_FLAG_RST = __cpu_to_be32(0x00040000), |
78 | TCP_FLAG_SYN = __constant_htonl(0x00020000), | 78 | TCP_FLAG_SYN = __cpu_to_be32(0x00020000), |
79 | TCP_FLAG_FIN = __constant_htonl(0x00010000), | 79 | TCP_FLAG_FIN = __cpu_to_be32(0x00010000), |
80 | TCP_RESERVED_BITS = __constant_htonl(0x0F000000), | 80 | TCP_RESERVED_BITS = __cpu_to_be32(0x0F000000), |
81 | TCP_DATA_OFFSET = __constant_htonl(0xF0000000) | 81 | TCP_DATA_OFFSET = __cpu_to_be32(0xF0000000) |
82 | }; | 82 | }; |
83 | 83 | ||
84 | /* TCP socket options */ | 84 | /* TCP socket options */ |
diff --git a/include/linux/usb/rndis_host.h b/include/linux/usb/rndis_host.h index 0a6e6d4b929a..37836b937d97 100644 --- a/include/linux/usb/rndis_host.h +++ b/include/linux/usb/rndis_host.h | |||
@@ -49,48 +49,45 @@ struct rndis_msg_hdr { | |||
49 | */ | 49 | */ |
50 | #define RNDIS_CONTROL_TIMEOUT_MS (5 * 1000) | 50 | #define RNDIS_CONTROL_TIMEOUT_MS (5 * 1000) |
51 | 51 | ||
52 | 52 | #define RNDIS_MSG_COMPLETION cpu_to_le32(0x80000000) | |
53 | #define ccpu2 __constant_cpu_to_le32 | ||
54 | |||
55 | #define RNDIS_MSG_COMPLETION ccpu2(0x80000000) | ||
56 | 53 | ||
57 | /* codes for "msg_type" field of rndis messages; | 54 | /* codes for "msg_type" field of rndis messages; |
58 | * only the data channel uses packet messages (maybe batched); | 55 | * only the data channel uses packet messages (maybe batched); |
59 | * everything else goes on the control channel. | 56 | * everything else goes on the control channel. |
60 | */ | 57 | */ |
61 | #define RNDIS_MSG_PACKET ccpu2(0x00000001) /* 1-N packets */ | 58 | #define RNDIS_MSG_PACKET cpu_to_le32(0x00000001) /* 1-N packets */ |
62 | #define RNDIS_MSG_INIT ccpu2(0x00000002) | 59 | #define RNDIS_MSG_INIT cpu_to_le32(0x00000002) |
63 | #define RNDIS_MSG_INIT_C (RNDIS_MSG_INIT|RNDIS_MSG_COMPLETION) | 60 | #define RNDIS_MSG_INIT_C (RNDIS_MSG_INIT|RNDIS_MSG_COMPLETION) |
64 | #define RNDIS_MSG_HALT ccpu2(0x00000003) | 61 | #define RNDIS_MSG_HALT cpu_to_le32(0x00000003) |
65 | #define RNDIS_MSG_QUERY ccpu2(0x00000004) | 62 | #define RNDIS_MSG_QUERY cpu_to_le32(0x00000004) |
66 | #define RNDIS_MSG_QUERY_C (RNDIS_MSG_QUERY|RNDIS_MSG_COMPLETION) | 63 | #define RNDIS_MSG_QUERY_C (RNDIS_MSG_QUERY|RNDIS_MSG_COMPLETION) |
67 | #define RNDIS_MSG_SET ccpu2(0x00000005) | 64 | #define RNDIS_MSG_SET cpu_to_le32(0x00000005) |
68 | #define RNDIS_MSG_SET_C (RNDIS_MSG_SET|RNDIS_MSG_COMPLETION) | 65 | #define RNDIS_MSG_SET_C (RNDIS_MSG_SET|RNDIS_MSG_COMPLETION) |
69 | #define RNDIS_MSG_RESET ccpu2(0x00000006) | 66 | #define RNDIS_MSG_RESET cpu_to_le32(0x00000006) |
70 | #define RNDIS_MSG_RESET_C (RNDIS_MSG_RESET|RNDIS_MSG_COMPLETION) | 67 | #define RNDIS_MSG_RESET_C (RNDIS_MSG_RESET|RNDIS_MSG_COMPLETION) |
71 | #define RNDIS_MSG_INDICATE ccpu2(0x00000007) | 68 | #define RNDIS_MSG_INDICATE cpu_to_le32(0x00000007) |
72 | #define RNDIS_MSG_KEEPALIVE ccpu2(0x00000008) | 69 | #define RNDIS_MSG_KEEPALIVE cpu_to_le32(0x00000008) |
73 | #define RNDIS_MSG_KEEPALIVE_C (RNDIS_MSG_KEEPALIVE|RNDIS_MSG_COMPLETION) | 70 | #define RNDIS_MSG_KEEPALIVE_C (RNDIS_MSG_KEEPALIVE|RNDIS_MSG_COMPLETION) |
74 | 71 | ||
75 | /* codes for "status" field of completion messages */ | 72 | /* codes for "status" field of completion messages */ |
76 | #define RNDIS_STATUS_SUCCESS ccpu2(0x00000000) | 73 | #define RNDIS_STATUS_SUCCESS cpu_to_le32(0x00000000) |
77 | #define RNDIS_STATUS_FAILURE ccpu2(0xc0000001) | 74 | #define RNDIS_STATUS_FAILURE cpu_to_le32(0xc0000001) |
78 | #define RNDIS_STATUS_INVALID_DATA ccpu2(0xc0010015) | 75 | #define RNDIS_STATUS_INVALID_DATA cpu_to_le32(0xc0010015) |
79 | #define RNDIS_STATUS_NOT_SUPPORTED ccpu2(0xc00000bb) | 76 | #define RNDIS_STATUS_NOT_SUPPORTED cpu_to_le32(0xc00000bb) |
80 | #define RNDIS_STATUS_MEDIA_CONNECT ccpu2(0x4001000b) | 77 | #define RNDIS_STATUS_MEDIA_CONNECT cpu_to_le32(0x4001000b) |
81 | #define RNDIS_STATUS_MEDIA_DISCONNECT ccpu2(0x4001000c) | 78 | #define RNDIS_STATUS_MEDIA_DISCONNECT cpu_to_le32(0x4001000c) |
82 | 79 | ||
83 | /* codes for OID_GEN_PHYSICAL_MEDIUM */ | 80 | /* codes for OID_GEN_PHYSICAL_MEDIUM */ |
84 | #define RNDIS_PHYSICAL_MEDIUM_UNSPECIFIED ccpu2(0x00000000) | 81 | #define RNDIS_PHYSICAL_MEDIUM_UNSPECIFIED cpu_to_le32(0x00000000) |
85 | #define RNDIS_PHYSICAL_MEDIUM_WIRELESS_LAN ccpu2(0x00000001) | 82 | #define RNDIS_PHYSICAL_MEDIUM_WIRELESS_LAN cpu_to_le32(0x00000001) |
86 | #define RNDIS_PHYSICAL_MEDIUM_CABLE_MODEM ccpu2(0x00000002) | 83 | #define RNDIS_PHYSICAL_MEDIUM_CABLE_MODEM cpu_to_le32(0x00000002) |
87 | #define RNDIS_PHYSICAL_MEDIUM_PHONE_LINE ccpu2(0x00000003) | 84 | #define RNDIS_PHYSICAL_MEDIUM_PHONE_LINE cpu_to_le32(0x00000003) |
88 | #define RNDIS_PHYSICAL_MEDIUM_POWER_LINE ccpu2(0x00000004) | 85 | #define RNDIS_PHYSICAL_MEDIUM_POWER_LINE cpu_to_le32(0x00000004) |
89 | #define RNDIS_PHYSICAL_MEDIUM_DSL ccpu2(0x00000005) | 86 | #define RNDIS_PHYSICAL_MEDIUM_DSL cpu_to_le32(0x00000005) |
90 | #define RNDIS_PHYSICAL_MEDIUM_FIBRE_CHANNEL ccpu2(0x00000006) | 87 | #define RNDIS_PHYSICAL_MEDIUM_FIBRE_CHANNEL cpu_to_le32(0x00000006) |
91 | #define RNDIS_PHYSICAL_MEDIUM_1394 ccpu2(0x00000007) | 88 | #define RNDIS_PHYSICAL_MEDIUM_1394 cpu_to_le32(0x00000007) |
92 | #define RNDIS_PHYSICAL_MEDIUM_WIRELESS_WAN ccpu2(0x00000008) | 89 | #define RNDIS_PHYSICAL_MEDIUM_WIRELESS_WAN cpu_to_le32(0x00000008) |
93 | #define RNDIS_PHYSICAL_MEDIUM_MAX ccpu2(0x00000009) | 90 | #define RNDIS_PHYSICAL_MEDIUM_MAX cpu_to_le32(0x00000009) |
94 | 91 | ||
95 | struct rndis_data_hdr { | 92 | struct rndis_data_hdr { |
96 | __le32 msg_type; /* RNDIS_MSG_PACKET */ | 93 | __le32 msg_type; /* RNDIS_MSG_PACKET */ |
@@ -228,24 +225,24 @@ struct rndis_keepalive_c { /* IN (optionally OUT) */ | |||
228 | * there are gobs more that may optionally be supported. We'll avoid as much | 225 | * there are gobs more that may optionally be supported. We'll avoid as much |
229 | * of that mess as possible. | 226 | * of that mess as possible. |
230 | */ | 227 | */ |
231 | #define OID_802_3_PERMANENT_ADDRESS ccpu2(0x01010101) | 228 | #define OID_802_3_PERMANENT_ADDRESS cpu_to_le32(0x01010101) |
232 | #define OID_GEN_MAXIMUM_FRAME_SIZE ccpu2(0x00010106) | 229 | #define OID_GEN_MAXIMUM_FRAME_SIZE cpu_to_le32(0x00010106) |
233 | #define OID_GEN_CURRENT_PACKET_FILTER ccpu2(0x0001010e) | 230 | #define OID_GEN_CURRENT_PACKET_FILTER cpu_to_le32(0x0001010e) |
234 | #define OID_GEN_PHYSICAL_MEDIUM ccpu2(0x00010202) | 231 | #define OID_GEN_PHYSICAL_MEDIUM cpu_to_le32(0x00010202) |
235 | 232 | ||
236 | /* packet filter bits used by OID_GEN_CURRENT_PACKET_FILTER */ | 233 | /* packet filter bits used by OID_GEN_CURRENT_PACKET_FILTER */ |
237 | #define RNDIS_PACKET_TYPE_DIRECTED ccpu2(0x00000001) | 234 | #define RNDIS_PACKET_TYPE_DIRECTED cpu_to_le32(0x00000001) |
238 | #define RNDIS_PACKET_TYPE_MULTICAST ccpu2(0x00000002) | 235 | #define RNDIS_PACKET_TYPE_MULTICAST cpu_to_le32(0x00000002) |
239 | #define RNDIS_PACKET_TYPE_ALL_MULTICAST ccpu2(0x00000004) | 236 | #define RNDIS_PACKET_TYPE_ALL_MULTICAST cpu_to_le32(0x00000004) |
240 | #define RNDIS_PACKET_TYPE_BROADCAST ccpu2(0x00000008) | 237 | #define RNDIS_PACKET_TYPE_BROADCAST cpu_to_le32(0x00000008) |
241 | #define RNDIS_PACKET_TYPE_SOURCE_ROUTING ccpu2(0x00000010) | 238 | #define RNDIS_PACKET_TYPE_SOURCE_ROUTING cpu_to_le32(0x00000010) |
242 | #define RNDIS_PACKET_TYPE_PROMISCUOUS ccpu2(0x00000020) | 239 | #define RNDIS_PACKET_TYPE_PROMISCUOUS cpu_to_le32(0x00000020) |
243 | #define RNDIS_PACKET_TYPE_SMT ccpu2(0x00000040) | 240 | #define RNDIS_PACKET_TYPE_SMT cpu_to_le32(0x00000040) |
244 | #define RNDIS_PACKET_TYPE_ALL_LOCAL ccpu2(0x00000080) | 241 | #define RNDIS_PACKET_TYPE_ALL_LOCAL cpu_to_le32(0x00000080) |
245 | #define RNDIS_PACKET_TYPE_GROUP ccpu2(0x00001000) | 242 | #define RNDIS_PACKET_TYPE_GROUP cpu_to_le32(0x00001000) |
246 | #define RNDIS_PACKET_TYPE_ALL_FUNCTIONAL ccpu2(0x00002000) | 243 | #define RNDIS_PACKET_TYPE_ALL_FUNCTIONAL cpu_to_le32(0x00002000) |
247 | #define RNDIS_PACKET_TYPE_FUNCTIONAL ccpu2(0x00004000) | 244 | #define RNDIS_PACKET_TYPE_FUNCTIONAL cpu_to_le32(0x00004000) |
248 | #define RNDIS_PACKET_TYPE_MAC_FRAME ccpu2(0x00008000) | 245 | #define RNDIS_PACKET_TYPE_MAC_FRAME cpu_to_le32(0x00008000) |
249 | 246 | ||
250 | /* default filter used with RNDIS devices */ | 247 | /* default filter used with RNDIS devices */ |
251 | #define RNDIS_DEFAULT_FILTER ( \ | 248 | #define RNDIS_DEFAULT_FILTER ( \ |
diff --git a/include/net/inet_ecn.h b/include/net/inet_ecn.h index 7040a782c656..9b5d08f4f6e8 100644 --- a/include/net/inet_ecn.h +++ b/include/net/inet_ecn.h | |||
@@ -113,12 +113,12 @@ static inline void ipv6_copy_dscp(unsigned int dscp, struct ipv6hdr *inner) | |||
113 | static inline int INET_ECN_set_ce(struct sk_buff *skb) | 113 | static inline int INET_ECN_set_ce(struct sk_buff *skb) |
114 | { | 114 | { |
115 | switch (skb->protocol) { | 115 | switch (skb->protocol) { |
116 | case __constant_htons(ETH_P_IP): | 116 | case cpu_to_be16(ETH_P_IP): |
117 | if (skb->network_header + sizeof(struct iphdr) <= skb->tail) | 117 | if (skb->network_header + sizeof(struct iphdr) <= skb->tail) |
118 | return IP_ECN_set_ce(ip_hdr(skb)); | 118 | return IP_ECN_set_ce(ip_hdr(skb)); |
119 | break; | 119 | break; |
120 | 120 | ||
121 | case __constant_htons(ETH_P_IPV6): | 121 | case cpu_to_be16(ETH_P_IPV6): |
122 | if (skb->network_header + sizeof(struct ipv6hdr) <= skb->tail) | 122 | if (skb->network_header + sizeof(struct ipv6hdr) <= skb->tail) |
123 | return IP6_ECN_set_ce(ipv6_hdr(skb)); | 123 | return IP6_ECN_set_ce(ipv6_hdr(skb)); |
124 | break; | 124 | break; |
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h index ab9b003ab671..bbae1e87efcd 100644 --- a/include/net/ip_vs.h +++ b/include/net/ip_vs.h | |||
@@ -184,8 +184,8 @@ static inline const char *ip_vs_dbg_addr(int af, char *buf, size_t buf_len, | |||
184 | /* | 184 | /* |
185 | * The port number of FTP service (in network order). | 185 | * The port number of FTP service (in network order). |
186 | */ | 186 | */ |
187 | #define FTPPORT __constant_htons(21) | 187 | #define FTPPORT cpu_to_be16(21) |
188 | #define FTPDATA __constant_htons(20) | 188 | #define FTPDATA cpu_to_be16(20) |
189 | 189 | ||
190 | /* | 190 | /* |
191 | * TCP State Values | 191 | * TCP State Values |
diff --git a/include/net/ipv6.h b/include/net/ipv6.h index 6d5b58a1c743..c1f16fc49ade 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h | |||
@@ -196,8 +196,8 @@ struct ip6_flowlabel | |||
196 | struct net *fl_net; | 196 | struct net *fl_net; |
197 | }; | 197 | }; |
198 | 198 | ||
199 | #define IPV6_FLOWINFO_MASK __constant_htonl(0x0FFFFFFF) | 199 | #define IPV6_FLOWINFO_MASK cpu_to_be32(0x0FFFFFFF) |
200 | #define IPV6_FLOWLABEL_MASK __constant_htonl(0x000FFFFF) | 200 | #define IPV6_FLOWLABEL_MASK cpu_to_be32(0x000FFFFF) |
201 | 201 | ||
202 | struct ipv6_fl_socklist | 202 | struct ipv6_fl_socklist |
203 | { | 203 | { |
diff --git a/include/net/ipx.h b/include/net/ipx.h index 4cc0b4eca948..a14121dd1932 100644 --- a/include/net/ipx.h +++ b/include/net/ipx.h | |||
@@ -27,7 +27,7 @@ struct ipx_address { | |||
27 | 27 | ||
28 | struct ipxhdr { | 28 | struct ipxhdr { |
29 | __be16 ipx_checksum __attribute__ ((packed)); | 29 | __be16 ipx_checksum __attribute__ ((packed)); |
30 | #define IPX_NO_CHECKSUM __constant_htons(0xFFFF) | 30 | #define IPX_NO_CHECKSUM cpu_to_be16(0xFFFF) |
31 | __be16 ipx_pktsize __attribute__ ((packed)); | 31 | __be16 ipx_pktsize __attribute__ ((packed)); |
32 | __u8 ipx_tctrl; | 32 | __u8 ipx_tctrl; |
33 | __u8 ipx_type; | 33 | __u8 ipx_type; |
diff --git a/include/net/transp_v6.h b/include/net/transp_v6.h index 876b6f2bb4fd..bfb240c6cf79 100644 --- a/include/net/transp_v6.h +++ b/include/net/transp_v6.h | |||
@@ -46,7 +46,7 @@ extern int datagram_send_ctl(struct net *net, | |||
46 | struct ipv6_txoptions *opt, | 46 | struct ipv6_txoptions *opt, |
47 | int *hlimit, int *tclass); | 47 | int *hlimit, int *tclass); |
48 | 48 | ||
49 | #define LOOPBACK4_IPV6 __constant_htonl(0x7f000006) | 49 | #define LOOPBACK4_IPV6 cpu_to_be32(0x7f000006) |
50 | 50 | ||
51 | /* | 51 | /* |
52 | * address family specific functions | 52 | * address family specific functions |
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index 936e333e7ce5..c179318edd92 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h | |||
@@ -388,7 +388,7 @@ enum { | |||
388 | IB_MULTICAST_QPN = 0xffffff | 388 | IB_MULTICAST_QPN = 0xffffff |
389 | }; | 389 | }; |
390 | 390 | ||
391 | #define IB_LID_PERMISSIVE __constant_htons(0xFFFF) | 391 | #define IB_LID_PERMISSIVE cpu_to_be16(0xFFFF) |
392 | 392 | ||
393 | enum ib_ah_flags { | 393 | enum ib_ah_flags { |
394 | IB_AH_GRH = 1 | 394 | IB_AH_GRH = 1 |
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 7657cec5973d..ab7d2e9f02fa 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c | |||
@@ -1412,8 +1412,13 @@ static inline int spd_fill_page(struct splice_pipe_desc *spd, struct page *page, | |||
1412 | static inline void __segment_seek(struct page **page, unsigned int *poff, | 1412 | static inline void __segment_seek(struct page **page, unsigned int *poff, |
1413 | unsigned int *plen, unsigned int off) | 1413 | unsigned int *plen, unsigned int off) |
1414 | { | 1414 | { |
1415 | unsigned long n; | ||
1416 | |||
1415 | *poff += off; | 1417 | *poff += off; |
1416 | *page += *poff / PAGE_SIZE; | 1418 | n = *poff / PAGE_SIZE; |
1419 | if (n) | ||
1420 | *page = nth_page(*page, n); | ||
1421 | |||
1417 | *poff = *poff % PAGE_SIZE; | 1422 | *poff = *poff % PAGE_SIZE; |
1418 | *plen -= off; | 1423 | *plen -= off; |
1419 | } | 1424 | } |