aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorHarvey Harrison <harvey.harrison@gmail.com>2009-02-15 01:56:56 -0500
committerDavid S. Miller <davem@davemloft.net>2009-02-15 01:56:56 -0500
commit35c26c2cf6a6a2d1c48add732d8ba002bd90784c (patch)
treeace3fb06bd279cf90ab8994d56ae12051488b2c8 /drivers/net/wireless
parentab46d779661d7a03b7aa00279eead5dc3f0b3901 (diff)
rndis: remove private wrapper of __constant_cpu_to_le32
Use cpu_to_le32 directly as it handles constant folding now, replace direct uses of __constant_cpu_to_{endian} as well. Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Acked-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/rndis_wlan.c90
1 files changed, 45 insertions, 45 deletions
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