Commit 4cc6c4d5 authored by Linus Walleij's avatar Linus Walleij Committed by David S. Miller

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: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8cdddc3f
This diff is collapsed.
......@@ -115,23 +115,23 @@ static const u32 oid_supported_list[] =
/* mandatory 802.3 */
/* the general stuff */
RNDIS_OID_802_3_PERMANENT_ADDRESS,
OID_802_3_CURRENT_ADDRESS,
OID_802_3_MULTICAST_LIST,
OID_802_3_MAC_OPTIONS,
OID_802_3_MAXIMUM_LIST_SIZE,
RNDIS_OID_802_3_CURRENT_ADDRESS,
RNDIS_OID_802_3_MULTICAST_LIST,
RNDIS_OID_802_3_MAC_OPTIONS,
RNDIS_OID_802_3_MAXIMUM_LIST_SIZE,
/* the statistical stuff */
OID_802_3_RCV_ERROR_ALIGNMENT,
OID_802_3_XMIT_ONE_COLLISION,
OID_802_3_XMIT_MORE_COLLISIONS,
RNDIS_OID_802_3_RCV_ERROR_ALIGNMENT,
RNDIS_OID_802_3_XMIT_ONE_COLLISION,
RNDIS_OID_802_3_XMIT_MORE_COLLISIONS,
#ifdef RNDIS_OPTIONAL_STATS
OID_802_3_XMIT_DEFERRED,
OID_802_3_XMIT_MAX_COLLISIONS,
OID_802_3_RCV_OVERRUN,
OID_802_3_XMIT_UNDERRUN,
OID_802_3_XMIT_HEARTBEAT_FAILURE,
OID_802_3_XMIT_TIMES_CRS_LOST,
OID_802_3_XMIT_LATE_COLLISIONS,
RNDIS_OID_802_3_XMIT_DEFERRED,
RNDIS_OID_802_3_XMIT_MAX_COLLISIONS,
RNDIS_OID_802_3_RCV_OVERRUN,
RNDIS_OID_802_3_XMIT_UNDERRUN,
RNDIS_OID_802_3_XMIT_HEARTBEAT_FAILURE,
RNDIS_OID_802_3_XMIT_TIMES_CRS_LOST,
RNDIS_OID_802_3_XMIT_LATE_COLLISIONS,
#endif /* RNDIS_OPTIONAL_STATS */
#ifdef RNDIS_PM
......@@ -408,7 +408,7 @@ static int gen_ndis_query_resp(int configNr, u32 OID, u8 *buf,
/* mandatory */
case RNDIS_OID_802_3_PERMANENT_ADDRESS:
pr_debug("%s: OID_802_3_PERMANENT_ADDRESS\n", __func__);
pr_debug("%s: RNDIS_OID_802_3_PERMANENT_ADDRESS\n", __func__);
if (rndis_per_dev_params[configNr].dev) {
length = ETH_ALEN;
memcpy(outbuf,
......@@ -419,8 +419,8 @@ static int gen_ndis_query_resp(int configNr, u32 OID, u8 *buf,
break;
/* mandatory */
case OID_802_3_CURRENT_ADDRESS:
pr_debug("%s: OID_802_3_CURRENT_ADDRESS\n", __func__);
case RNDIS_OID_802_3_CURRENT_ADDRESS:
pr_debug("%s: RNDIS_OID_802_3_CURRENT_ADDRESS\n", __func__);
if (rndis_per_dev_params[configNr].dev) {
length = ETH_ALEN;
memcpy(outbuf,
......@@ -431,23 +431,23 @@ static int gen_ndis_query_resp(int configNr, u32 OID, u8 *buf,
break;
/* mandatory */
case OID_802_3_MULTICAST_LIST:
pr_debug("%s: OID_802_3_MULTICAST_LIST\n", __func__);
case RNDIS_OID_802_3_MULTICAST_LIST:
pr_debug("%s: RNDIS_OID_802_3_MULTICAST_LIST\n", __func__);
/* Multicast base address only */
*outbuf = cpu_to_le32(0xE0000000);
retval = 0;
break;
/* mandatory */
case OID_802_3_MAXIMUM_LIST_SIZE:
pr_debug("%s: OID_802_3_MAXIMUM_LIST_SIZE\n", __func__);
case RNDIS_OID_802_3_MAXIMUM_LIST_SIZE:
pr_debug("%s: RNDIS_OID_802_3_MAXIMUM_LIST_SIZE\n", __func__);
/* Multicast base address only */
*outbuf = cpu_to_le32(1);
retval = 0;
break;
case OID_802_3_MAC_OPTIONS:
pr_debug("%s: OID_802_3_MAC_OPTIONS\n", __func__);
case RNDIS_OID_802_3_MAC_OPTIONS:
pr_debug("%s: RNDIS_OID_802_3_MAC_OPTIONS\n", __func__);
*outbuf = cpu_to_le32(0);
retval = 0;
break;
......@@ -455,8 +455,8 @@ static int gen_ndis_query_resp(int configNr, u32 OID, u8 *buf,
/* ieee802.3 statistics OIDs (table 4-4) */
/* mandatory */
case OID_802_3_RCV_ERROR_ALIGNMENT:
pr_debug("%s: OID_802_3_RCV_ERROR_ALIGNMENT\n", __func__);
case RNDIS_OID_802_3_RCV_ERROR_ALIGNMENT:
pr_debug("%s: RNDIS_OID_802_3_RCV_ERROR_ALIGNMENT\n", __func__);
if (stats) {
*outbuf = cpu_to_le32(stats->rx_frame_errors);
retval = 0;
......@@ -464,15 +464,15 @@ static int gen_ndis_query_resp(int configNr, u32 OID, u8 *buf,
break;
/* mandatory */
case OID_802_3_XMIT_ONE_COLLISION:
pr_debug("%s: OID_802_3_XMIT_ONE_COLLISION\n", __func__);
case RNDIS_OID_802_3_XMIT_ONE_COLLISION:
pr_debug("%s: RNDIS_OID_802_3_XMIT_ONE_COLLISION\n", __func__);
*outbuf = cpu_to_le32(0);
retval = 0;
break;
/* mandatory */
case OID_802_3_XMIT_MORE_COLLISIONS:
pr_debug("%s: OID_802_3_XMIT_MORE_COLLISIONS\n", __func__);
case RNDIS_OID_802_3_XMIT_MORE_COLLISIONS:
pr_debug("%s: RNDIS_OID_802_3_XMIT_MORE_COLLISIONS\n", __func__);
*outbuf = cpu_to_le32(0);
retval = 0;
break;
......@@ -545,9 +545,9 @@ static int gen_ndis_set_resp(u8 configNr, u32 OID, u8 *buf, u32 buf_len,
}
break;
case OID_802_3_MULTICAST_LIST:
case RNDIS_OID_802_3_MULTICAST_LIST:
/* I think we can ignore this */
pr_debug("%s: OID_802_3_MULTICAST_LIST\n", __func__);
pr_debug("%s: RNDIS_OID_802_3_MULTICAST_LIST\n", __func__);
retval = 0;
break;
......
......@@ -70,21 +70,6 @@
/* IEEE 802.3 (Ethernet) OIDs */
#define NDIS_802_3_MAC_OPTION_PRIORITY 0x00000001
#define OID_802_3_CURRENT_ADDRESS 0x01010102
#define OID_802_3_MULTICAST_LIST 0x01010103
#define OID_802_3_MAXIMUM_LIST_SIZE 0x01010104
#define OID_802_3_MAC_OPTIONS 0x01010105
#define OID_802_3_RCV_ERROR_ALIGNMENT 0x01020101
#define OID_802_3_XMIT_ONE_COLLISION 0x01020102
#define OID_802_3_XMIT_MORE_COLLISIONS 0x01020103
#define OID_802_3_XMIT_DEFERRED 0x01020201
#define OID_802_3_XMIT_MAX_COLLISIONS 0x01020202
#define OID_802_3_RCV_OVERRUN 0x01020203
#define OID_802_3_XMIT_UNDERRUN 0x01020204
#define OID_802_3_XMIT_HEARTBEAT_FAILURE 0x01020205
#define OID_802_3_XMIT_TIMES_CRS_LOST 0x01020206
#define OID_802_3_XMIT_LATE_COLLISIONS 0x01020207
/* RNDIS_OID_GEN_MINIPORT_INFO constants */
#define NDIS_MINIPORT_BUS_MASTER 0x00000001
#define NDIS_MINIPORT_WDM_DRIVER 0x00000002
......@@ -402,6 +387,33 @@
#define RNDIS_OID_802_3_XMIT_TIMES_CRS_LOST 0x01020206
#define RNDIS_OID_802_3_XMIT_LATE_COLLISIONS 0x01020207
#define RNDIS_OID_802_11_BSSID 0x0d010101
#define RNDIS_OID_802_11_SSID 0x0d010102
#define RNDIS_OID_802_11_INFRASTRUCTURE_MODE 0x0d010108
#define RNDIS_OID_802_11_ADD_WEP 0x0d010113
#define RNDIS_OID_802_11_REMOVE_WEP 0x0d010114
#define RNDIS_OID_802_11_DISASSOCIATE 0x0d010115
#define RNDIS_OID_802_11_AUTHENTICATION_MODE 0x0d010118
#define RNDIS_OID_802_11_PRIVACY_FILTER 0x0d010119
#define RNDIS_OID_802_11_BSSID_LIST_SCAN 0x0d01011a
#define RNDIS_OID_802_11_ENCRYPTION_STATUS 0x0d01011b
#define RNDIS_OID_802_11_ADD_KEY 0x0d01011d
#define RNDIS_OID_802_11_REMOVE_KEY 0x0d01011e
#define RNDIS_OID_802_11_ASSOCIATION_INFORMATION 0x0d01011f
#define RNDIS_OID_802_11_CAPABILITY 0x0d010122
#define RNDIS_OID_802_11_PMKID 0x0d010123
#define RNDIS_OID_802_11_NETWORK_TYPES_SUPPORTED 0x0d010203
#define RNDIS_OID_802_11_NETWORK_TYPE_IN_USE 0x0d010204
#define RNDIS_OID_802_11_TX_POWER_LEVEL 0x0d010205
#define RNDIS_OID_802_11_RSSI 0x0d010206
#define RNDIS_OID_802_11_RSSI_TRIGGER 0x0d010207
#define RNDIS_OID_802_11_FRAGMENTATION_THRESHOLD 0x0d010209
#define RNDIS_OID_802_11_RTS_THRESHOLD 0x0d01020a
#define RNDIS_OID_802_11_SUPPORTED_RATES 0x0d01020e
#define RNDIS_OID_802_11_CONFIGURATION 0x0d010211
#define RNDIS_OID_802_11_POWER_MODE 0x0d010216
#define RNDIS_OID_802_11_BSSID_LIST 0x0d010217
#define REMOTE_CONDIS_MP_CREATE_VC_MSG 0x00008001
#define REMOTE_CONDIS_MP_DELETE_VC_MSG 0x00008002
#define REMOTE_CONDIS_MP_ACTIVATE_VC_MSG 0x00008005
......@@ -438,37 +450,3 @@
/* Remote NDIS medium connection states. */
#define RNDIS_MEDIA_STATE_CONNECTED 0x00000000
#define RNDIS_MEDIA_STATE_DISCONNECTED 0x00000001
/* From drivers/net/wireless/rndis_wlan.c */
/* various RNDIS OID defs */
#define OID_802_3_CURRENT_ADDRESS 0x01010102
#define OID_802_3_MULTICAST_LIST 0x01010103
#define OID_802_3_MAXIMUM_LIST_SIZE 0x01010104
#define OID_802_11_BSSID 0x0d010101
#define OID_802_11_SSID 0x0d010102
#define OID_802_11_INFRASTRUCTURE_MODE 0x0d010108
#define OID_802_11_ADD_WEP 0x0d010113
#define OID_802_11_REMOVE_WEP 0x0d010114
#define OID_802_11_DISASSOCIATE 0x0d010115
#define OID_802_11_AUTHENTICATION_MODE 0x0d010118
#define OID_802_11_PRIVACY_FILTER 0x0d010119
#define OID_802_11_BSSID_LIST_SCAN 0x0d01011a
#define OID_802_11_ENCRYPTION_STATUS 0x0d01011b
#define OID_802_11_ADD_KEY 0x0d01011d
#define OID_802_11_REMOVE_KEY 0x0d01011e
#define OID_802_11_ASSOCIATION_INFORMATION 0x0d01011f
#define OID_802_11_CAPABILITY 0x0d010122
#define OID_802_11_PMKID 0x0d010123
#define OID_802_11_NETWORK_TYPES_SUPPORTED 0x0d010203
#define OID_802_11_NETWORK_TYPE_IN_USE 0x0d010204
#define OID_802_11_TX_POWER_LEVEL 0x0d010205
#define OID_802_11_RSSI 0x0d010206
#define OID_802_11_RSSI_TRIGGER 0x0d010207
#define OID_802_11_FRAGMENTATION_THRESHOLD 0x0d010209
#define OID_802_11_RTS_THRESHOLD 0x0d01020a
#define OID_802_11_SUPPORTED_RATES 0x0d01020e
#define OID_802_11_CONFIGURATION 0x0d010211
#define OID_802_11_POWER_MODE 0x0d010216
#define OID_802_11_BSSID_LIST 0x0d010217
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment