aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/f_rndis.c
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2012-05-11 18:16:39 -0400
committerDavid S. Miller <davem@davemloft.net>2012-05-12 15:08:06 -0400
commit17c51b6ccc7d470a8801135e0af7f97915f46e32 (patch)
tree5e927f50f9469a3acce703dff0f5ea918163c8e2 /drivers/usb/gadget/f_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/f_rndis.c')
-rw-r--r--drivers/usb/gadget/f_rndis.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/gadget/f_rndis.c b/drivers/usb/gadget/f_rndis.c
index 52343654f5df..d4f823f463e9 100644
--- a/drivers/usb/gadget/f_rndis.c
+++ b/drivers/usb/gadget/f_rndis.c
@@ -637,7 +637,7 @@ static void rndis_open(struct gether *geth)
637 637
638 DBG(cdev, "%s\n", __func__); 638 DBG(cdev, "%s\n", __func__);
639 639
640 rndis_set_param_medium(rndis->config, NDIS_MEDIUM_802_3, 640 rndis_set_param_medium(rndis->config, RNDIS_MEDIUM_802_3,
641 bitrate(cdev->gadget) / 100); 641 bitrate(cdev->gadget) / 100);
642 rndis_signal_connect(rndis->config); 642 rndis_signal_connect(rndis->config);
643} 643}
@@ -648,7 +648,7 @@ static void rndis_close(struct gether *geth)
648 648
649 DBG(geth->func.config->cdev, "%s\n", __func__); 649 DBG(geth->func.config->cdev, "%s\n", __func__);
650 650
651 rndis_set_param_medium(rndis->config, NDIS_MEDIUM_802_3, 0); 651 rndis_set_param_medium(rndis->config, RNDIS_MEDIUM_802_3, 0);
652 rndis_signal_disconnect(rndis->config); 652 rndis_signal_disconnect(rndis->config);
653} 653}
654 654
@@ -765,7 +765,7 @@ rndis_bind(struct usb_configuration *c, struct usb_function *f)
765 goto fail; 765 goto fail;
766 rndis->config = status; 766 rndis->config = status;
767 767
768 rndis_set_param_medium(rndis->config, NDIS_MEDIUM_802_3, 0); 768 rndis_set_param_medium(rndis->config, RNDIS_MEDIUM_802_3, 0);
769 rndis_set_host_mac(rndis->config, rndis->ethaddr); 769 rndis_set_host_mac(rndis->config, rndis->ethaddr);
770 770
771#if 0 771#if 0