summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/rndis.c
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2012-05-11 22:16:39 +0000
committerDavid S. Miller <davem@davemloft.net>2012-05-12 15:08:06 -0400
commit17c51b6ccc7d470a8801135e0af7f97915f46e32 (patch)
tree5e927f50f9469a3acce703dff0f5ea918163c8e2 /drivers/usb/gadget/rndis.c
parent91d6aef7d12fc1ba860e0d1c9a445cfcf15655bd (diff)
usb/net: rndis: merge media type definitions
Let's have a unified table of RNDIS media. We used to have a similar table with NDIS_* prefix from the gadget driver, but since we're only using RNDIS in the kernel (IIRC NDIS, non-remote, is for the windows- internal network drivers so what do we care) let's prefix everything with RNDIS. Some of the definitions were conflicting, in one of the defines 0x0B is bearer "CO WAN" and in two others "BPC". Well I took the majority vote. Two definition of medium 0x09 calls it "wireless WAN" but one vote for "wireless LAN" but in this case I am sticking with the minority, "Wide Area Network" does not make much sense in this case as far as I can tell. NOTE: latin singular and plural is so screwed up in these defines that it makes my eyes bleed. But I will not attempt to submit a patch converting all use of _MEDIA_ to _MEDIUM_ while I can probably tell from the semantics of the code that RNDIS_MEDIA_STATE_CONNECTED is most probably (erroneously) referring to a singular, unless it can return an array of connected media. I suspect these erroneous plurals are used in documentation and such so I don't want to mess around with things for no functional change. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/usb/gadget/rndis.c')
-rw-r--r--drivers/usb/gadget/rndis.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/usb/gadget/rndis.c b/drivers/usb/gadget/rndis.c
index 79ed261c88c1..d9086caab64b 100644
--- a/drivers/usb/gadget/rndis.c
+++ b/drivers/usb/gadget/rndis.c
@@ -252,7 +252,7 @@ static int gen_ndis_query_resp(int configNr, u32 OID, u8 *buf,
if (rndis_debug > 1)
pr_debug("%s: RNDIS_OID_GEN_LINK_SPEED\n", __func__);
if (rndis_per_dev_params[configNr].media_state
- == NDIS_MEDIA_STATE_DISCONNECTED)
+ == RNDIS_MEDIA_STATE_DISCONNECTED)
*outbuf = cpu_to_le32(0);
else
*outbuf = cpu_to_le32(
@@ -758,7 +758,7 @@ static int rndis_indicate_status_msg(int configNr, u32 status)
int rndis_signal_connect(int configNr)
{
rndis_per_dev_params[configNr].media_state
- = NDIS_MEDIA_STATE_CONNECTED;
+ = RNDIS_MEDIA_STATE_CONNECTED;
return rndis_indicate_status_msg(configNr,
RNDIS_STATUS_MEDIA_CONNECT);
}
@@ -766,7 +766,7 @@ int rndis_signal_connect(int configNr)
int rndis_signal_disconnect(int configNr)
{
rndis_per_dev_params[configNr].media_state
- = NDIS_MEDIA_STATE_DISCONNECTED;
+ = RNDIS_MEDIA_STATE_DISCONNECTED;
return rndis_indicate_status_msg(configNr,
RNDIS_STATUS_MEDIA_DISCONNECT);
}
@@ -1173,7 +1173,7 @@ int rndis_init(void)
rndis_per_dev_params[i].used = 0;
rndis_per_dev_params[i].state = RNDIS_UNINITIALIZED;
rndis_per_dev_params[i].media_state
- = NDIS_MEDIA_STATE_DISCONNECTED;
+ = RNDIS_MEDIA_STATE_DISCONNECTED;
INIT_LIST_HEAD(&(rndis_per_dev_params[i].resp_queue));
}