diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2012-05-11 18:16:16 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-05-12 15:05:59 -0400 |
commit | 4cc6c4d5842fb2fd462099fd477f8fc863237d96 (patch) | |
tree | cad852e8cf4f5f0bcecc3e32da9676f2febda6b6 /drivers | |
parent | 8cdddc3f9d6692f5690841468a9f63c19fb734ed (diff) |
usb/net: rndis: merge duplicate 802_* OIDs
The 802_* network OIDs were duplicated, so let's merge them and
use the RNDIS_* prefixed definitions from the hyperV driver.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/rndis_wlan.c | 224 | ||||
-rw-r--r-- | drivers/usb/gadget/rndis.c | 62 |
2 files changed, 161 insertions, 125 deletions
diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c index 3d050a006e9d..0dcc8e49dbb4 100644 --- a/drivers/net/wireless/rndis_wlan.c +++ b/drivers/net/wireless/rndis_wlan.c | |||
@@ -641,36 +641,36 @@ static const char *oid_to_string(__le32 oid) | |||
641 | OID_STR(RNDIS_OID_GEN_RCV_ERROR); | 641 | OID_STR(RNDIS_OID_GEN_RCV_ERROR); |
642 | OID_STR(RNDIS_OID_GEN_RCV_NO_BUFFER); | 642 | OID_STR(RNDIS_OID_GEN_RCV_NO_BUFFER); |
643 | 643 | ||
644 | OID_STR(OID_802_3_CURRENT_ADDRESS); | 644 | OID_STR(RNDIS_OID_802_3_CURRENT_ADDRESS); |
645 | OID_STR(OID_802_3_MULTICAST_LIST); | 645 | OID_STR(RNDIS_OID_802_3_MULTICAST_LIST); |
646 | OID_STR(OID_802_3_MAXIMUM_LIST_SIZE); | 646 | OID_STR(RNDIS_OID_802_3_MAXIMUM_LIST_SIZE); |
647 | 647 | ||
648 | OID_STR(OID_802_11_BSSID); | 648 | OID_STR(RNDIS_OID_802_11_BSSID); |
649 | OID_STR(OID_802_11_SSID); | 649 | OID_STR(RNDIS_OID_802_11_SSID); |
650 | OID_STR(OID_802_11_INFRASTRUCTURE_MODE); | 650 | OID_STR(RNDIS_OID_802_11_INFRASTRUCTURE_MODE); |
651 | OID_STR(OID_802_11_ADD_WEP); | 651 | OID_STR(RNDIS_OID_802_11_ADD_WEP); |
652 | OID_STR(OID_802_11_REMOVE_WEP); | 652 | OID_STR(RNDIS_OID_802_11_REMOVE_WEP); |
653 | OID_STR(OID_802_11_DISASSOCIATE); | 653 | OID_STR(RNDIS_OID_802_11_DISASSOCIATE); |
654 | OID_STR(OID_802_11_AUTHENTICATION_MODE); | 654 | OID_STR(RNDIS_OID_802_11_AUTHENTICATION_MODE); |
655 | OID_STR(OID_802_11_PRIVACY_FILTER); | 655 | OID_STR(RNDIS_OID_802_11_PRIVACY_FILTER); |
656 | OID_STR(OID_802_11_BSSID_LIST_SCAN); | 656 | OID_STR(RNDIS_OID_802_11_BSSID_LIST_SCAN); |
657 | OID_STR(OID_802_11_ENCRYPTION_STATUS); | 657 | OID_STR(RNDIS_OID_802_11_ENCRYPTION_STATUS); |
658 | OID_STR(OID_802_11_ADD_KEY); | 658 | OID_STR(RNDIS_OID_802_11_ADD_KEY); |
659 | OID_STR(OID_802_11_REMOVE_KEY); | 659 | OID_STR(RNDIS_OID_802_11_REMOVE_KEY); |
660 | OID_STR(OID_802_11_ASSOCIATION_INFORMATION); | 660 | OID_STR(RNDIS_OID_802_11_ASSOCIATION_INFORMATION); |
661 | OID_STR(OID_802_11_CAPABILITY); | 661 | OID_STR(RNDIS_OID_802_11_CAPABILITY); |
662 | OID_STR(OID_802_11_PMKID); | 662 | OID_STR(RNDIS_OID_802_11_PMKID); |
663 | OID_STR(OID_802_11_NETWORK_TYPES_SUPPORTED); | 663 | OID_STR(RNDIS_OID_802_11_NETWORK_TYPES_SUPPORTED); |
664 | OID_STR(OID_802_11_NETWORK_TYPE_IN_USE); | 664 | OID_STR(RNDIS_OID_802_11_NETWORK_TYPE_IN_USE); |
665 | OID_STR(OID_802_11_TX_POWER_LEVEL); | 665 | OID_STR(RNDIS_OID_802_11_TX_POWER_LEVEL); |
666 | OID_STR(OID_802_11_RSSI); | 666 | OID_STR(RNDIS_OID_802_11_RSSI); |
667 | OID_STR(OID_802_11_RSSI_TRIGGER); | 667 | OID_STR(RNDIS_OID_802_11_RSSI_TRIGGER); |
668 | OID_STR(OID_802_11_FRAGMENTATION_THRESHOLD); | 668 | OID_STR(RNDIS_OID_802_11_FRAGMENTATION_THRESHOLD); |
669 | OID_STR(OID_802_11_RTS_THRESHOLD); | 669 | OID_STR(RNDIS_OID_802_11_RTS_THRESHOLD); |
670 | OID_STR(OID_802_11_SUPPORTED_RATES); | 670 | OID_STR(RNDIS_OID_802_11_SUPPORTED_RATES); |
671 | OID_STR(OID_802_11_CONFIGURATION); | 671 | OID_STR(RNDIS_OID_802_11_CONFIGURATION); |
672 | OID_STR(OID_802_11_POWER_MODE); | 672 | OID_STR(RNDIS_OID_802_11_POWER_MODE); |
673 | OID_STR(OID_802_11_BSSID_LIST); | 673 | OID_STR(RNDIS_OID_802_11_BSSID_LIST); |
674 | #undef OID_STR | 674 | #undef OID_STR |
675 | } | 675 | } |
676 | 676 | ||
@@ -982,9 +982,9 @@ static int rndis_start_bssid_list_scan(struct usbnet *usbdev) | |||
982 | { | 982 | { |
983 | __le32 tmp; | 983 | __le32 tmp; |
984 | 984 | ||
985 | /* Note: OID_802_11_BSSID_LIST_SCAN clears internal BSS list. */ | 985 | /* Note: RNDIS_OID_802_11_BSSID_LIST_SCAN clears internal BSS list. */ |
986 | tmp = cpu_to_le32(1); | 986 | tmp = cpu_to_le32(1); |
987 | return rndis_set_oid(usbdev, cpu_to_le32(OID_802_11_BSSID_LIST_SCAN), &tmp, | 987 | return rndis_set_oid(usbdev, cpu_to_le32(RNDIS_OID_802_11_BSSID_LIST_SCAN), &tmp, |
988 | sizeof(tmp)); | 988 | sizeof(tmp)); |
989 | } | 989 | } |
990 | 990 | ||
@@ -993,7 +993,8 @@ static int set_essid(struct usbnet *usbdev, struct ndis_80211_ssid *ssid) | |||
993 | struct rndis_wlan_private *priv = get_rndis_wlan_priv(usbdev); | 993 | struct rndis_wlan_private *priv = get_rndis_wlan_priv(usbdev); |
994 | int ret; | 994 | int ret; |
995 | 995 | ||
996 | ret = rndis_set_oid(usbdev, cpu_to_le32(OID_802_11_SSID), ssid, sizeof(*ssid)); | 996 | ret = rndis_set_oid(usbdev, cpu_to_le32(RNDIS_OID_802_11_SSID), |
997 | ssid, sizeof(*ssid)); | ||
997 | if (ret < 0) { | 998 | if (ret < 0) { |
998 | netdev_warn(usbdev->net, "setting SSID failed (%08X)\n", ret); | 999 | netdev_warn(usbdev->net, "setting SSID failed (%08X)\n", ret); |
999 | return ret; | 1000 | return ret; |
@@ -1010,7 +1011,8 @@ static int set_bssid(struct usbnet *usbdev, const u8 *bssid) | |||
1010 | { | 1011 | { |
1011 | int ret; | 1012 | int ret; |
1012 | 1013 | ||
1013 | ret = rndis_set_oid(usbdev, cpu_to_le32(OID_802_11_BSSID), bssid, ETH_ALEN); | 1014 | ret = rndis_set_oid(usbdev, cpu_to_le32(RNDIS_OID_802_11_BSSID), |
1015 | bssid, ETH_ALEN); | ||
1014 | if (ret < 0) { | 1016 | if (ret < 0) { |
1015 | netdev_warn(usbdev->net, "setting BSSID[%pM] failed (%08X)\n", | 1017 | netdev_warn(usbdev->net, "setting BSSID[%pM] failed (%08X)\n", |
1016 | bssid, ret); | 1018 | bssid, ret); |
@@ -1034,7 +1036,8 @@ static int get_bssid(struct usbnet *usbdev, u8 bssid[ETH_ALEN]) | |||
1034 | int ret, len; | 1036 | int ret, len; |
1035 | 1037 | ||
1036 | len = ETH_ALEN; | 1038 | len = ETH_ALEN; |
1037 | ret = rndis_query_oid(usbdev, cpu_to_le32(OID_802_11_BSSID), bssid, &len); | 1039 | ret = rndis_query_oid(usbdev, cpu_to_le32(RNDIS_OID_802_11_BSSID), |
1040 | bssid, &len); | ||
1038 | 1041 | ||
1039 | if (ret != 0) | 1042 | if (ret != 0) |
1040 | memset(bssid, 0, ETH_ALEN); | 1043 | memset(bssid, 0, ETH_ALEN); |
@@ -1045,8 +1048,9 @@ static int get_bssid(struct usbnet *usbdev, u8 bssid[ETH_ALEN]) | |||
1045 | static int get_association_info(struct usbnet *usbdev, | 1048 | static int get_association_info(struct usbnet *usbdev, |
1046 | struct ndis_80211_assoc_info *info, int len) | 1049 | struct ndis_80211_assoc_info *info, int len) |
1047 | { | 1050 | { |
1048 | return rndis_query_oid(usbdev, cpu_to_le32(OID_802_11_ASSOCIATION_INFORMATION), | 1051 | return rndis_query_oid(usbdev, |
1049 | info, &len); | 1052 | cpu_to_le32(RNDIS_OID_802_11_ASSOCIATION_INFORMATION), |
1053 | info, &len); | ||
1050 | } | 1054 | } |
1051 | 1055 | ||
1052 | static bool is_associated(struct usbnet *usbdev) | 1056 | static bool is_associated(struct usbnet *usbdev) |
@@ -1070,7 +1074,9 @@ static int disassociate(struct usbnet *usbdev, bool reset_ssid) | |||
1070 | int i, ret = 0; | 1074 | int i, ret = 0; |
1071 | 1075 | ||
1072 | if (priv->radio_on) { | 1076 | if (priv->radio_on) { |
1073 | ret = rndis_set_oid(usbdev, cpu_to_le32(OID_802_11_DISASSOCIATE), NULL, 0); | 1077 | ret = rndis_set_oid(usbdev, |
1078 | cpu_to_le32(RNDIS_OID_802_11_DISASSOCIATE), | ||
1079 | NULL, 0); | ||
1074 | if (ret == 0) { | 1080 | if (ret == 0) { |
1075 | priv->radio_on = false; | 1081 | priv->radio_on = false; |
1076 | netdev_dbg(usbdev->net, "%s(): radio_on = false\n", | 1082 | netdev_dbg(usbdev->net, "%s(): radio_on = false\n", |
@@ -1132,8 +1138,9 @@ static int set_auth_mode(struct usbnet *usbdev, u32 wpa_version, | |||
1132 | return -ENOTSUPP; | 1138 | return -ENOTSUPP; |
1133 | 1139 | ||
1134 | tmp = cpu_to_le32(auth_mode); | 1140 | tmp = cpu_to_le32(auth_mode); |
1135 | ret = rndis_set_oid(usbdev, cpu_to_le32(OID_802_11_AUTHENTICATION_MODE), &tmp, | 1141 | ret = rndis_set_oid(usbdev, |
1136 | sizeof(tmp)); | 1142 | cpu_to_le32(RNDIS_OID_802_11_AUTHENTICATION_MODE), |
1143 | &tmp, sizeof(tmp)); | ||
1137 | if (ret != 0) { | 1144 | if (ret != 0) { |
1138 | netdev_warn(usbdev->net, "setting auth mode failed (%08X)\n", | 1145 | netdev_warn(usbdev->net, "setting auth mode failed (%08X)\n", |
1139 | ret); | 1146 | ret); |
@@ -1159,8 +1166,9 @@ static int set_priv_filter(struct usbnet *usbdev) | |||
1159 | else | 1166 | else |
1160 | tmp = cpu_to_le32(NDIS_80211_PRIV_ACCEPT_ALL); | 1167 | tmp = cpu_to_le32(NDIS_80211_PRIV_ACCEPT_ALL); |
1161 | 1168 | ||
1162 | return rndis_set_oid(usbdev, cpu_to_le32(OID_802_11_PRIVACY_FILTER), &tmp, | 1169 | return rndis_set_oid(usbdev, |
1163 | sizeof(tmp)); | 1170 | cpu_to_le32(RNDIS_OID_802_11_PRIVACY_FILTER), &tmp, |
1171 | sizeof(tmp)); | ||
1164 | } | 1172 | } |
1165 | 1173 | ||
1166 | static int set_encr_mode(struct usbnet *usbdev, int pairwise, int groupwise) | 1174 | static int set_encr_mode(struct usbnet *usbdev, int pairwise, int groupwise) |
@@ -1185,8 +1193,9 @@ static int set_encr_mode(struct usbnet *usbdev, int pairwise, int groupwise) | |||
1185 | encr_mode = NDIS_80211_ENCR_DISABLED; | 1193 | encr_mode = NDIS_80211_ENCR_DISABLED; |
1186 | 1194 | ||
1187 | tmp = cpu_to_le32(encr_mode); | 1195 | tmp = cpu_to_le32(encr_mode); |
1188 | ret = rndis_set_oid(usbdev, cpu_to_le32(OID_802_11_ENCRYPTION_STATUS), &tmp, | 1196 | ret = rndis_set_oid(usbdev, |
1189 | sizeof(tmp)); | 1197 | cpu_to_le32(RNDIS_OID_802_11_ENCRYPTION_STATUS), &tmp, |
1198 | sizeof(tmp)); | ||
1190 | if (ret != 0) { | 1199 | if (ret != 0) { |
1191 | netdev_warn(usbdev->net, "setting encr mode failed (%08X)\n", | 1200 | netdev_warn(usbdev->net, "setting encr mode failed (%08X)\n", |
1192 | ret); | 1201 | ret); |
@@ -1206,8 +1215,9 @@ static int set_infra_mode(struct usbnet *usbdev, int mode) | |||
1206 | __func__, priv->infra_mode); | 1215 | __func__, priv->infra_mode); |
1207 | 1216 | ||
1208 | tmp = cpu_to_le32(mode); | 1217 | tmp = cpu_to_le32(mode); |
1209 | ret = rndis_set_oid(usbdev, cpu_to_le32(OID_802_11_INFRASTRUCTURE_MODE), &tmp, | 1218 | ret = rndis_set_oid(usbdev, |
1210 | sizeof(tmp)); | 1219 | cpu_to_le32(RNDIS_OID_802_11_INFRASTRUCTURE_MODE), |
1220 | &tmp, sizeof(tmp)); | ||
1211 | if (ret != 0) { | 1221 | if (ret != 0) { |
1212 | netdev_warn(usbdev->net, "setting infra mode failed (%08X)\n", | 1222 | netdev_warn(usbdev->net, "setting infra mode failed (%08X)\n", |
1213 | ret); | 1223 | ret); |
@@ -1233,8 +1243,9 @@ static int set_rts_threshold(struct usbnet *usbdev, u32 rts_threshold) | |||
1233 | rts_threshold = 2347; | 1243 | rts_threshold = 2347; |
1234 | 1244 | ||
1235 | tmp = cpu_to_le32(rts_threshold); | 1245 | tmp = cpu_to_le32(rts_threshold); |
1236 | return rndis_set_oid(usbdev, cpu_to_le32(OID_802_11_RTS_THRESHOLD), &tmp, | 1246 | return rndis_set_oid(usbdev, |
1237 | sizeof(tmp)); | 1247 | cpu_to_le32(RNDIS_OID_802_11_RTS_THRESHOLD), |
1248 | &tmp, sizeof(tmp)); | ||
1238 | } | 1249 | } |
1239 | 1250 | ||
1240 | static int set_frag_threshold(struct usbnet *usbdev, u32 frag_threshold) | 1251 | static int set_frag_threshold(struct usbnet *usbdev, u32 frag_threshold) |
@@ -1247,8 +1258,9 @@ static int set_frag_threshold(struct usbnet *usbdev, u32 frag_threshold) | |||
1247 | frag_threshold = 2346; | 1258 | frag_threshold = 2346; |
1248 | 1259 | ||
1249 | tmp = cpu_to_le32(frag_threshold); | 1260 | tmp = cpu_to_le32(frag_threshold); |
1250 | return rndis_set_oid(usbdev, cpu_to_le32(OID_802_11_FRAGMENTATION_THRESHOLD), &tmp, | 1261 | return rndis_set_oid(usbdev, |
1251 | sizeof(tmp)); | 1262 | cpu_to_le32(RNDIS_OID_802_11_FRAGMENTATION_THRESHOLD), |
1263 | &tmp, sizeof(tmp)); | ||
1252 | } | 1264 | } |
1253 | 1265 | ||
1254 | static void set_default_iw_params(struct usbnet *usbdev) | 1266 | static void set_default_iw_params(struct usbnet *usbdev) |
@@ -1284,7 +1296,9 @@ static int set_channel(struct usbnet *usbdev, int channel) | |||
1284 | dsconfig = ieee80211_dsss_chan_to_freq(channel) * 1000; | 1296 | dsconfig = ieee80211_dsss_chan_to_freq(channel) * 1000; |
1285 | 1297 | ||
1286 | len = sizeof(config); | 1298 | len = sizeof(config); |
1287 | ret = rndis_query_oid(usbdev, cpu_to_le32(OID_802_11_CONFIGURATION), &config, &len); | 1299 | ret = rndis_query_oid(usbdev, |
1300 | cpu_to_le32(RNDIS_OID_802_11_CONFIGURATION), | ||
1301 | &config, &len); | ||
1288 | if (ret < 0) { | 1302 | if (ret < 0) { |
1289 | netdev_dbg(usbdev->net, "%s(): querying configuration failed\n", | 1303 | netdev_dbg(usbdev->net, "%s(): querying configuration failed\n", |
1290 | __func__); | 1304 | __func__); |
@@ -1292,8 +1306,9 @@ static int set_channel(struct usbnet *usbdev, int channel) | |||
1292 | } | 1306 | } |
1293 | 1307 | ||
1294 | config.ds_config = cpu_to_le32(dsconfig); | 1308 | config.ds_config = cpu_to_le32(dsconfig); |
1295 | ret = rndis_set_oid(usbdev, cpu_to_le32(OID_802_11_CONFIGURATION), &config, | 1309 | ret = rndis_set_oid(usbdev, |
1296 | sizeof(config)); | 1310 | cpu_to_le32(RNDIS_OID_802_11_CONFIGURATION), |
1311 | &config, sizeof(config)); | ||
1297 | 1312 | ||
1298 | netdev_dbg(usbdev->net, "%s(): %d -> %d\n", __func__, channel, ret); | 1313 | netdev_dbg(usbdev->net, "%s(): %d -> %d\n", __func__, channel, ret); |
1299 | 1314 | ||
@@ -1310,8 +1325,10 @@ static struct ieee80211_channel *get_current_channel(struct usbnet *usbdev, | |||
1310 | 1325 | ||
1311 | /* Get channel and beacon interval */ | 1326 | /* Get channel and beacon interval */ |
1312 | len = sizeof(config); | 1327 | len = sizeof(config); |
1313 | ret = rndis_query_oid(usbdev, cpu_to_le32(OID_802_11_CONFIGURATION), &config, &len); | 1328 | ret = rndis_query_oid(usbdev, |
1314 | netdev_dbg(usbdev->net, "%s(): OID_802_11_CONFIGURATION -> %d\n", | 1329 | cpu_to_le32(RNDIS_OID_802_11_CONFIGURATION), |
1330 | &config, &len); | ||
1331 | netdev_dbg(usbdev->net, "%s(): RNDIS_OID_802_11_CONFIGURATION -> %d\n", | ||
1315 | __func__, ret); | 1332 | __func__, ret); |
1316 | if (ret < 0) | 1333 | if (ret < 0) |
1317 | return NULL; | 1334 | return NULL; |
@@ -1364,8 +1381,9 @@ static int add_wep_key(struct usbnet *usbdev, const u8 *key, int key_len, | |||
1364 | ret); | 1381 | ret); |
1365 | } | 1382 | } |
1366 | 1383 | ||
1367 | ret = rndis_set_oid(usbdev, cpu_to_le32(OID_802_11_ADD_WEP), &ndis_key, | 1384 | ret = rndis_set_oid(usbdev, |
1368 | sizeof(ndis_key)); | 1385 | cpu_to_le32(RNDIS_OID_802_11_ADD_WEP), &ndis_key, |
1386 | sizeof(ndis_key)); | ||
1369 | if (ret != 0) { | 1387 | if (ret != 0) { |
1370 | netdev_warn(usbdev->net, "adding encryption key %d failed (%08X)\n", | 1388 | netdev_warn(usbdev->net, "adding encryption key %d failed (%08X)\n", |
1371 | index + 1, ret); | 1389 | index + 1, ret); |
@@ -1455,9 +1473,10 @@ static int add_wpa_key(struct usbnet *usbdev, const u8 *key, int key_len, | |||
1455 | get_bssid(usbdev, ndis_key.bssid); | 1473 | get_bssid(usbdev, ndis_key.bssid); |
1456 | } | 1474 | } |
1457 | 1475 | ||
1458 | ret = rndis_set_oid(usbdev, cpu_to_le32(OID_802_11_ADD_KEY), &ndis_key, | 1476 | ret = rndis_set_oid(usbdev, |
1459 | le32_to_cpu(ndis_key.size)); | 1477 | cpu_to_le32(RNDIS_OID_802_11_ADD_KEY), &ndis_key, |
1460 | netdev_dbg(usbdev->net, "%s(): OID_802_11_ADD_KEY -> %08X\n", | 1478 | le32_to_cpu(ndis_key.size)); |
1479 | netdev_dbg(usbdev->net, "%s(): RNDIS_OID_802_11_ADD_KEY -> %08X\n", | ||
1461 | __func__, ret); | 1480 | __func__, ret); |
1462 | if (ret != 0) | 1481 | if (ret != 0) |
1463 | return ret; | 1482 | return ret; |
@@ -1545,14 +1564,16 @@ static int remove_key(struct usbnet *usbdev, u8 index, const u8 *bssid) | |||
1545 | memset(remove_key.bssid, 0xff, | 1564 | memset(remove_key.bssid, 0xff, |
1546 | sizeof(remove_key.bssid)); | 1565 | sizeof(remove_key.bssid)); |
1547 | 1566 | ||
1548 | ret = rndis_set_oid(usbdev, cpu_to_le32(OID_802_11_REMOVE_KEY), &remove_key, | 1567 | ret = rndis_set_oid(usbdev, |
1549 | sizeof(remove_key)); | 1568 | cpu_to_le32(RNDIS_OID_802_11_REMOVE_KEY), |
1569 | &remove_key, sizeof(remove_key)); | ||
1550 | if (ret != 0) | 1570 | if (ret != 0) |
1551 | return ret; | 1571 | return ret; |
1552 | } else { | 1572 | } else { |
1553 | keyindex = cpu_to_le32(index); | 1573 | keyindex = cpu_to_le32(index); |
1554 | ret = rndis_set_oid(usbdev, cpu_to_le32(OID_802_11_REMOVE_WEP), &keyindex, | 1574 | ret = rndis_set_oid(usbdev, |
1555 | sizeof(keyindex)); | 1575 | cpu_to_le32(RNDIS_OID_802_11_REMOVE_WEP), |
1576 | &keyindex, sizeof(keyindex)); | ||
1556 | if (ret != 0) { | 1577 | if (ret != 0) { |
1557 | netdev_warn(usbdev->net, | 1578 | netdev_warn(usbdev->net, |
1558 | "removing encryption key %d failed (%08X)\n", | 1579 | "removing encryption key %d failed (%08X)\n", |
@@ -1620,15 +1641,16 @@ static void set_multicast_list(struct usbnet *usbdev) | |||
1620 | goto set_filter; | 1641 | goto set_filter; |
1621 | 1642 | ||
1622 | if (mc_count) { | 1643 | if (mc_count) { |
1623 | ret = rndis_set_oid(usbdev, cpu_to_le32(OID_802_3_MULTICAST_LIST), mc_addrs, | 1644 | ret = rndis_set_oid(usbdev, |
1624 | mc_count * ETH_ALEN); | 1645 | cpu_to_le32(RNDIS_OID_802_3_MULTICAST_LIST), |
1646 | mc_addrs, mc_count * ETH_ALEN); | ||
1625 | kfree(mc_addrs); | 1647 | kfree(mc_addrs); |
1626 | if (ret == 0) | 1648 | if (ret == 0) |
1627 | filter |= cpu_to_le32(RNDIS_PACKET_TYPE_MULTICAST); | 1649 | filter |= cpu_to_le32(RNDIS_PACKET_TYPE_MULTICAST); |
1628 | else | 1650 | else |
1629 | filter |= cpu_to_le32(RNDIS_PACKET_TYPE_ALL_MULTICAST); | 1651 | filter |= cpu_to_le32(RNDIS_PACKET_TYPE_ALL_MULTICAST); |
1630 | 1652 | ||
1631 | netdev_dbg(usbdev->net, "OID_802_3_MULTICAST_LIST(%d, max: %d) -> %d\n", | 1653 | netdev_dbg(usbdev->net, "RNDIS_OID_802_3_MULTICAST_LIST(%d, max: %d) -> %d\n", |
1632 | mc_count, priv->multicast_size, ret); | 1654 | mc_count, priv->multicast_size, ret); |
1633 | } | 1655 | } |
1634 | 1656 | ||
@@ -1699,9 +1721,10 @@ static struct ndis_80211_pmkid *get_device_pmkids(struct usbnet *usbdev) | |||
1699 | pmkids->length = cpu_to_le32(len); | 1721 | pmkids->length = cpu_to_le32(len); |
1700 | pmkids->bssid_info_count = cpu_to_le32(max_pmkids); | 1722 | pmkids->bssid_info_count = cpu_to_le32(max_pmkids); |
1701 | 1723 | ||
1702 | ret = rndis_query_oid(usbdev, cpu_to_le32(OID_802_11_PMKID), pmkids, &len); | 1724 | ret = rndis_query_oid(usbdev, cpu_to_le32(RNDIS_OID_802_11_PMKID), |
1725 | pmkids, &len); | ||
1703 | if (ret < 0) { | 1726 | if (ret < 0) { |
1704 | netdev_dbg(usbdev->net, "%s(): OID_802_11_PMKID(%d, %d)" | 1727 | netdev_dbg(usbdev->net, "%s(): RNDIS_OID_802_11_PMKID(%d, %d)" |
1705 | " -> %d\n", __func__, len, max_pmkids, ret); | 1728 | " -> %d\n", __func__, len, max_pmkids, ret); |
1706 | 1729 | ||
1707 | kfree(pmkids); | 1730 | kfree(pmkids); |
@@ -1727,10 +1750,10 @@ static int set_device_pmkids(struct usbnet *usbdev, | |||
1727 | 1750 | ||
1728 | debug_print_pmkids(usbdev, pmkids, __func__); | 1751 | debug_print_pmkids(usbdev, pmkids, __func__); |
1729 | 1752 | ||
1730 | ret = rndis_set_oid(usbdev, cpu_to_le32(OID_802_11_PMKID), pmkids, | 1753 | ret = rndis_set_oid(usbdev, cpu_to_le32(RNDIS_OID_802_11_PMKID), pmkids, |
1731 | le32_to_cpu(pmkids->length)); | 1754 | le32_to_cpu(pmkids->length)); |
1732 | if (ret < 0) { | 1755 | if (ret < 0) { |
1733 | netdev_dbg(usbdev->net, "%s(): OID_802_11_PMKID(%d, %d) -> %d" | 1756 | netdev_dbg(usbdev->net, "%s(): RNDIS_OID_802_11_PMKID(%d, %d) -> %d" |
1734 | "\n", __func__, len, num_pmkids, ret); | 1757 | "\n", __func__, len, num_pmkids, ret); |
1735 | } | 1758 | } |
1736 | 1759 | ||
@@ -2064,7 +2087,8 @@ resize_buf: | |||
2064 | * resizing until it won't get any bigger. | 2087 | * resizing until it won't get any bigger. |
2065 | */ | 2088 | */ |
2066 | new_len = len; | 2089 | new_len = len; |
2067 | ret = rndis_query_oid(usbdev, cpu_to_le32(OID_802_11_BSSID_LIST), buf, &new_len); | 2090 | ret = rndis_query_oid(usbdev, cpu_to_le32(RNDIS_OID_802_11_BSSID_LIST), |
2091 | buf, &new_len); | ||
2068 | if (ret != 0 || new_len < sizeof(struct ndis_80211_bssid_list_ex)) | 2092 | if (ret != 0 || new_len < sizeof(struct ndis_80211_bssid_list_ex)) |
2069 | goto out; | 2093 | goto out; |
2070 | 2094 | ||
@@ -2469,7 +2493,8 @@ static void rndis_fill_station_info(struct usbnet *usbdev, | |||
2469 | } | 2493 | } |
2470 | 2494 | ||
2471 | len = sizeof(rssi); | 2495 | len = sizeof(rssi); |
2472 | ret = rndis_query_oid(usbdev, cpu_to_le32(OID_802_11_RSSI), &rssi, &len); | 2496 | ret = rndis_query_oid(usbdev, cpu_to_le32(RNDIS_OID_802_11_RSSI), |
2497 | &rssi, &len); | ||
2473 | if (ret == 0) { | 2498 | if (ret == 0) { |
2474 | sinfo->signal = level_to_qual(le32_to_cpu(rssi)); | 2499 | sinfo->signal = level_to_qual(le32_to_cpu(rssi)); |
2475 | sinfo->filled |= STATION_INFO_SIGNAL; | 2500 | sinfo->filled |= STATION_INFO_SIGNAL; |
@@ -2575,7 +2600,8 @@ static int rndis_flush_pmksa(struct wiphy *wiphy, struct net_device *netdev) | |||
2575 | pmkid.length = cpu_to_le32(sizeof(pmkid)); | 2600 | pmkid.length = cpu_to_le32(sizeof(pmkid)); |
2576 | pmkid.bssid_info_count = cpu_to_le32(0); | 2601 | pmkid.bssid_info_count = cpu_to_le32(0); |
2577 | 2602 | ||
2578 | return rndis_set_oid(usbdev, cpu_to_le32(OID_802_11_PMKID), &pmkid, sizeof(pmkid)); | 2603 | return rndis_set_oid(usbdev, cpu_to_le32(RNDIS_OID_802_11_PMKID), |
2604 | &pmkid, sizeof(pmkid)); | ||
2579 | } | 2605 | } |
2580 | 2606 | ||
2581 | static int rndis_set_power_mgmt(struct wiphy *wiphy, struct net_device *dev, | 2607 | static int rndis_set_power_mgmt(struct wiphy *wiphy, struct net_device *dev, |
@@ -2605,9 +2631,10 @@ static int rndis_set_power_mgmt(struct wiphy *wiphy, struct net_device *dev, | |||
2605 | priv->power_mode = power_mode; | 2631 | priv->power_mode = power_mode; |
2606 | 2632 | ||
2607 | mode = cpu_to_le32(power_mode); | 2633 | mode = cpu_to_le32(power_mode); |
2608 | ret = rndis_set_oid(usbdev, cpu_to_le32(OID_802_11_POWER_MODE), &mode, sizeof(mode)); | 2634 | ret = rndis_set_oid(usbdev, cpu_to_le32(RNDIS_OID_802_11_POWER_MODE), |
2635 | &mode, sizeof(mode)); | ||
2609 | 2636 | ||
2610 | netdev_dbg(usbdev->net, "%s(): OID_802_11_POWER_MODE -> %d\n", | 2637 | netdev_dbg(usbdev->net, "%s(): RNDIS_OID_802_11_POWER_MODE -> %d\n", |
2611 | __func__, ret); | 2638 | __func__, ret); |
2612 | 2639 | ||
2613 | return ret; | 2640 | return ret; |
@@ -2644,10 +2671,11 @@ static void rndis_wlan_craft_connected_bss(struct usbnet *usbdev, u8 *bssid, | |||
2644 | /* Get signal quality, in case of error use rssi=0 and ignore error. */ | 2671 | /* Get signal quality, in case of error use rssi=0 and ignore error. */ |
2645 | len = sizeof(rssi); | 2672 | len = sizeof(rssi); |
2646 | rssi = 0; | 2673 | rssi = 0; |
2647 | ret = rndis_query_oid(usbdev, cpu_to_le32(OID_802_11_RSSI), &rssi, &len); | 2674 | ret = rndis_query_oid(usbdev, cpu_to_le32(RNDIS_OID_802_11_RSSI), |
2675 | &rssi, &len); | ||
2648 | signal = level_to_qual(le32_to_cpu(rssi)); | 2676 | signal = level_to_qual(le32_to_cpu(rssi)); |
2649 | 2677 | ||
2650 | netdev_dbg(usbdev->net, "%s(): OID_802_11_RSSI -> %d, " | 2678 | netdev_dbg(usbdev->net, "%s(): RNDIS_OID_802_11_RSSI -> %d, " |
2651 | "rssi:%d, qual: %d\n", __func__, ret, le32_to_cpu(rssi), | 2679 | "rssi:%d, qual: %d\n", __func__, ret, le32_to_cpu(rssi), |
2652 | level_to_qual(le32_to_cpu(rssi))); | 2680 | level_to_qual(le32_to_cpu(rssi))); |
2653 | 2681 | ||
@@ -2671,8 +2699,9 @@ static void rndis_wlan_craft_connected_bss(struct usbnet *usbdev, u8 *bssid, | |||
2671 | /* Get SSID, in case of error, use zero length SSID and ignore error. */ | 2699 | /* Get SSID, in case of error, use zero length SSID and ignore error. */ |
2672 | len = sizeof(ssid); | 2700 | len = sizeof(ssid); |
2673 | memset(&ssid, 0, sizeof(ssid)); | 2701 | memset(&ssid, 0, sizeof(ssid)); |
2674 | ret = rndis_query_oid(usbdev, cpu_to_le32(OID_802_11_SSID), &ssid, &len); | 2702 | ret = rndis_query_oid(usbdev, cpu_to_le32(RNDIS_OID_802_11_SSID), |
2675 | netdev_dbg(usbdev->net, "%s(): OID_802_11_SSID -> %d, len: %d, ssid: " | 2703 | &ssid, &len); |
2704 | netdev_dbg(usbdev->net, "%s(): RNDIS_OID_802_11_SSID -> %d, len: %d, ssid: " | ||
2676 | "'%.32s'\n", __func__, ret, | 2705 | "'%.32s'\n", __func__, ret, |
2677 | le32_to_cpu(ssid.length), ssid.essid); | 2706 | le32_to_cpu(ssid.length), ssid.essid); |
2678 | 2707 | ||
@@ -2794,7 +2823,7 @@ static void rndis_wlan_do_link_up_work(struct usbnet *usbdev) | |||
2794 | * NDIS spec says: "If the device is associated, but the associated | 2823 | * NDIS spec says: "If the device is associated, but the associated |
2795 | * BSSID is not in its BSSID scan list, then the driver must add an | 2824 | * BSSID is not in its BSSID scan list, then the driver must add an |
2796 | * entry for the BSSID at the end of the data that it returns in | 2825 | * entry for the BSSID at the end of the data that it returns in |
2797 | * response to query of OID_802_11_BSSID_LIST." | 2826 | * response to query of RNDIS_OID_802_11_BSSID_LIST." |
2798 | * | 2827 | * |
2799 | * NOTE: Seems to be true for BCM4320b variant, but not BCM4320a. | 2828 | * NOTE: Seems to be true for BCM4320b variant, but not BCM4320a. |
2800 | */ | 2829 | */ |
@@ -3048,13 +3077,13 @@ static void rndis_wlan_indication(struct usbnet *usbdev, void *ind, int buflen) | |||
3048 | 3077 | ||
3049 | switch (msg->status) { | 3078 | switch (msg->status) { |
3050 | case cpu_to_le32(RNDIS_STATUS_MEDIA_CONNECT): | 3079 | case cpu_to_le32(RNDIS_STATUS_MEDIA_CONNECT): |
3051 | if (priv->current_command_oid == cpu_to_le32(OID_802_11_ADD_KEY)) { | 3080 | if (priv->current_command_oid == cpu_to_le32(RNDIS_OID_802_11_ADD_KEY)) { |
3052 | /* OID_802_11_ADD_KEY causes sometimes extra | 3081 | /* OID_802_11_ADD_KEY causes sometimes extra |
3053 | * "media connect" indications which confuses driver | 3082 | * "media connect" indications which confuses driver |
3054 | * and userspace to think that device is | 3083 | * and userspace to think that device is |
3055 | * roaming/reassociating when it isn't. | 3084 | * roaming/reassociating when it isn't. |
3056 | */ | 3085 | */ |
3057 | netdev_dbg(usbdev->net, "ignored OID_802_11_ADD_KEY triggered 'media connect'\n"); | 3086 | netdev_dbg(usbdev->net, "ignored RNDIS_OID_802_11_ADD_KEY triggered 'media connect'\n"); |
3058 | return; | 3087 | return; |
3059 | } | 3088 | } |
3060 | 3089 | ||
@@ -3099,8 +3128,9 @@ static int rndis_wlan_get_caps(struct usbnet *usbdev, struct wiphy *wiphy) | |||
3099 | 3128 | ||
3100 | /* determine supported modes */ | 3129 | /* determine supported modes */ |
3101 | len = sizeof(networks_supported); | 3130 | len = sizeof(networks_supported); |
3102 | retval = rndis_query_oid(usbdev, cpu_to_le32(OID_802_11_NETWORK_TYPES_SUPPORTED), | 3131 | retval = rndis_query_oid(usbdev, |
3103 | &networks_supported, &len); | 3132 | cpu_to_le32(RNDIS_OID_802_11_NETWORK_TYPES_SUPPORTED), |
3133 | &networks_supported, &len); | ||
3104 | if (retval >= 0) { | 3134 | if (retval >= 0) { |
3105 | n = le32_to_cpu(networks_supported.num_items); | 3135 | n = le32_to_cpu(networks_supported.num_items); |
3106 | if (n > 8) | 3136 | if (n > 8) |
@@ -3124,9 +3154,11 @@ static int rndis_wlan_get_caps(struct usbnet *usbdev, struct wiphy *wiphy) | |||
3124 | /* get device 802.11 capabilities, number of PMKIDs */ | 3154 | /* get device 802.11 capabilities, number of PMKIDs */ |
3125 | caps = (struct ndis_80211_capability *)caps_buf; | 3155 | caps = (struct ndis_80211_capability *)caps_buf; |
3126 | len = sizeof(caps_buf); | 3156 | len = sizeof(caps_buf); |
3127 | retval = rndis_query_oid(usbdev, cpu_to_le32(OID_802_11_CAPABILITY), caps, &len); | 3157 | retval = rndis_query_oid(usbdev, |
3158 | cpu_to_le32(RNDIS_OID_802_11_CAPABILITY), | ||
3159 | caps, &len); | ||
3128 | if (retval >= 0) { | 3160 | if (retval >= 0) { |
3129 | netdev_dbg(usbdev->net, "OID_802_11_CAPABILITY -> len %d, " | 3161 | netdev_dbg(usbdev->net, "RNDIS_OID_802_11_CAPABILITY -> len %d, " |
3130 | "ver %d, pmkids %d, auth-encr-pairs %d\n", | 3162 | "ver %d, pmkids %d, auth-encr-pairs %d\n", |
3131 | le32_to_cpu(caps->length), | 3163 | le32_to_cpu(caps->length), |
3132 | le32_to_cpu(caps->version), | 3164 | le32_to_cpu(caps->version), |
@@ -3198,13 +3230,14 @@ static void rndis_device_poller(struct work_struct *work) | |||
3198 | } | 3230 | } |
3199 | 3231 | ||
3200 | len = sizeof(rssi); | 3232 | len = sizeof(rssi); |
3201 | ret = rndis_query_oid(usbdev, cpu_to_le32(OID_802_11_RSSI), &rssi, &len); | 3233 | ret = rndis_query_oid(usbdev, cpu_to_le32(RNDIS_OID_802_11_RSSI), |
3234 | &rssi, &len); | ||
3202 | if (ret == 0) { | 3235 | if (ret == 0) { |
3203 | priv->last_qual = level_to_qual(le32_to_cpu(rssi)); | 3236 | priv->last_qual = level_to_qual(le32_to_cpu(rssi)); |
3204 | rndis_do_cqm(usbdev, le32_to_cpu(rssi)); | 3237 | rndis_do_cqm(usbdev, le32_to_cpu(rssi)); |
3205 | } | 3238 | } |
3206 | 3239 | ||
3207 | netdev_dbg(usbdev->net, "dev-poller: OID_802_11_RSSI -> %d, rssi:%d, qual: %d\n", | 3240 | netdev_dbg(usbdev->net, "dev-poller: RNDIS_OID_802_11_RSSI -> %d, rssi:%d, qual: %d\n", |
3208 | ret, le32_to_cpu(rssi), level_to_qual(le32_to_cpu(rssi))); | 3241 | ret, le32_to_cpu(rssi), level_to_qual(le32_to_cpu(rssi))); |
3209 | 3242 | ||
3210 | /* Workaround transfer stalls on poor quality links. | 3243 | /* Workaround transfer stalls on poor quality links. |
@@ -3226,15 +3259,18 @@ static void rndis_device_poller(struct work_struct *work) | |||
3226 | * working. | 3259 | * working. |
3227 | */ | 3260 | */ |
3228 | tmp = cpu_to_le32(1); | 3261 | tmp = cpu_to_le32(1); |
3229 | rndis_set_oid(usbdev, cpu_to_le32(OID_802_11_BSSID_LIST_SCAN), &tmp, | 3262 | rndis_set_oid(usbdev, |
3230 | sizeof(tmp)); | 3263 | cpu_to_le32(RNDIS_OID_802_11_BSSID_LIST_SCAN), |
3264 | &tmp, sizeof(tmp)); | ||
3231 | 3265 | ||
3232 | len = CONTROL_BUFFER_SIZE; | 3266 | len = CONTROL_BUFFER_SIZE; |
3233 | buf = kmalloc(len, GFP_KERNEL); | 3267 | buf = kmalloc(len, GFP_KERNEL); |
3234 | if (!buf) | 3268 | if (!buf) |
3235 | goto end; | 3269 | goto end; |
3236 | 3270 | ||
3237 | rndis_query_oid(usbdev, cpu_to_le32(OID_802_11_BSSID_LIST), buf, &len); | 3271 | rndis_query_oid(usbdev, |
3272 | cpu_to_le32(RNDIS_OID_802_11_BSSID_LIST), | ||
3273 | buf, &len); | ||
3238 | kfree(buf); | 3274 | kfree(buf); |
3239 | } | 3275 | } |
3240 | 3276 | ||
@@ -3423,7 +3459,7 @@ static int rndis_wlan_bind(struct usbnet *usbdev, struct usb_interface *intf) | |||
3423 | 3459 | ||
3424 | len = sizeof(tmp); | 3460 | len = sizeof(tmp); |
3425 | retval = rndis_query_oid(usbdev, | 3461 | retval = rndis_query_oid(usbdev, |
3426 | cpu_to_le32(OID_802_3_MAXIMUM_LIST_SIZE), | 3462 | cpu_to_le32(RNDIS_OID_802_3_MAXIMUM_LIST_SIZE), |
3427 | &tmp, &len); | 3463 | &tmp, &len); |
3428 | priv->multicast_size = le32_to_cpu(tmp); | 3464 | priv->multicast_size = le32_to_cpu(tmp); |
3429 | if (retval < 0 || priv->multicast_size < 0) | 3465 | if (retval < 0 || priv->multicast_size < 0) |
diff --git a/drivers/usb/gadget/rndis.c b/drivers/usb/gadget/rndis.c index 3ade168443a8..79ed261c88c1 100644 --- a/drivers/usb/gadget/rndis.c +++ b/drivers/usb/gadget/rndis.c | |||
@@ -115,23 +115,23 @@ static const u32 oid_supported_list[] = | |||
115 | /* mandatory 802.3 */ | 115 | /* mandatory 802.3 */ |
116 | /* the general stuff */ | 116 | /* the general stuff */ |
117 | RNDIS_OID_802_3_PERMANENT_ADDRESS, | 117 | RNDIS_OID_802_3_PERMANENT_ADDRESS, |
118 | OID_802_3_CURRENT_ADDRESS, | 118 | RNDIS_OID_802_3_CURRENT_ADDRESS, |
119 | OID_802_3_MULTICAST_LIST, | 119 | RNDIS_OID_802_3_MULTICAST_LIST, |
120 | OID_802_3_MAC_OPTIONS, | 120 | RNDIS_OID_802_3_MAC_OPTIONS, |
121 | OID_802_3_MAXIMUM_LIST_SIZE, | 121 | RNDIS_OID_802_3_MAXIMUM_LIST_SIZE, |
122 | 122 | ||
123 | /* the statistical stuff */ | 123 | /* the statistical stuff */ |
124 | OID_802_3_RCV_ERROR_ALIGNMENT, | 124 | RNDIS_OID_802_3_RCV_ERROR_ALIGNMENT, |
125 | OID_802_3_XMIT_ONE_COLLISION, | 125 | RNDIS_OID_802_3_XMIT_ONE_COLLISION, |
126 | OID_802_3_XMIT_MORE_COLLISIONS, | 126 | RNDIS_OID_802_3_XMIT_MORE_COLLISIONS, |
127 | #ifdef RNDIS_OPTIONAL_STATS | 127 | #ifdef RNDIS_OPTIONAL_STATS |
128 | OID_802_3_XMIT_DEFERRED, | 128 | RNDIS_OID_802_3_XMIT_DEFERRED, |
129 | OID_802_3_XMIT_MAX_COLLISIONS, | 129 | RNDIS_OID_802_3_XMIT_MAX_COLLISIONS, |
130 | OID_802_3_RCV_OVERRUN, | 130 | RNDIS_OID_802_3_RCV_OVERRUN, |
131 | OID_802_3_XMIT_UNDERRUN, | 131 | RNDIS_OID_802_3_XMIT_UNDERRUN, |
132 | OID_802_3_XMIT_HEARTBEAT_FAILURE, | 132 | RNDIS_OID_802_3_XMIT_HEARTBEAT_FAILURE, |
133 | OID_802_3_XMIT_TIMES_CRS_LOST, | 133 | RNDIS_OID_802_3_XMIT_TIMES_CRS_LOST, |
134 | OID_802_3_XMIT_LATE_COLLISIONS, | 134 | RNDIS_OID_802_3_XMIT_LATE_COLLISIONS, |
135 | #endif /* RNDIS_OPTIONAL_STATS */ | 135 | #endif /* RNDIS_OPTIONAL_STATS */ |
136 | 136 | ||
137 | #ifdef RNDIS_PM | 137 | #ifdef RNDIS_PM |
@@ -408,7 +408,7 @@ static int gen_ndis_query_resp(int configNr, u32 OID, u8 *buf, | |||
408 | 408 | ||
409 | /* mandatory */ | 409 | /* mandatory */ |
410 | case RNDIS_OID_802_3_PERMANENT_ADDRESS: | 410 | case RNDIS_OID_802_3_PERMANENT_ADDRESS: |
411 | pr_debug("%s: OID_802_3_PERMANENT_ADDRESS\n", __func__); | 411 | pr_debug("%s: RNDIS_OID_802_3_PERMANENT_ADDRESS\n", __func__); |
412 | if (rndis_per_dev_params[configNr].dev) { | 412 | if (rndis_per_dev_params[configNr].dev) { |
413 | length = ETH_ALEN; | 413 | length = ETH_ALEN; |
414 | memcpy(outbuf, | 414 | memcpy(outbuf, |
@@ -419,8 +419,8 @@ static int gen_ndis_query_resp(int configNr, u32 OID, u8 *buf, | |||
419 | break; | 419 | break; |
420 | 420 | ||
421 | /* mandatory */ | 421 | /* mandatory */ |
422 | case OID_802_3_CURRENT_ADDRESS: | 422 | case RNDIS_OID_802_3_CURRENT_ADDRESS: |
423 | pr_debug("%s: OID_802_3_CURRENT_ADDRESS\n", __func__); | 423 | pr_debug("%s: RNDIS_OID_802_3_CURRENT_ADDRESS\n", __func__); |
424 | if (rndis_per_dev_params[configNr].dev) { | 424 | if (rndis_per_dev_params[configNr].dev) { |
425 | length = ETH_ALEN; | 425 | length = ETH_ALEN; |
426 | memcpy(outbuf, | 426 | memcpy(outbuf, |
@@ -431,23 +431,23 @@ static int gen_ndis_query_resp(int configNr, u32 OID, u8 *buf, | |||
431 | break; | 431 | break; |
432 | 432 | ||
433 | /* mandatory */ | 433 | /* mandatory */ |
434 | case OID_802_3_MULTICAST_LIST: | 434 | case RNDIS_OID_802_3_MULTICAST_LIST: |
435 | pr_debug("%s: OID_802_3_MULTICAST_LIST\n", __func__); | 435 | pr_debug("%s: RNDIS_OID_802_3_MULTICAST_LIST\n", __func__); |
436 | /* Multicast base address only */ | 436 | /* Multicast base address only */ |
437 | *outbuf = cpu_to_le32(0xE0000000); | 437 | *outbuf = cpu_to_le32(0xE0000000); |
438 | retval = 0; | 438 | retval = 0; |
439 | break; | 439 | break; |
440 | 440 | ||
441 | /* mandatory */ | 441 | /* mandatory */ |
442 | case OID_802_3_MAXIMUM_LIST_SIZE: | 442 | case RNDIS_OID_802_3_MAXIMUM_LIST_SIZE: |
443 | pr_debug("%s: OID_802_3_MAXIMUM_LIST_SIZE\n", __func__); | 443 | pr_debug("%s: RNDIS_OID_802_3_MAXIMUM_LIST_SIZE\n", __func__); |
444 | /* Multicast base address only */ | 444 | /* Multicast base address only */ |
445 | *outbuf = cpu_to_le32(1); | 445 | *outbuf = cpu_to_le32(1); |
446 | retval = 0; | 446 | retval = 0; |
447 | break; | 447 | break; |
448 | 448 | ||
449 | case OID_802_3_MAC_OPTIONS: | 449 | case RNDIS_OID_802_3_MAC_OPTIONS: |
450 | pr_debug("%s: OID_802_3_MAC_OPTIONS\n", __func__); | 450 | pr_debug("%s: RNDIS_OID_802_3_MAC_OPTIONS\n", __func__); |
451 | *outbuf = cpu_to_le32(0); | 451 | *outbuf = cpu_to_le32(0); |
452 | retval = 0; | 452 | retval = 0; |
453 | break; | 453 | break; |
@@ -455,8 +455,8 @@ static int gen_ndis_query_resp(int configNr, u32 OID, u8 *buf, | |||
455 | /* ieee802.3 statistics OIDs (table 4-4) */ | 455 | /* ieee802.3 statistics OIDs (table 4-4) */ |
456 | 456 | ||
457 | /* mandatory */ | 457 | /* mandatory */ |
458 | case OID_802_3_RCV_ERROR_ALIGNMENT: | 458 | case RNDIS_OID_802_3_RCV_ERROR_ALIGNMENT: |
459 | pr_debug("%s: OID_802_3_RCV_ERROR_ALIGNMENT\n", __func__); | 459 | pr_debug("%s: RNDIS_OID_802_3_RCV_ERROR_ALIGNMENT\n", __func__); |
460 | if (stats) { | 460 | if (stats) { |
461 | *outbuf = cpu_to_le32(stats->rx_frame_errors); | 461 | *outbuf = cpu_to_le32(stats->rx_frame_errors); |
462 | retval = 0; | 462 | retval = 0; |
@@ -464,15 +464,15 @@ static int gen_ndis_query_resp(int configNr, u32 OID, u8 *buf, | |||
464 | break; | 464 | break; |
465 | 465 | ||
466 | /* mandatory */ | 466 | /* mandatory */ |
467 | case OID_802_3_XMIT_ONE_COLLISION: | 467 | case RNDIS_OID_802_3_XMIT_ONE_COLLISION: |
468 | pr_debug("%s: OID_802_3_XMIT_ONE_COLLISION\n", __func__); | 468 | pr_debug("%s: RNDIS_OID_802_3_XMIT_ONE_COLLISION\n", __func__); |
469 | *outbuf = cpu_to_le32(0); | 469 | *outbuf = cpu_to_le32(0); |
470 | retval = 0; | 470 | retval = 0; |
471 | break; | 471 | break; |
472 | 472 | ||
473 | /* mandatory */ | 473 | /* mandatory */ |
474 | case OID_802_3_XMIT_MORE_COLLISIONS: | 474 | case RNDIS_OID_802_3_XMIT_MORE_COLLISIONS: |
475 | pr_debug("%s: OID_802_3_XMIT_MORE_COLLISIONS\n", __func__); | 475 | pr_debug("%s: RNDIS_OID_802_3_XMIT_MORE_COLLISIONS\n", __func__); |
476 | *outbuf = cpu_to_le32(0); | 476 | *outbuf = cpu_to_le32(0); |
477 | retval = 0; | 477 | retval = 0; |
478 | break; | 478 | break; |
@@ -545,9 +545,9 @@ static int gen_ndis_set_resp(u8 configNr, u32 OID, u8 *buf, u32 buf_len, | |||
545 | } | 545 | } |
546 | break; | 546 | break; |
547 | 547 | ||
548 | case OID_802_3_MULTICAST_LIST: | 548 | case RNDIS_OID_802_3_MULTICAST_LIST: |
549 | /* I think we can ignore this */ | 549 | /* I think we can ignore this */ |
550 | pr_debug("%s: OID_802_3_MULTICAST_LIST\n", __func__); | 550 | pr_debug("%s: RNDIS_OID_802_3_MULTICAST_LIST\n", __func__); |
551 | retval = 0; | 551 | retval = 0; |
552 | break; | 552 | break; |
553 | 553 | ||