diff options
author | Harvey Harrison <harvey.harrison@gmail.com> | 2008-03-03 19:08:34 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-04-25 00:16:55 -0400 |
commit | 441b62c1edb986827154768d89bbac0ba779984f (patch) | |
tree | 13724c22d1b190a36f0ddbba38554e6c66bea6af /drivers/usb/gadget | |
parent | 14722ef4acedc643f0b78b7165ceff2d300dae4d (diff) |
USB: replace remaining __FUNCTION__ occurrences
__FUNCTION__ is gcc-specific, use __func__
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r-- | drivers/usb/gadget/at91_udc.c | 4 | ||||
-rw-r--r-- | drivers/usb/gadget/dummy_hcd.c | 12 | ||||
-rw-r--r-- | drivers/usb/gadget/ether.c | 12 | ||||
-rw-r--r-- | drivers/usb/gadget/file_storage.c | 8 | ||||
-rw-r--r-- | drivers/usb/gadget/fsl_usb2_udc.c | 4 | ||||
-rw-r--r-- | drivers/usb/gadget/fsl_usb2_udc.h | 2 | ||||
-rw-r--r-- | drivers/usb/gadget/goku_udc.c | 20 | ||||
-rw-r--r-- | drivers/usb/gadget/inode.c | 18 | ||||
-rw-r--r-- | drivers/usb/gadget/lh7a40x_udc.c | 132 | ||||
-rw-r--r-- | drivers/usb/gadget/net2280.h | 2 | ||||
-rw-r--r-- | drivers/usb/gadget/omap_udc.c | 16 | ||||
-rw-r--r-- | drivers/usb/gadget/printer.c | 6 | ||||
-rw-r--r-- | drivers/usb/gadget/pxa2xx_udc.c | 26 | ||||
-rw-r--r-- | drivers/usb/gadget/rndis.c | 146 |
14 files changed, 204 insertions, 204 deletions
diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_udc.c index 5d352c900d2c..9b913afb2e6d 100644 --- a/drivers/usb/gadget/at91_udc.c +++ b/drivers/usb/gadget/at91_udc.c | |||
@@ -460,7 +460,7 @@ static void nuke(struct at91_ep *ep, int status) | |||
460 | if (list_empty(&ep->queue)) | 460 | if (list_empty(&ep->queue)) |
461 | return; | 461 | return; |
462 | 462 | ||
463 | VDBG("%s %s\n", __FUNCTION__, ep->ep.name); | 463 | VDBG("%s %s\n", __func__, ep->ep.name); |
464 | while (!list_empty(&ep->queue)) { | 464 | while (!list_empty(&ep->queue)) { |
465 | req = list_entry(ep->queue.next, struct at91_request, queue); | 465 | req = list_entry(ep->queue.next, struct at91_request, queue); |
466 | done(ep, req, status); | 466 | done(ep, req, status); |
@@ -795,7 +795,7 @@ static int at91_wakeup(struct usb_gadget *gadget) | |||
795 | int status = -EINVAL; | 795 | int status = -EINVAL; |
796 | unsigned long flags; | 796 | unsigned long flags; |
797 | 797 | ||
798 | DBG("%s\n", __FUNCTION__ ); | 798 | DBG("%s\n", __func__ ); |
799 | local_irq_save(flags); | 799 | local_irq_save(flags); |
800 | 800 | ||
801 | if (!udc->clocked || !udc->suspended) | 801 | if (!udc->clocked || !udc->suspended) |
diff --git a/drivers/usb/gadget/dummy_hcd.c b/drivers/usb/gadget/dummy_hcd.c index 74f51a703b42..66293105d136 100644 --- a/drivers/usb/gadget/dummy_hcd.c +++ b/drivers/usb/gadget/dummy_hcd.c | |||
@@ -892,7 +892,7 @@ static int dummy_udc_suspend (struct platform_device *pdev, pm_message_t state) | |||
892 | { | 892 | { |
893 | struct dummy *dum = platform_get_drvdata(pdev); | 893 | struct dummy *dum = platform_get_drvdata(pdev); |
894 | 894 | ||
895 | dev_dbg (&pdev->dev, "%s\n", __FUNCTION__); | 895 | dev_dbg (&pdev->dev, "%s\n", __func__); |
896 | spin_lock_irq (&dum->lock); | 896 | spin_lock_irq (&dum->lock); |
897 | dum->udc_suspended = 1; | 897 | dum->udc_suspended = 1; |
898 | set_link_state (dum); | 898 | set_link_state (dum); |
@@ -906,7 +906,7 @@ static int dummy_udc_resume (struct platform_device *pdev) | |||
906 | { | 906 | { |
907 | struct dummy *dum = platform_get_drvdata(pdev); | 907 | struct dummy *dum = platform_get_drvdata(pdev); |
908 | 908 | ||
909 | dev_dbg (&pdev->dev, "%s\n", __FUNCTION__); | 909 | dev_dbg (&pdev->dev, "%s\n", __func__); |
910 | spin_lock_irq (&dum->lock); | 910 | spin_lock_irq (&dum->lock); |
911 | dum->udc_suspended = 0; | 911 | dum->udc_suspended = 0; |
912 | set_link_state (dum); | 912 | set_link_state (dum); |
@@ -1707,7 +1707,7 @@ static int dummy_bus_suspend (struct usb_hcd *hcd) | |||
1707 | { | 1707 | { |
1708 | struct dummy *dum = hcd_to_dummy (hcd); | 1708 | struct dummy *dum = hcd_to_dummy (hcd); |
1709 | 1709 | ||
1710 | dev_dbg (&hcd->self.root_hub->dev, "%s\n", __FUNCTION__); | 1710 | dev_dbg (&hcd->self.root_hub->dev, "%s\n", __func__); |
1711 | 1711 | ||
1712 | spin_lock_irq (&dum->lock); | 1712 | spin_lock_irq (&dum->lock); |
1713 | dum->rh_state = DUMMY_RH_SUSPENDED; | 1713 | dum->rh_state = DUMMY_RH_SUSPENDED; |
@@ -1722,7 +1722,7 @@ static int dummy_bus_resume (struct usb_hcd *hcd) | |||
1722 | struct dummy *dum = hcd_to_dummy (hcd); | 1722 | struct dummy *dum = hcd_to_dummy (hcd); |
1723 | int rc = 0; | 1723 | int rc = 0; |
1724 | 1724 | ||
1725 | dev_dbg (&hcd->self.root_hub->dev, "%s\n", __FUNCTION__); | 1725 | dev_dbg (&hcd->self.root_hub->dev, "%s\n", __func__); |
1726 | 1726 | ||
1727 | spin_lock_irq (&dum->lock); | 1727 | spin_lock_irq (&dum->lock); |
1728 | if (!test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags)) { | 1728 | if (!test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags)) { |
@@ -1896,7 +1896,7 @@ static int dummy_hcd_suspend (struct platform_device *pdev, pm_message_t state) | |||
1896 | struct dummy *dum; | 1896 | struct dummy *dum; |
1897 | int rc = 0; | 1897 | int rc = 0; |
1898 | 1898 | ||
1899 | dev_dbg (&pdev->dev, "%s\n", __FUNCTION__); | 1899 | dev_dbg (&pdev->dev, "%s\n", __func__); |
1900 | 1900 | ||
1901 | hcd = platform_get_drvdata (pdev); | 1901 | hcd = platform_get_drvdata (pdev); |
1902 | dum = hcd_to_dummy (hcd); | 1902 | dum = hcd_to_dummy (hcd); |
@@ -1912,7 +1912,7 @@ static int dummy_hcd_resume (struct platform_device *pdev) | |||
1912 | { | 1912 | { |
1913 | struct usb_hcd *hcd; | 1913 | struct usb_hcd *hcd; |
1914 | 1914 | ||
1915 | dev_dbg (&pdev->dev, "%s\n", __FUNCTION__); | 1915 | dev_dbg (&pdev->dev, "%s\n", __func__); |
1916 | 1916 | ||
1917 | hcd = platform_get_drvdata (pdev); | 1917 | hcd = platform_get_drvdata (pdev); |
1918 | set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); | 1918 | set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); |
diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c index 92b9bf78071f..bb93bdd76593 100644 --- a/drivers/usb/gadget/ether.c +++ b/drivers/usb/gadget/ether.c | |||
@@ -1102,7 +1102,7 @@ static void eth_reset_config (struct eth_dev *dev) | |||
1102 | if (dev->config == 0) | 1102 | if (dev->config == 0) |
1103 | return; | 1103 | return; |
1104 | 1104 | ||
1105 | DEBUG (dev, "%s\n", __FUNCTION__); | 1105 | DEBUG (dev, "%s\n", __func__); |
1106 | 1106 | ||
1107 | netif_stop_queue (dev->net); | 1107 | netif_stop_queue (dev->net); |
1108 | netif_carrier_off (dev->net); | 1108 | netif_carrier_off (dev->net); |
@@ -1263,7 +1263,7 @@ static void issue_start_status (struct eth_dev *dev) | |||
1263 | struct usb_cdc_notification *event; | 1263 | struct usb_cdc_notification *event; |
1264 | int value; | 1264 | int value; |
1265 | 1265 | ||
1266 | DEBUG (dev, "%s, flush old status first\n", __FUNCTION__); | 1266 | DEBUG (dev, "%s, flush old status first\n", __func__); |
1267 | 1267 | ||
1268 | /* flush old status | 1268 | /* flush old status |
1269 | * | 1269 | * |
@@ -1329,7 +1329,7 @@ static void rndis_command_complete (struct usb_ep *ep, struct usb_request *req) | |||
1329 | spin_lock(&dev->lock); | 1329 | spin_lock(&dev->lock); |
1330 | status = rndis_msg_parser (dev->rndis_config, (u8 *) req->buf); | 1330 | status = rndis_msg_parser (dev->rndis_config, (u8 *) req->buf); |
1331 | if (status < 0) | 1331 | if (status < 0) |
1332 | ERROR(dev, "%s: rndis parse error %d\n", __FUNCTION__, status); | 1332 | ERROR(dev, "%s: rndis parse error %d\n", __func__, status); |
1333 | spin_unlock(&dev->lock); | 1333 | spin_unlock(&dev->lock); |
1334 | } | 1334 | } |
1335 | 1335 | ||
@@ -2113,7 +2113,7 @@ static int rndis_control_ack (struct net_device *net) | |||
2113 | 2113 | ||
2114 | static void eth_start (struct eth_dev *dev, gfp_t gfp_flags) | 2114 | static void eth_start (struct eth_dev *dev, gfp_t gfp_flags) |
2115 | { | 2115 | { |
2116 | DEBUG (dev, "%s\n", __FUNCTION__); | 2116 | DEBUG (dev, "%s\n", __func__); |
2117 | 2117 | ||
2118 | /* fill the rx queue */ | 2118 | /* fill the rx queue */ |
2119 | rx_fill (dev, gfp_flags); | 2119 | rx_fill (dev, gfp_flags); |
@@ -2133,7 +2133,7 @@ static int eth_open (struct net_device *net) | |||
2133 | { | 2133 | { |
2134 | struct eth_dev *dev = netdev_priv(net); | 2134 | struct eth_dev *dev = netdev_priv(net); |
2135 | 2135 | ||
2136 | DEBUG (dev, "%s\n", __FUNCTION__); | 2136 | DEBUG (dev, "%s\n", __func__); |
2137 | if (netif_carrier_ok (dev->net)) | 2137 | if (netif_carrier_ok (dev->net)) |
2138 | eth_start (dev, GFP_KERNEL); | 2138 | eth_start (dev, GFP_KERNEL); |
2139 | return 0; | 2139 | return 0; |
@@ -2143,7 +2143,7 @@ static int eth_stop (struct net_device *net) | |||
2143 | { | 2143 | { |
2144 | struct eth_dev *dev = netdev_priv(net); | 2144 | struct eth_dev *dev = netdev_priv(net); |
2145 | 2145 | ||
2146 | VDEBUG (dev, "%s\n", __FUNCTION__); | 2146 | VDEBUG (dev, "%s\n", __func__); |
2147 | netif_stop_queue (net); | 2147 | netif_stop_queue (net); |
2148 | 2148 | ||
2149 | DEBUG (dev, "stop stats: rx/tx %ld/%ld, errs %ld/%ld\n", | 2149 | DEBUG (dev, "stop stats: rx/tx %ld/%ld, errs %ld/%ld\n", |
diff --git a/drivers/usb/gadget/file_storage.c b/drivers/usb/gadget/file_storage.c index 0a726e106ccd..bf3f946fd455 100644 --- a/drivers/usb/gadget/file_storage.c +++ b/drivers/usb/gadget/file_storage.c | |||
@@ -1104,7 +1104,7 @@ static void ep0_complete(struct usb_ep *ep, struct usb_request *req) | |||
1104 | if (req->actual > 0) | 1104 | if (req->actual > 0) |
1105 | dump_msg(fsg, fsg->ep0req_name, req->buf, req->actual); | 1105 | dump_msg(fsg, fsg->ep0req_name, req->buf, req->actual); |
1106 | if (req->status || req->actual != req->length) | 1106 | if (req->status || req->actual != req->length) |
1107 | DBG(fsg, "%s --> %d, %u/%u\n", __FUNCTION__, | 1107 | DBG(fsg, "%s --> %d, %u/%u\n", __func__, |
1108 | req->status, req->actual, req->length); | 1108 | req->status, req->actual, req->length); |
1109 | if (req->status == -ECONNRESET) // Request was cancelled | 1109 | if (req->status == -ECONNRESET) // Request was cancelled |
1110 | usb_ep_fifo_flush(ep); | 1110 | usb_ep_fifo_flush(ep); |
@@ -1125,7 +1125,7 @@ static void bulk_in_complete(struct usb_ep *ep, struct usb_request *req) | |||
1125 | struct fsg_buffhd *bh = req->context; | 1125 | struct fsg_buffhd *bh = req->context; |
1126 | 1126 | ||
1127 | if (req->status || req->actual != req->length) | 1127 | if (req->status || req->actual != req->length) |
1128 | DBG(fsg, "%s --> %d, %u/%u\n", __FUNCTION__, | 1128 | DBG(fsg, "%s --> %d, %u/%u\n", __func__, |
1129 | req->status, req->actual, req->length); | 1129 | req->status, req->actual, req->length); |
1130 | if (req->status == -ECONNRESET) // Request was cancelled | 1130 | if (req->status == -ECONNRESET) // Request was cancelled |
1131 | usb_ep_fifo_flush(ep); | 1131 | usb_ep_fifo_flush(ep); |
@@ -1146,7 +1146,7 @@ static void bulk_out_complete(struct usb_ep *ep, struct usb_request *req) | |||
1146 | 1146 | ||
1147 | dump_msg(fsg, "bulk-out", req->buf, req->actual); | 1147 | dump_msg(fsg, "bulk-out", req->buf, req->actual); |
1148 | if (req->status || req->actual != bh->bulk_out_intended_length) | 1148 | if (req->status || req->actual != bh->bulk_out_intended_length) |
1149 | DBG(fsg, "%s --> %d, %u/%u\n", __FUNCTION__, | 1149 | DBG(fsg, "%s --> %d, %u/%u\n", __func__, |
1150 | req->status, req->actual, | 1150 | req->status, req->actual, |
1151 | bh->bulk_out_intended_length); | 1151 | bh->bulk_out_intended_length); |
1152 | if (req->status == -ECONNRESET) // Request was cancelled | 1152 | if (req->status == -ECONNRESET) // Request was cancelled |
@@ -1169,7 +1169,7 @@ static void intr_in_complete(struct usb_ep *ep, struct usb_request *req) | |||
1169 | struct fsg_buffhd *bh = req->context; | 1169 | struct fsg_buffhd *bh = req->context; |
1170 | 1170 | ||
1171 | if (req->status || req->actual != req->length) | 1171 | if (req->status || req->actual != req->length) |
1172 | DBG(fsg, "%s --> %d, %u/%u\n", __FUNCTION__, | 1172 | DBG(fsg, "%s --> %d, %u/%u\n", __func__, |
1173 | req->status, req->actual, req->length); | 1173 | req->status, req->actual, req->length); |
1174 | if (req->status == -ECONNRESET) // Request was cancelled | 1174 | if (req->status == -ECONNRESET) // Request was cancelled |
1175 | usb_ep_fifo_flush(ep); | 1175 | usb_ep_fifo_flush(ep); |
diff --git a/drivers/usb/gadget/fsl_usb2_udc.c b/drivers/usb/gadget/fsl_usb2_udc.c index 254012ad2b91..651b82701394 100644 --- a/drivers/usb/gadget/fsl_usb2_udc.c +++ b/drivers/usb/gadget/fsl_usb2_udc.c | |||
@@ -773,11 +773,11 @@ fsl_ep_queue(struct usb_ep *_ep, struct usb_request *_req, gfp_t gfp_flags) | |||
773 | /* catch various bogus parameters */ | 773 | /* catch various bogus parameters */ |
774 | if (!_req || !req->req.complete || !req->req.buf | 774 | if (!_req || !req->req.complete || !req->req.buf |
775 | || !list_empty(&req->queue)) { | 775 | || !list_empty(&req->queue)) { |
776 | VDBG("%s, bad params\n", __FUNCTION__); | 776 | VDBG("%s, bad params\n", __func__); |
777 | return -EINVAL; | 777 | return -EINVAL; |
778 | } | 778 | } |
779 | if (unlikely(!_ep || !ep->desc)) { | 779 | if (unlikely(!_ep || !ep->desc)) { |
780 | VDBG("%s, bad ep\n", __FUNCTION__); | 780 | VDBG("%s, bad ep\n", __func__); |
781 | return -EINVAL; | 781 | return -EINVAL; |
782 | } | 782 | } |
783 | if (ep->desc->bmAttributes == USB_ENDPOINT_XFER_ISOC) { | 783 | if (ep->desc->bmAttributes == USB_ENDPOINT_XFER_ISOC) { |
diff --git a/drivers/usb/gadget/fsl_usb2_udc.h b/drivers/usb/gadget/fsl_usb2_udc.h index 9fb0b1ec8526..98b1483ef6a5 100644 --- a/drivers/usb/gadget/fsl_usb2_udc.h +++ b/drivers/usb/gadget/fsl_usb2_udc.h | |||
@@ -512,7 +512,7 @@ struct fsl_udc { | |||
512 | 512 | ||
513 | #ifdef DEBUG | 513 | #ifdef DEBUG |
514 | #define DBG(fmt, args...) printk(KERN_DEBUG "[%s] " fmt "\n", \ | 514 | #define DBG(fmt, args...) printk(KERN_DEBUG "[%s] " fmt "\n", \ |
515 | __FUNCTION__, ## args) | 515 | __func__, ## args) |
516 | #else | 516 | #else |
517 | #define DBG(fmt, args...) do{}while(0) | 517 | #define DBG(fmt, args...) do{}while(0) |
518 | #endif | 518 | #endif |
diff --git a/drivers/usb/gadget/goku_udc.c b/drivers/usb/gadget/goku_udc.c index d3e702576de6..64a592cbbe7b 100644 --- a/drivers/usb/gadget/goku_udc.c +++ b/drivers/usb/gadget/goku_udc.c | |||
@@ -692,7 +692,7 @@ static void abort_dma(struct goku_ep *ep, int status) | |||
692 | req->req.actual = (curr - req->req.dma) + 1; | 692 | req->req.actual = (curr - req->req.dma) + 1; |
693 | req->req.status = status; | 693 | req->req.status = status; |
694 | 694 | ||
695 | VDBG(ep->dev, "%s %s %s %d/%d\n", __FUNCTION__, ep->ep.name, | 695 | VDBG(ep->dev, "%s %s %s %d/%d\n", __func__, ep->ep.name, |
696 | ep->is_in ? "IN" : "OUT", | 696 | ep->is_in ? "IN" : "OUT", |
697 | req->req.actual, req->req.length); | 697 | req->req.actual, req->req.length); |
698 | 698 | ||
@@ -826,7 +826,7 @@ static int goku_dequeue(struct usb_ep *_ep, struct usb_request *_req) | |||
826 | if (dev->ep0state == EP0_SUSPEND) | 826 | if (dev->ep0state == EP0_SUSPEND) |
827 | return -EBUSY; | 827 | return -EBUSY; |
828 | 828 | ||
829 | VDBG(dev, "%s %s %s %s %p\n", __FUNCTION__, _ep->name, | 829 | VDBG(dev, "%s %s %s %s %p\n", __func__, _ep->name, |
830 | ep->is_in ? "IN" : "OUT", | 830 | ep->is_in ? "IN" : "OUT", |
831 | ep->dma ? "dma" : "pio", | 831 | ep->dma ? "dma" : "pio", |
832 | _req); | 832 | _req); |
@@ -898,7 +898,7 @@ static int goku_set_halt(struct usb_ep *_ep, int value) | |||
898 | 898 | ||
899 | /* don't change EPxSTATUS_EP_INVALID to READY */ | 899 | /* don't change EPxSTATUS_EP_INVALID to READY */ |
900 | } else if (!ep->desc) { | 900 | } else if (!ep->desc) { |
901 | DBG(ep->dev, "%s %s inactive?\n", __FUNCTION__, ep->ep.name); | 901 | DBG(ep->dev, "%s %s inactive?\n", __func__, ep->ep.name); |
902 | return -EINVAL; | 902 | return -EINVAL; |
903 | } | 903 | } |
904 | 904 | ||
@@ -940,7 +940,7 @@ static int goku_fifo_status(struct usb_ep *_ep) | |||
940 | regs = ep->dev->regs; | 940 | regs = ep->dev->regs; |
941 | size = readl(®s->EPxSizeLA[ep->num]) & DATASIZE; | 941 | size = readl(®s->EPxSizeLA[ep->num]) & DATASIZE; |
942 | size += readl(®s->EPxSizeLB[ep->num]) & DATASIZE; | 942 | size += readl(®s->EPxSizeLB[ep->num]) & DATASIZE; |
943 | VDBG(ep->dev, "%s %s %u\n", __FUNCTION__, ep->ep.name, size); | 943 | VDBG(ep->dev, "%s %s %u\n", __func__, ep->ep.name, size); |
944 | return size; | 944 | return size; |
945 | } | 945 | } |
946 | 946 | ||
@@ -953,11 +953,11 @@ static void goku_fifo_flush(struct usb_ep *_ep) | |||
953 | if (!_ep) | 953 | if (!_ep) |
954 | return; | 954 | return; |
955 | ep = container_of(_ep, struct goku_ep, ep); | 955 | ep = container_of(_ep, struct goku_ep, ep); |
956 | VDBG(ep->dev, "%s %s\n", __FUNCTION__, ep->ep.name); | 956 | VDBG(ep->dev, "%s %s\n", __func__, ep->ep.name); |
957 | 957 | ||
958 | /* don't change EPxSTATUS_EP_INVALID to READY */ | 958 | /* don't change EPxSTATUS_EP_INVALID to READY */ |
959 | if (!ep->desc && ep->num != 0) { | 959 | if (!ep->desc && ep->num != 0) { |
960 | DBG(ep->dev, "%s %s inactive?\n", __FUNCTION__, ep->ep.name); | 960 | DBG(ep->dev, "%s %s inactive?\n", __func__, ep->ep.name); |
961 | return; | 961 | return; |
962 | } | 962 | } |
963 | 963 | ||
@@ -1286,7 +1286,7 @@ static void ep0_start(struct goku_udc *dev) | |||
1286 | struct goku_udc_regs __iomem *regs = dev->regs; | 1286 | struct goku_udc_regs __iomem *regs = dev->regs; |
1287 | unsigned i; | 1287 | unsigned i; |
1288 | 1288 | ||
1289 | VDBG(dev, "%s\n", __FUNCTION__); | 1289 | VDBG(dev, "%s\n", __func__); |
1290 | 1290 | ||
1291 | udc_reset(dev); | 1291 | udc_reset(dev); |
1292 | udc_reinit (dev); | 1292 | udc_reinit (dev); |
@@ -1322,7 +1322,7 @@ static void udc_enable(struct goku_udc *dev) | |||
1322 | if (readl(&dev->regs->power_detect) & PW_DETECT) | 1322 | if (readl(&dev->regs->power_detect) & PW_DETECT) |
1323 | ep0_start(dev); | 1323 | ep0_start(dev); |
1324 | else { | 1324 | else { |
1325 | DBG(dev, "%s\n", __FUNCTION__); | 1325 | DBG(dev, "%s\n", __func__); |
1326 | dev->int_enable = INT_PWRDETECT; | 1326 | dev->int_enable = INT_PWRDETECT; |
1327 | writel(dev->int_enable, &dev->regs->int_enable); | 1327 | writel(dev->int_enable, &dev->regs->int_enable); |
1328 | } | 1328 | } |
@@ -1387,7 +1387,7 @@ stop_activity(struct goku_udc *dev, struct usb_gadget_driver *driver) | |||
1387 | { | 1387 | { |
1388 | unsigned i; | 1388 | unsigned i; |
1389 | 1389 | ||
1390 | DBG (dev, "%s\n", __FUNCTION__); | 1390 | DBG (dev, "%s\n", __func__); |
1391 | 1391 | ||
1392 | if (dev->gadget.speed == USB_SPEED_UNKNOWN) | 1392 | if (dev->gadget.speed == USB_SPEED_UNKNOWN) |
1393 | driver = NULL; | 1393 | driver = NULL; |
@@ -1726,7 +1726,7 @@ static void goku_remove(struct pci_dev *pdev) | |||
1726 | { | 1726 | { |
1727 | struct goku_udc *dev = pci_get_drvdata(pdev); | 1727 | struct goku_udc *dev = pci_get_drvdata(pdev); |
1728 | 1728 | ||
1729 | DBG(dev, "%s\n", __FUNCTION__); | 1729 | DBG(dev, "%s\n", __func__); |
1730 | 1730 | ||
1731 | BUG_ON(dev->driver); | 1731 | BUG_ON(dev->driver); |
1732 | 1732 | ||
diff --git a/drivers/usb/gadget/inode.c b/drivers/usb/gadget/inode.c index 0a6feafc8d28..69b0a2754f2a 100644 --- a/drivers/usb/gadget/inode.c +++ b/drivers/usb/gadget/inode.c | |||
@@ -1107,13 +1107,13 @@ scan: | |||
1107 | 1107 | ||
1108 | switch (state) { | 1108 | switch (state) { |
1109 | default: | 1109 | default: |
1110 | DBG (dev, "fail %s, state %d\n", __FUNCTION__, state); | 1110 | DBG (dev, "fail %s, state %d\n", __func__, state); |
1111 | retval = -ESRCH; | 1111 | retval = -ESRCH; |
1112 | break; | 1112 | break; |
1113 | case STATE_DEV_UNCONNECTED: | 1113 | case STATE_DEV_UNCONNECTED: |
1114 | case STATE_DEV_CONNECTED: | 1114 | case STATE_DEV_CONNECTED: |
1115 | spin_unlock_irq (&dev->lock); | 1115 | spin_unlock_irq (&dev->lock); |
1116 | DBG (dev, "%s wait\n", __FUNCTION__); | 1116 | DBG (dev, "%s wait\n", __func__); |
1117 | 1117 | ||
1118 | /* wait for events */ | 1118 | /* wait for events */ |
1119 | retval = wait_event_interruptible (dev->wait, | 1119 | retval = wait_event_interruptible (dev->wait, |
@@ -1222,7 +1222,7 @@ ep0_write (struct file *fd, const char __user *buf, size_t len, loff_t *ptr) | |||
1222 | DBG(dev, "bogus ep0out stall!\n"); | 1222 | DBG(dev, "bogus ep0out stall!\n"); |
1223 | } | 1223 | } |
1224 | } else | 1224 | } else |
1225 | DBG (dev, "fail %s, state %d\n", __FUNCTION__, dev->state); | 1225 | DBG (dev, "fail %s, state %d\n", __func__, dev->state); |
1226 | 1226 | ||
1227 | spin_unlock_irq (&dev->lock); | 1227 | spin_unlock_irq (&dev->lock); |
1228 | return retval; | 1228 | return retval; |
@@ -1233,7 +1233,7 @@ ep0_fasync (int f, struct file *fd, int on) | |||
1233 | { | 1233 | { |
1234 | struct dev_data *dev = fd->private_data; | 1234 | struct dev_data *dev = fd->private_data; |
1235 | // caller must F_SETOWN before signal delivery happens | 1235 | // caller must F_SETOWN before signal delivery happens |
1236 | VDEBUG (dev, "%s %s\n", __FUNCTION__, on ? "on" : "off"); | 1236 | VDEBUG (dev, "%s %s\n", __func__, on ? "on" : "off"); |
1237 | return fasync_helper (f, fd, on, &dev->fasync); | 1237 | return fasync_helper (f, fd, on, &dev->fasync); |
1238 | } | 1238 | } |
1239 | 1239 | ||
@@ -1575,7 +1575,7 @@ static void destroy_ep_files (struct dev_data *dev) | |||
1575 | { | 1575 | { |
1576 | struct list_head *entry, *tmp; | 1576 | struct list_head *entry, *tmp; |
1577 | 1577 | ||
1578 | DBG (dev, "%s %d\n", __FUNCTION__, dev->state); | 1578 | DBG (dev, "%s %d\n", __func__, dev->state); |
1579 | 1579 | ||
1580 | /* dev->state must prevent interference */ | 1580 | /* dev->state must prevent interference */ |
1581 | restart: | 1581 | restart: |
@@ -1662,7 +1662,7 @@ enomem1: | |||
1662 | put_dev (dev); | 1662 | put_dev (dev); |
1663 | kfree (data); | 1663 | kfree (data); |
1664 | enomem0: | 1664 | enomem0: |
1665 | DBG (dev, "%s enomem\n", __FUNCTION__); | 1665 | DBG (dev, "%s enomem\n", __func__); |
1666 | destroy_ep_files (dev); | 1666 | destroy_ep_files (dev); |
1667 | return -ENOMEM; | 1667 | return -ENOMEM; |
1668 | } | 1668 | } |
@@ -1672,7 +1672,7 @@ gadgetfs_unbind (struct usb_gadget *gadget) | |||
1672 | { | 1672 | { |
1673 | struct dev_data *dev = get_gadget_data (gadget); | 1673 | struct dev_data *dev = get_gadget_data (gadget); |
1674 | 1674 | ||
1675 | DBG (dev, "%s\n", __FUNCTION__); | 1675 | DBG (dev, "%s\n", __func__); |
1676 | 1676 | ||
1677 | spin_lock_irq (&dev->lock); | 1677 | spin_lock_irq (&dev->lock); |
1678 | dev->state = STATE_DEV_UNBOUND; | 1678 | dev->state = STATE_DEV_UNBOUND; |
@@ -1685,7 +1685,7 @@ gadgetfs_unbind (struct usb_gadget *gadget) | |||
1685 | /* we've already been disconnected ... no i/o is active */ | 1685 | /* we've already been disconnected ... no i/o is active */ |
1686 | if (dev->req) | 1686 | if (dev->req) |
1687 | usb_ep_free_request (gadget->ep0, dev->req); | 1687 | usb_ep_free_request (gadget->ep0, dev->req); |
1688 | DBG (dev, "%s done\n", __FUNCTION__); | 1688 | DBG (dev, "%s done\n", __func__); |
1689 | put_dev (dev); | 1689 | put_dev (dev); |
1690 | } | 1690 | } |
1691 | 1691 | ||
@@ -1933,7 +1933,7 @@ dev_config (struct file *fd, const char __user *buf, size_t len, loff_t *ptr) | |||
1933 | 1933 | ||
1934 | fail: | 1934 | fail: |
1935 | spin_unlock_irq (&dev->lock); | 1935 | spin_unlock_irq (&dev->lock); |
1936 | pr_debug ("%s: %s fail %Zd, %p\n", shortname, __FUNCTION__, value, dev); | 1936 | pr_debug ("%s: %s fail %Zd, %p\n", shortname, __func__, value, dev); |
1937 | kfree (dev->buf); | 1937 | kfree (dev->buf); |
1938 | dev->buf = NULL; | 1938 | dev->buf = NULL; |
1939 | return value; | 1939 | return value; |
diff --git a/drivers/usb/gadget/lh7a40x_udc.c b/drivers/usb/gadget/lh7a40x_udc.c index 078f72467671..825abd2621b3 100644 --- a/drivers/usb/gadget/lh7a40x_udc.c +++ b/drivers/usb/gadget/lh7a40x_udc.c | |||
@@ -253,7 +253,7 @@ udc_proc_read(char *page, char **start, off_t off, int count, | |||
253 | */ | 253 | */ |
254 | static void udc_disable(struct lh7a40x_udc *dev) | 254 | static void udc_disable(struct lh7a40x_udc *dev) |
255 | { | 255 | { |
256 | DEBUG("%s, %p\n", __FUNCTION__, dev); | 256 | DEBUG("%s, %p\n", __func__, dev); |
257 | 257 | ||
258 | udc_set_address(dev, 0); | 258 | udc_set_address(dev, 0); |
259 | 259 | ||
@@ -285,7 +285,7 @@ static void udc_reinit(struct lh7a40x_udc *dev) | |||
285 | { | 285 | { |
286 | u32 i; | 286 | u32 i; |
287 | 287 | ||
288 | DEBUG("%s, %p\n", __FUNCTION__, dev); | 288 | DEBUG("%s, %p\n", __func__, dev); |
289 | 289 | ||
290 | /* device/ep0 records init */ | 290 | /* device/ep0 records init */ |
291 | INIT_LIST_HEAD(&dev->gadget.ep_list); | 291 | INIT_LIST_HEAD(&dev->gadget.ep_list); |
@@ -318,7 +318,7 @@ static void udc_enable(struct lh7a40x_udc *dev) | |||
318 | { | 318 | { |
319 | int ep; | 319 | int ep; |
320 | 320 | ||
321 | DEBUG("%s, %p\n", __FUNCTION__, dev); | 321 | DEBUG("%s, %p\n", __func__, dev); |
322 | 322 | ||
323 | dev->gadget.speed = USB_SPEED_UNKNOWN; | 323 | dev->gadget.speed = USB_SPEED_UNKNOWN; |
324 | 324 | ||
@@ -412,7 +412,7 @@ int usb_gadget_register_driver(struct usb_gadget_driver *driver) | |||
412 | struct lh7a40x_udc *dev = the_controller; | 412 | struct lh7a40x_udc *dev = the_controller; |
413 | int retval; | 413 | int retval; |
414 | 414 | ||
415 | DEBUG("%s: %s\n", __FUNCTION__, driver->driver.name); | 415 | DEBUG("%s: %s\n", __func__, driver->driver.name); |
416 | 416 | ||
417 | if (!driver | 417 | if (!driver |
418 | || driver->speed != USB_SPEED_FULL | 418 | || driver->speed != USB_SPEED_FULL |
@@ -521,7 +521,7 @@ static int write_fifo(struct lh7a40x_ep *ep, struct lh7a40x_request *req) | |||
521 | is_short = unlikely(max < ep_maxpacket(ep)); | 521 | is_short = unlikely(max < ep_maxpacket(ep)); |
522 | } | 522 | } |
523 | 523 | ||
524 | DEBUG("%s: wrote %s %d bytes%s%s %d left %p\n", __FUNCTION__, | 524 | DEBUG("%s: wrote %s %d bytes%s%s %d left %p\n", __func__, |
525 | ep->ep.name, count, | 525 | ep->ep.name, count, |
526 | is_last ? "/L" : "", is_short ? "/S" : "", | 526 | is_last ? "/L" : "", is_short ? "/S" : "", |
527 | req->req.length - req->req.actual, req); | 527 | req->req.length - req->req.actual, req); |
@@ -555,7 +555,7 @@ static int read_fifo(struct lh7a40x_ep *ep, struct lh7a40x_request *req) | |||
555 | /* make sure there's a packet in the FIFO. */ | 555 | /* make sure there's a packet in the FIFO. */ |
556 | csr = usb_read(ep->csr1); | 556 | csr = usb_read(ep->csr1); |
557 | if (!(csr & USB_OUT_CSR1_OUT_PKT_RDY)) { | 557 | if (!(csr & USB_OUT_CSR1_OUT_PKT_RDY)) { |
558 | DEBUG("%s: Packet NOT ready!\n", __FUNCTION__); | 558 | DEBUG("%s: Packet NOT ready!\n", __func__); |
559 | return -EINVAL; | 559 | return -EINVAL; |
560 | } | 560 | } |
561 | 561 | ||
@@ -614,7 +614,7 @@ static void done(struct lh7a40x_ep *ep, struct lh7a40x_request *req, int status) | |||
614 | unsigned int stopped = ep->stopped; | 614 | unsigned int stopped = ep->stopped; |
615 | u32 index; | 615 | u32 index; |
616 | 616 | ||
617 | DEBUG("%s, %p\n", __FUNCTION__, ep); | 617 | DEBUG("%s, %p\n", __func__, ep); |
618 | list_del_init(&req->queue); | 618 | list_del_init(&req->queue); |
619 | 619 | ||
620 | if (likely(req->req.status == -EINPROGRESS)) | 620 | if (likely(req->req.status == -EINPROGRESS)) |
@@ -644,7 +644,7 @@ static void done(struct lh7a40x_ep *ep, struct lh7a40x_request *req, int status) | |||
644 | /** Enable EP interrupt */ | 644 | /** Enable EP interrupt */ |
645 | static void pio_irq_enable(int ep) | 645 | static void pio_irq_enable(int ep) |
646 | { | 646 | { |
647 | DEBUG("%s: %d\n", __FUNCTION__, ep); | 647 | DEBUG("%s: %d\n", __func__, ep); |
648 | 648 | ||
649 | switch (ep) { | 649 | switch (ep) { |
650 | case 1: | 650 | case 1: |
@@ -665,7 +665,7 @@ static void pio_irq_enable(int ep) | |||
665 | /** Disable EP interrupt */ | 665 | /** Disable EP interrupt */ |
666 | static void pio_irq_disable(int ep) | 666 | static void pio_irq_disable(int ep) |
667 | { | 667 | { |
668 | DEBUG("%s: %d\n", __FUNCTION__, ep); | 668 | DEBUG("%s: %d\n", __func__, ep); |
669 | 669 | ||
670 | switch (ep) { | 670 | switch (ep) { |
671 | case 1: | 671 | case 1: |
@@ -690,7 +690,7 @@ void nuke(struct lh7a40x_ep *ep, int status) | |||
690 | { | 690 | { |
691 | struct lh7a40x_request *req; | 691 | struct lh7a40x_request *req; |
692 | 692 | ||
693 | DEBUG("%s, %p\n", __FUNCTION__, ep); | 693 | DEBUG("%s, %p\n", __func__, ep); |
694 | 694 | ||
695 | /* Flush FIFO */ | 695 | /* Flush FIFO */ |
696 | flush(ep); | 696 | flush(ep); |
@@ -734,7 +734,7 @@ static void flush_all(struct lh7a40x_udc *dev) | |||
734 | */ | 734 | */ |
735 | static void flush(struct lh7a40x_ep *ep) | 735 | static void flush(struct lh7a40x_ep *ep) |
736 | { | 736 | { |
737 | DEBUG("%s, %p\n", __FUNCTION__, ep); | 737 | DEBUG("%s, %p\n", __func__, ep); |
738 | 738 | ||
739 | switch (ep->ep_type) { | 739 | switch (ep->ep_type) { |
740 | case ep_control: | 740 | case ep_control: |
@@ -766,7 +766,7 @@ static void lh7a40x_in_epn(struct lh7a40x_udc *dev, u32 ep_idx, u32 intr) | |||
766 | usb_set_index(ep_idx); | 766 | usb_set_index(ep_idx); |
767 | 767 | ||
768 | csr = usb_read(ep->csr1); | 768 | csr = usb_read(ep->csr1); |
769 | DEBUG("%s: %d, csr %x\n", __FUNCTION__, ep_idx, csr); | 769 | DEBUG("%s: %d, csr %x\n", __func__, ep_idx, csr); |
770 | 770 | ||
771 | if (csr & USB_IN_CSR1_SENT_STALL) { | 771 | if (csr & USB_IN_CSR1_SENT_STALL) { |
772 | DEBUG("USB_IN_CSR1_SENT_STALL\n"); | 772 | DEBUG("USB_IN_CSR1_SENT_STALL\n"); |
@@ -776,7 +776,7 @@ static void lh7a40x_in_epn(struct lh7a40x_udc *dev, u32 ep_idx, u32 intr) | |||
776 | } | 776 | } |
777 | 777 | ||
778 | if (!ep->desc) { | 778 | if (!ep->desc) { |
779 | DEBUG("%s: NO EP DESC\n", __FUNCTION__); | 779 | DEBUG("%s: NO EP DESC\n", __func__); |
780 | return; | 780 | return; |
781 | } | 781 | } |
782 | 782 | ||
@@ -802,7 +802,7 @@ static void lh7a40x_out_epn(struct lh7a40x_udc *dev, u32 ep_idx, u32 intr) | |||
802 | struct lh7a40x_ep *ep = &dev->ep[ep_idx]; | 802 | struct lh7a40x_ep *ep = &dev->ep[ep_idx]; |
803 | struct lh7a40x_request *req; | 803 | struct lh7a40x_request *req; |
804 | 804 | ||
805 | DEBUG("%s: %d\n", __FUNCTION__, ep_idx); | 805 | DEBUG("%s: %d\n", __func__, ep_idx); |
806 | 806 | ||
807 | usb_set_index(ep_idx); | 807 | usb_set_index(ep_idx); |
808 | 808 | ||
@@ -814,11 +814,11 @@ static void lh7a40x_out_epn(struct lh7a40x_udc *dev, u32 ep_idx, u32 intr) | |||
814 | usb_read(ep-> | 814 | usb_read(ep-> |
815 | csr1)) & (USB_OUT_CSR1_OUT_PKT_RDY | | 815 | csr1)) & (USB_OUT_CSR1_OUT_PKT_RDY | |
816 | USB_OUT_CSR1_SENT_STALL)) { | 816 | USB_OUT_CSR1_SENT_STALL)) { |
817 | DEBUG("%s: %x\n", __FUNCTION__, csr); | 817 | DEBUG("%s: %x\n", __func__, csr); |
818 | 818 | ||
819 | if (csr & USB_OUT_CSR1_SENT_STALL) { | 819 | if (csr & USB_OUT_CSR1_SENT_STALL) { |
820 | DEBUG("%s: stall sent, flush fifo\n", | 820 | DEBUG("%s: stall sent, flush fifo\n", |
821 | __FUNCTION__); | 821 | __func__); |
822 | /* usb_set(USB_OUT_CSR1_FIFO_FLUSH, ep->csr1); */ | 822 | /* usb_set(USB_OUT_CSR1_FIFO_FLUSH, ep->csr1); */ |
823 | flush(ep); | 823 | flush(ep); |
824 | } else if (csr & USB_OUT_CSR1_OUT_PKT_RDY) { | 824 | } else if (csr & USB_OUT_CSR1_OUT_PKT_RDY) { |
@@ -832,7 +832,7 @@ static void lh7a40x_out_epn(struct lh7a40x_udc *dev, u32 ep_idx, u32 intr) | |||
832 | 832 | ||
833 | if (!req) { | 833 | if (!req) { |
834 | printk("%s: NULL REQ %d\n", | 834 | printk("%s: NULL REQ %d\n", |
835 | __FUNCTION__, ep_idx); | 835 | __func__, ep_idx); |
836 | flush(ep); | 836 | flush(ep); |
837 | break; | 837 | break; |
838 | } else { | 838 | } else { |
@@ -844,7 +844,7 @@ static void lh7a40x_out_epn(struct lh7a40x_udc *dev, u32 ep_idx, u32 intr) | |||
844 | 844 | ||
845 | } else { | 845 | } else { |
846 | /* Throw packet away.. */ | 846 | /* Throw packet away.. */ |
847 | printk("%s: No descriptor?!?\n", __FUNCTION__); | 847 | printk("%s: No descriptor?!?\n", __func__); |
848 | flush(ep); | 848 | flush(ep); |
849 | } | 849 | } |
850 | } | 850 | } |
@@ -886,7 +886,7 @@ static void lh7a40x_reset_intr(struct lh7a40x_udc *dev) | |||
886 | #if 0 /* def CONFIG_ARCH_LH7A404 */ | 886 | #if 0 /* def CONFIG_ARCH_LH7A404 */ |
887 | /* Does not work always... */ | 887 | /* Does not work always... */ |
888 | 888 | ||
889 | DEBUG("%s: %d\n", __FUNCTION__, dev->usb_address); | 889 | DEBUG("%s: %d\n", __func__, dev->usb_address); |
890 | 890 | ||
891 | if (!dev->usb_address) { | 891 | if (!dev->usb_address) { |
892 | /*usb_set(USB_RESET_IO, USB_RESET); | 892 | /*usb_set(USB_RESET_IO, USB_RESET); |
@@ -936,7 +936,7 @@ static irqreturn_t lh7a40x_udc_irq(int irq, void *_dev) | |||
936 | if (!intr_out && !intr_in && !intr_int) | 936 | if (!intr_out && !intr_in && !intr_int) |
937 | break; | 937 | break; |
938 | 938 | ||
939 | DEBUG("%s (on state %s)\n", __FUNCTION__, | 939 | DEBUG("%s (on state %s)\n", __func__, |
940 | state_names[dev->ep0state]); | 940 | state_names[dev->ep0state]); |
941 | DEBUG("intr_out = %x\n", intr_out); | 941 | DEBUG("intr_out = %x\n", intr_out); |
942 | DEBUG("intr_in = %x\n", intr_in); | 942 | DEBUG("intr_in = %x\n", intr_in); |
@@ -1016,14 +1016,14 @@ static int lh7a40x_ep_enable(struct usb_ep *_ep, | |||
1016 | struct lh7a40x_udc *dev; | 1016 | struct lh7a40x_udc *dev; |
1017 | unsigned long flags; | 1017 | unsigned long flags; |
1018 | 1018 | ||
1019 | DEBUG("%s, %p\n", __FUNCTION__, _ep); | 1019 | DEBUG("%s, %p\n", __func__, _ep); |
1020 | 1020 | ||
1021 | ep = container_of(_ep, struct lh7a40x_ep, ep); | 1021 | ep = container_of(_ep, struct lh7a40x_ep, ep); |
1022 | if (!_ep || !desc || ep->desc || _ep->name == ep0name | 1022 | if (!_ep || !desc || ep->desc || _ep->name == ep0name |
1023 | || desc->bDescriptorType != USB_DT_ENDPOINT | 1023 | || desc->bDescriptorType != USB_DT_ENDPOINT |
1024 | || ep->bEndpointAddress != desc->bEndpointAddress | 1024 | || ep->bEndpointAddress != desc->bEndpointAddress |
1025 | || ep_maxpacket(ep) < le16_to_cpu(desc->wMaxPacketSize)) { | 1025 | || ep_maxpacket(ep) < le16_to_cpu(desc->wMaxPacketSize)) { |
1026 | DEBUG("%s, bad ep or descriptor\n", __FUNCTION__); | 1026 | DEBUG("%s, bad ep or descriptor\n", __func__); |
1027 | return -EINVAL; | 1027 | return -EINVAL; |
1028 | } | 1028 | } |
1029 | 1029 | ||
@@ -1031,7 +1031,7 @@ static int lh7a40x_ep_enable(struct usb_ep *_ep, | |||
1031 | if (ep->bmAttributes != desc->bmAttributes | 1031 | if (ep->bmAttributes != desc->bmAttributes |
1032 | && ep->bmAttributes != USB_ENDPOINT_XFER_BULK | 1032 | && ep->bmAttributes != USB_ENDPOINT_XFER_BULK |
1033 | && desc->bmAttributes != USB_ENDPOINT_XFER_INT) { | 1033 | && desc->bmAttributes != USB_ENDPOINT_XFER_INT) { |
1034 | DEBUG("%s, %s type mismatch\n", __FUNCTION__, _ep->name); | 1034 | DEBUG("%s, %s type mismatch\n", __func__, _ep->name); |
1035 | return -EINVAL; | 1035 | return -EINVAL; |
1036 | } | 1036 | } |
1037 | 1037 | ||
@@ -1039,13 +1039,13 @@ static int lh7a40x_ep_enable(struct usb_ep *_ep, | |||
1039 | if ((desc->bmAttributes == USB_ENDPOINT_XFER_BULK | 1039 | if ((desc->bmAttributes == USB_ENDPOINT_XFER_BULK |
1040 | && le16_to_cpu(desc->wMaxPacketSize) != ep_maxpacket(ep)) | 1040 | && le16_to_cpu(desc->wMaxPacketSize) != ep_maxpacket(ep)) |
1041 | || !desc->wMaxPacketSize) { | 1041 | || !desc->wMaxPacketSize) { |
1042 | DEBUG("%s, bad %s maxpacket\n", __FUNCTION__, _ep->name); | 1042 | DEBUG("%s, bad %s maxpacket\n", __func__, _ep->name); |
1043 | return -ERANGE; | 1043 | return -ERANGE; |
1044 | } | 1044 | } |
1045 | 1045 | ||
1046 | dev = ep->dev; | 1046 | dev = ep->dev; |
1047 | if (!dev->driver || dev->gadget.speed == USB_SPEED_UNKNOWN) { | 1047 | if (!dev->driver || dev->gadget.speed == USB_SPEED_UNKNOWN) { |
1048 | DEBUG("%s, bogus device state\n", __FUNCTION__); | 1048 | DEBUG("%s, bogus device state\n", __func__); |
1049 | return -ESHUTDOWN; | 1049 | return -ESHUTDOWN; |
1050 | } | 1050 | } |
1051 | 1051 | ||
@@ -1061,7 +1061,7 @@ static int lh7a40x_ep_enable(struct usb_ep *_ep, | |||
1061 | /* Reset halt state (does flush) */ | 1061 | /* Reset halt state (does flush) */ |
1062 | lh7a40x_set_halt(_ep, 0); | 1062 | lh7a40x_set_halt(_ep, 0); |
1063 | 1063 | ||
1064 | DEBUG("%s: enabled %s\n", __FUNCTION__, _ep->name); | 1064 | DEBUG("%s: enabled %s\n", __func__, _ep->name); |
1065 | return 0; | 1065 | return 0; |
1066 | } | 1066 | } |
1067 | 1067 | ||
@@ -1073,11 +1073,11 @@ static int lh7a40x_ep_disable(struct usb_ep *_ep) | |||
1073 | struct lh7a40x_ep *ep; | 1073 | struct lh7a40x_ep *ep; |
1074 | unsigned long flags; | 1074 | unsigned long flags; |
1075 | 1075 | ||
1076 | DEBUG("%s, %p\n", __FUNCTION__, _ep); | 1076 | DEBUG("%s, %p\n", __func__, _ep); |
1077 | 1077 | ||
1078 | ep = container_of(_ep, struct lh7a40x_ep, ep); | 1078 | ep = container_of(_ep, struct lh7a40x_ep, ep); |
1079 | if (!_ep || !ep->desc) { | 1079 | if (!_ep || !ep->desc) { |
1080 | DEBUG("%s, %s not enabled\n", __FUNCTION__, | 1080 | DEBUG("%s, %s not enabled\n", __func__, |
1081 | _ep ? ep->ep.name : NULL); | 1081 | _ep ? ep->ep.name : NULL); |
1082 | return -EINVAL; | 1082 | return -EINVAL; |
1083 | } | 1083 | } |
@@ -1097,7 +1097,7 @@ static int lh7a40x_ep_disable(struct usb_ep *_ep) | |||
1097 | 1097 | ||
1098 | spin_unlock_irqrestore(&ep->dev->lock, flags); | 1098 | spin_unlock_irqrestore(&ep->dev->lock, flags); |
1099 | 1099 | ||
1100 | DEBUG("%s: disabled %s\n", __FUNCTION__, _ep->name); | 1100 | DEBUG("%s: disabled %s\n", __func__, _ep->name); |
1101 | return 0; | 1101 | return 0; |
1102 | } | 1102 | } |
1103 | 1103 | ||
@@ -1106,7 +1106,7 @@ static struct usb_request *lh7a40x_alloc_request(struct usb_ep *ep, | |||
1106 | { | 1106 | { |
1107 | struct lh7a40x_request *req; | 1107 | struct lh7a40x_request *req; |
1108 | 1108 | ||
1109 | DEBUG("%s, %p\n", __FUNCTION__, ep); | 1109 | DEBUG("%s, %p\n", __func__, ep); |
1110 | 1110 | ||
1111 | req = kzalloc(sizeof(*req), gfp_flags); | 1111 | req = kzalloc(sizeof(*req), gfp_flags); |
1112 | if (!req) | 1112 | if (!req) |
@@ -1121,7 +1121,7 @@ static void lh7a40x_free_request(struct usb_ep *ep, struct usb_request *_req) | |||
1121 | { | 1121 | { |
1122 | struct lh7a40x_request *req; | 1122 | struct lh7a40x_request *req; |
1123 | 1123 | ||
1124 | DEBUG("%s, %p\n", __FUNCTION__, ep); | 1124 | DEBUG("%s, %p\n", __func__, ep); |
1125 | 1125 | ||
1126 | req = container_of(_req, struct lh7a40x_request, req); | 1126 | req = container_of(_req, struct lh7a40x_request, req); |
1127 | WARN_ON(!list_empty(&req->queue)); | 1127 | WARN_ON(!list_empty(&req->queue)); |
@@ -1140,25 +1140,25 @@ static int lh7a40x_queue(struct usb_ep *_ep, struct usb_request *_req, | |||
1140 | struct lh7a40x_udc *dev; | 1140 | struct lh7a40x_udc *dev; |
1141 | unsigned long flags; | 1141 | unsigned long flags; |
1142 | 1142 | ||
1143 | DEBUG("\n\n\n%s, %p\n", __FUNCTION__, _ep); | 1143 | DEBUG("\n\n\n%s, %p\n", __func__, _ep); |
1144 | 1144 | ||
1145 | req = container_of(_req, struct lh7a40x_request, req); | 1145 | req = container_of(_req, struct lh7a40x_request, req); |
1146 | if (unlikely | 1146 | if (unlikely |
1147 | (!_req || !_req->complete || !_req->buf | 1147 | (!_req || !_req->complete || !_req->buf |
1148 | || !list_empty(&req->queue))) { | 1148 | || !list_empty(&req->queue))) { |
1149 | DEBUG("%s, bad params\n", __FUNCTION__); | 1149 | DEBUG("%s, bad params\n", __func__); |
1150 | return -EINVAL; | 1150 | return -EINVAL; |
1151 | } | 1151 | } |
1152 | 1152 | ||
1153 | ep = container_of(_ep, struct lh7a40x_ep, ep); | 1153 | ep = container_of(_ep, struct lh7a40x_ep, ep); |
1154 | if (unlikely(!_ep || (!ep->desc && ep->ep.name != ep0name))) { | 1154 | if (unlikely(!_ep || (!ep->desc && ep->ep.name != ep0name))) { |
1155 | DEBUG("%s, bad ep\n", __FUNCTION__); | 1155 | DEBUG("%s, bad ep\n", __func__); |
1156 | return -EINVAL; | 1156 | return -EINVAL; |
1157 | } | 1157 | } |
1158 | 1158 | ||
1159 | dev = ep->dev; | 1159 | dev = ep->dev; |
1160 | if (unlikely(!dev->driver || dev->gadget.speed == USB_SPEED_UNKNOWN)) { | 1160 | if (unlikely(!dev->driver || dev->gadget.speed == USB_SPEED_UNKNOWN)) { |
1161 | DEBUG("%s, bogus device state %p\n", __FUNCTION__, dev->driver); | 1161 | DEBUG("%s, bogus device state %p\n", __func__, dev->driver); |
1162 | return -ESHUTDOWN; | 1162 | return -ESHUTDOWN; |
1163 | } | 1163 | } |
1164 | 1164 | ||
@@ -1218,7 +1218,7 @@ static int lh7a40x_dequeue(struct usb_ep *_ep, struct usb_request *_req) | |||
1218 | struct lh7a40x_request *req; | 1218 | struct lh7a40x_request *req; |
1219 | unsigned long flags; | 1219 | unsigned long flags; |
1220 | 1220 | ||
1221 | DEBUG("%s, %p\n", __FUNCTION__, _ep); | 1221 | DEBUG("%s, %p\n", __func__, _ep); |
1222 | 1222 | ||
1223 | ep = container_of(_ep, struct lh7a40x_ep, ep); | 1223 | ep = container_of(_ep, struct lh7a40x_ep, ep); |
1224 | if (!_ep || ep->ep.name == ep0name) | 1224 | if (!_ep || ep->ep.name == ep0name) |
@@ -1253,13 +1253,13 @@ static int lh7a40x_set_halt(struct usb_ep *_ep, int value) | |||
1253 | 1253 | ||
1254 | ep = container_of(_ep, struct lh7a40x_ep, ep); | 1254 | ep = container_of(_ep, struct lh7a40x_ep, ep); |
1255 | if (unlikely(!_ep || (!ep->desc && ep->ep.name != ep0name))) { | 1255 | if (unlikely(!_ep || (!ep->desc && ep->ep.name != ep0name))) { |
1256 | DEBUG("%s, bad ep\n", __FUNCTION__); | 1256 | DEBUG("%s, bad ep\n", __func__); |
1257 | return -EINVAL; | 1257 | return -EINVAL; |
1258 | } | 1258 | } |
1259 | 1259 | ||
1260 | usb_set_index(ep_index(ep)); | 1260 | usb_set_index(ep_index(ep)); |
1261 | 1261 | ||
1262 | DEBUG("%s, ep %d, val %d\n", __FUNCTION__, ep_index(ep), value); | 1262 | DEBUG("%s, ep %d, val %d\n", __func__, ep_index(ep), value); |
1263 | 1263 | ||
1264 | spin_lock_irqsave(&ep->dev->lock, flags); | 1264 | spin_lock_irqsave(&ep->dev->lock, flags); |
1265 | 1265 | ||
@@ -1325,11 +1325,11 @@ static int lh7a40x_fifo_status(struct usb_ep *_ep) | |||
1325 | 1325 | ||
1326 | ep = container_of(_ep, struct lh7a40x_ep, ep); | 1326 | ep = container_of(_ep, struct lh7a40x_ep, ep); |
1327 | if (!_ep) { | 1327 | if (!_ep) { |
1328 | DEBUG("%s, bad ep\n", __FUNCTION__); | 1328 | DEBUG("%s, bad ep\n", __func__); |
1329 | return -ENODEV; | 1329 | return -ENODEV; |
1330 | } | 1330 | } |
1331 | 1331 | ||
1332 | DEBUG("%s, %d\n", __FUNCTION__, ep_index(ep)); | 1332 | DEBUG("%s, %d\n", __func__, ep_index(ep)); |
1333 | 1333 | ||
1334 | /* LPD can't report unclaimed bytes from IN fifos */ | 1334 | /* LPD can't report unclaimed bytes from IN fifos */ |
1335 | if (ep_is_in(ep)) | 1335 | if (ep_is_in(ep)) |
@@ -1355,7 +1355,7 @@ static void lh7a40x_fifo_flush(struct usb_ep *_ep) | |||
1355 | 1355 | ||
1356 | ep = container_of(_ep, struct lh7a40x_ep, ep); | 1356 | ep = container_of(_ep, struct lh7a40x_ep, ep); |
1357 | if (unlikely(!_ep || (!ep->desc && ep->ep.name != ep0name))) { | 1357 | if (unlikely(!_ep || (!ep->desc && ep->ep.name != ep0name))) { |
1358 | DEBUG("%s, bad ep\n", __FUNCTION__); | 1358 | DEBUG("%s, bad ep\n", __func__); |
1359 | return; | 1359 | return; |
1360 | } | 1360 | } |
1361 | 1361 | ||
@@ -1376,7 +1376,7 @@ static int write_fifo_ep0(struct lh7a40x_ep *ep, struct lh7a40x_request *req) | |||
1376 | 1376 | ||
1377 | max = ep_maxpacket(ep); | 1377 | max = ep_maxpacket(ep); |
1378 | 1378 | ||
1379 | DEBUG_EP0("%s\n", __FUNCTION__); | 1379 | DEBUG_EP0("%s\n", __func__); |
1380 | 1380 | ||
1381 | count = write_packet(ep, req, max); | 1381 | count = write_packet(ep, req, max); |
1382 | 1382 | ||
@@ -1390,7 +1390,7 @@ static int write_fifo_ep0(struct lh7a40x_ep *ep, struct lh7a40x_request *req) | |||
1390 | is_last = 1; | 1390 | is_last = 1; |
1391 | } | 1391 | } |
1392 | 1392 | ||
1393 | DEBUG_EP0("%s: wrote %s %d bytes%s %d left %p\n", __FUNCTION__, | 1393 | DEBUG_EP0("%s: wrote %s %d bytes%s %d left %p\n", __func__, |
1394 | ep->ep.name, count, | 1394 | ep->ep.name, count, |
1395 | is_last ? "/L" : "", req->req.length - req->req.actual, req); | 1395 | is_last ? "/L" : "", req->req.length - req->req.actual, req); |
1396 | 1396 | ||
@@ -1434,7 +1434,7 @@ static int read_fifo_ep0(struct lh7a40x_ep *ep, struct lh7a40x_request *req) | |||
1434 | unsigned bufferspace, count, is_short; | 1434 | unsigned bufferspace, count, is_short; |
1435 | volatile u32 *fifo = (volatile u32 *)ep->fifo; | 1435 | volatile u32 *fifo = (volatile u32 *)ep->fifo; |
1436 | 1436 | ||
1437 | DEBUG_EP0("%s\n", __FUNCTION__); | 1437 | DEBUG_EP0("%s\n", __func__); |
1438 | 1438 | ||
1439 | csr = usb_read(USB_EP0_CSR); | 1439 | csr = usb_read(USB_EP0_CSR); |
1440 | if (!(csr & USB_OUT_CSR1_OUT_PKT_RDY)) | 1440 | if (!(csr & USB_OUT_CSR1_OUT_PKT_RDY)) |
@@ -1492,7 +1492,7 @@ static int read_fifo_ep0(struct lh7a40x_ep *ep, struct lh7a40x_request *req) | |||
1492 | */ | 1492 | */ |
1493 | static void udc_set_address(struct lh7a40x_udc *dev, unsigned char address) | 1493 | static void udc_set_address(struct lh7a40x_udc *dev, unsigned char address) |
1494 | { | 1494 | { |
1495 | DEBUG_EP0("%s: %d\n", __FUNCTION__, address); | 1495 | DEBUG_EP0("%s: %d\n", __func__, address); |
1496 | /* c.f. 15.1.2.2 Table 15-4 address will be used after DATA_END is set */ | 1496 | /* c.f. 15.1.2.2 Table 15-4 address will be used after DATA_END is set */ |
1497 | dev->usb_address = address; | 1497 | dev->usb_address = address; |
1498 | usb_set((address & USB_FA_FUNCTION_ADDR), USB_FA); | 1498 | usb_set((address & USB_FA_FUNCTION_ADDR), USB_FA); |
@@ -1514,7 +1514,7 @@ static void lh7a40x_ep0_out(struct lh7a40x_udc *dev, u32 csr) | |||
1514 | struct lh7a40x_ep *ep = &dev->ep[0]; | 1514 | struct lh7a40x_ep *ep = &dev->ep[0]; |
1515 | int ret; | 1515 | int ret; |
1516 | 1516 | ||
1517 | DEBUG_EP0("%s: %x\n", __FUNCTION__, csr); | 1517 | DEBUG_EP0("%s: %x\n", __func__, csr); |
1518 | 1518 | ||
1519 | if (list_empty(&ep->queue)) | 1519 | if (list_empty(&ep->queue)) |
1520 | req = 0; | 1520 | req = 0; |
@@ -1533,13 +1533,13 @@ static void lh7a40x_ep0_out(struct lh7a40x_udc *dev, u32 csr) | |||
1533 | if (ret) { | 1533 | if (ret) { |
1534 | /* Done! */ | 1534 | /* Done! */ |
1535 | DEBUG_EP0("%s: finished, waiting for status\n", | 1535 | DEBUG_EP0("%s: finished, waiting for status\n", |
1536 | __FUNCTION__); | 1536 | __func__); |
1537 | 1537 | ||
1538 | usb_set((EP0_CLR_OUT | EP0_DATA_END), USB_EP0_CSR); | 1538 | usb_set((EP0_CLR_OUT | EP0_DATA_END), USB_EP0_CSR); |
1539 | dev->ep0state = WAIT_FOR_SETUP; | 1539 | dev->ep0state = WAIT_FOR_SETUP; |
1540 | } else { | 1540 | } else { |
1541 | /* Not done yet.. */ | 1541 | /* Not done yet.. */ |
1542 | DEBUG_EP0("%s: not finished\n", __FUNCTION__); | 1542 | DEBUG_EP0("%s: not finished\n", __func__); |
1543 | usb_set(EP0_CLR_OUT, USB_EP0_CSR); | 1543 | usb_set(EP0_CLR_OUT, USB_EP0_CSR); |
1544 | } | 1544 | } |
1545 | } else { | 1545 | } else { |
@@ -1556,7 +1556,7 @@ static int lh7a40x_ep0_in(struct lh7a40x_udc *dev, u32 csr) | |||
1556 | struct lh7a40x_ep *ep = &dev->ep[0]; | 1556 | struct lh7a40x_ep *ep = &dev->ep[0]; |
1557 | int ret, need_zlp = 0; | 1557 | int ret, need_zlp = 0; |
1558 | 1558 | ||
1559 | DEBUG_EP0("%s: %x\n", __FUNCTION__, csr); | 1559 | DEBUG_EP0("%s: %x\n", __func__, csr); |
1560 | 1560 | ||
1561 | if (list_empty(&ep->queue)) | 1561 | if (list_empty(&ep->queue)) |
1562 | req = 0; | 1562 | req = 0; |
@@ -1564,7 +1564,7 @@ static int lh7a40x_ep0_in(struct lh7a40x_udc *dev, u32 csr) | |||
1564 | req = list_entry(ep->queue.next, struct lh7a40x_request, queue); | 1564 | req = list_entry(ep->queue.next, struct lh7a40x_request, queue); |
1565 | 1565 | ||
1566 | if (!req) { | 1566 | if (!req) { |
1567 | DEBUG_EP0("%s: NULL REQ\n", __FUNCTION__); | 1567 | DEBUG_EP0("%s: NULL REQ\n", __func__); |
1568 | return 0; | 1568 | return 0; |
1569 | } | 1569 | } |
1570 | 1570 | ||
@@ -1585,17 +1585,17 @@ static int lh7a40x_ep0_in(struct lh7a40x_udc *dev, u32 csr) | |||
1585 | 1585 | ||
1586 | if (ret == 1 && !need_zlp) { | 1586 | if (ret == 1 && !need_zlp) { |
1587 | /* Last packet */ | 1587 | /* Last packet */ |
1588 | DEBUG_EP0("%s: finished, waiting for status\n", __FUNCTION__); | 1588 | DEBUG_EP0("%s: finished, waiting for status\n", __func__); |
1589 | 1589 | ||
1590 | usb_set((EP0_IN_PKT_RDY | EP0_DATA_END), USB_EP0_CSR); | 1590 | usb_set((EP0_IN_PKT_RDY | EP0_DATA_END), USB_EP0_CSR); |
1591 | dev->ep0state = WAIT_FOR_SETUP; | 1591 | dev->ep0state = WAIT_FOR_SETUP; |
1592 | } else { | 1592 | } else { |
1593 | DEBUG_EP0("%s: not finished\n", __FUNCTION__); | 1593 | DEBUG_EP0("%s: not finished\n", __func__); |
1594 | usb_set(EP0_IN_PKT_RDY, USB_EP0_CSR); | 1594 | usb_set(EP0_IN_PKT_RDY, USB_EP0_CSR); |
1595 | } | 1595 | } |
1596 | 1596 | ||
1597 | if (need_zlp) { | 1597 | if (need_zlp) { |
1598 | DEBUG_EP0("%s: Need ZLP!\n", __FUNCTION__); | 1598 | DEBUG_EP0("%s: Need ZLP!\n", __func__); |
1599 | usb_set(EP0_IN_PKT_RDY, USB_EP0_CSR); | 1599 | usb_set(EP0_IN_PKT_RDY, USB_EP0_CSR); |
1600 | dev->ep0state = DATA_STATE_NEED_ZLP; | 1600 | dev->ep0state = DATA_STATE_NEED_ZLP; |
1601 | } | 1601 | } |
@@ -1694,7 +1694,7 @@ static void lh7a40x_ep0_setup(struct lh7a40x_udc *dev, u32 csr) | |||
1694 | struct usb_ctrlrequest ctrl; | 1694 | struct usb_ctrlrequest ctrl; |
1695 | int i, bytes, is_in; | 1695 | int i, bytes, is_in; |
1696 | 1696 | ||
1697 | DEBUG_SETUP("%s: %x\n", __FUNCTION__, csr); | 1697 | DEBUG_SETUP("%s: %x\n", __func__, csr); |
1698 | 1698 | ||
1699 | /* Nuke all previous transfers */ | 1699 | /* Nuke all previous transfers */ |
1700 | nuke(ep, -EPROTO); | 1700 | nuke(ep, -EPROTO); |
@@ -1799,7 +1799,7 @@ static void lh7a40x_ep0_setup(struct lh7a40x_udc *dev, u32 csr) | |||
1799 | */ | 1799 | */ |
1800 | static void lh7a40x_ep0_in_zlp(struct lh7a40x_udc *dev, u32 csr) | 1800 | static void lh7a40x_ep0_in_zlp(struct lh7a40x_udc *dev, u32 csr) |
1801 | { | 1801 | { |
1802 | DEBUG_EP0("%s: %x\n", __FUNCTION__, csr); | 1802 | DEBUG_EP0("%s: %x\n", __func__, csr); |
1803 | 1803 | ||
1804 | /* c.f. Table 15-14 */ | 1804 | /* c.f. Table 15-14 */ |
1805 | usb_set((EP0_IN_PKT_RDY | EP0_DATA_END), USB_EP0_CSR); | 1805 | usb_set((EP0_IN_PKT_RDY | EP0_DATA_END), USB_EP0_CSR); |
@@ -1818,7 +1818,7 @@ static void lh7a40x_handle_ep0(struct lh7a40x_udc *dev, u32 intr) | |||
1818 | usb_set_index(0); | 1818 | usb_set_index(0); |
1819 | csr = usb_read(USB_EP0_CSR); | 1819 | csr = usb_read(USB_EP0_CSR); |
1820 | 1820 | ||
1821 | DEBUG_EP0("%s: csr = %x\n", __FUNCTION__, csr); | 1821 | DEBUG_EP0("%s: csr = %x\n", __func__, csr); |
1822 | 1822 | ||
1823 | /* | 1823 | /* |
1824 | * For overview of what we should be doing see c.f. Chapter 18.1.2.4 | 1824 | * For overview of what we should be doing see c.f. Chapter 18.1.2.4 |
@@ -1832,7 +1832,7 @@ static void lh7a40x_handle_ep0(struct lh7a40x_udc *dev, u32 intr) | |||
1832 | * - clear the SENT_STALL bit | 1832 | * - clear the SENT_STALL bit |
1833 | */ | 1833 | */ |
1834 | if (csr & EP0_SENT_STALL) { | 1834 | if (csr & EP0_SENT_STALL) { |
1835 | DEBUG_EP0("%s: EP0_SENT_STALL is set: %x\n", __FUNCTION__, csr); | 1835 | DEBUG_EP0("%s: EP0_SENT_STALL is set: %x\n", __func__, csr); |
1836 | usb_clear((EP0_SENT_STALL | EP0_SEND_STALL), USB_EP0_CSR); | 1836 | usb_clear((EP0_SENT_STALL | EP0_SEND_STALL), USB_EP0_CSR); |
1837 | nuke(ep, -ECONNABORTED); | 1837 | nuke(ep, -ECONNABORTED); |
1838 | dev->ep0state = WAIT_FOR_SETUP; | 1838 | dev->ep0state = WAIT_FOR_SETUP; |
@@ -1849,7 +1849,7 @@ static void lh7a40x_handle_ep0(struct lh7a40x_udc *dev, u32 intr) | |||
1849 | */ | 1849 | */ |
1850 | if (!(csr & (EP0_IN_PKT_RDY | EP0_OUT_PKT_RDY))) { | 1850 | if (!(csr & (EP0_IN_PKT_RDY | EP0_OUT_PKT_RDY))) { |
1851 | DEBUG_EP0("%s: IN_PKT_RDY and OUT_PKT_RDY are clear\n", | 1851 | DEBUG_EP0("%s: IN_PKT_RDY and OUT_PKT_RDY are clear\n", |
1852 | __FUNCTION__); | 1852 | __func__); |
1853 | 1853 | ||
1854 | switch (dev->ep0state) { | 1854 | switch (dev->ep0state) { |
1855 | case DATA_STATE_XMIT: | 1855 | case DATA_STATE_XMIT: |
@@ -1877,7 +1877,7 @@ static void lh7a40x_handle_ep0(struct lh7a40x_udc *dev, u32 intr) | |||
1877 | * - set SERVICED_SETUP_END_BIT | 1877 | * - set SERVICED_SETUP_END_BIT |
1878 | */ | 1878 | */ |
1879 | if (csr & EP0_SETUP_END) { | 1879 | if (csr & EP0_SETUP_END) { |
1880 | DEBUG_EP0("%s: EP0_SETUP_END is set: %x\n", __FUNCTION__, csr); | 1880 | DEBUG_EP0("%s: EP0_SETUP_END is set: %x\n", __func__, csr); |
1881 | 1881 | ||
1882 | usb_set(EP0_CLR_SETUP_END, USB_EP0_CSR); | 1882 | usb_set(EP0_CLR_SETUP_END, USB_EP0_CSR); |
1883 | 1883 | ||
@@ -1896,7 +1896,7 @@ static void lh7a40x_handle_ep0(struct lh7a40x_udc *dev, u32 intr) | |||
1896 | */ | 1896 | */ |
1897 | if (csr & EP0_OUT_PKT_RDY) { | 1897 | if (csr & EP0_OUT_PKT_RDY) { |
1898 | 1898 | ||
1899 | DEBUG_EP0("%s: EP0_OUT_PKT_RDY is set: %x\n", __FUNCTION__, | 1899 | DEBUG_EP0("%s: EP0_OUT_PKT_RDY is set: %x\n", __func__, |
1900 | csr); | 1900 | csr); |
1901 | 1901 | ||
1902 | switch (dev->ep0state) { | 1902 | switch (dev->ep0state) { |
@@ -1926,7 +1926,7 @@ static void lh7a40x_ep0_kick(struct lh7a40x_udc *dev, struct lh7a40x_ep *ep) | |||
1926 | usb_set_index(0); | 1926 | usb_set_index(0); |
1927 | csr = usb_read(USB_EP0_CSR); | 1927 | csr = usb_read(USB_EP0_CSR); |
1928 | 1928 | ||
1929 | DEBUG_EP0("%s: %x\n", __FUNCTION__, csr); | 1929 | DEBUG_EP0("%s: %x\n", __func__, csr); |
1930 | 1930 | ||
1931 | /* Clear "out packet ready" */ | 1931 | /* Clear "out packet ready" */ |
1932 | usb_set(EP0_CLR_OUT, USB_EP0_CSR); | 1932 | usb_set(EP0_CLR_OUT, USB_EP0_CSR); |
@@ -1949,7 +1949,7 @@ static int lh7a40x_udc_get_frame(struct usb_gadget *_gadget) | |||
1949 | { | 1949 | { |
1950 | u32 frame1 = usb_read(USB_FRM_NUM1); /* Least significant 8 bits */ | 1950 | u32 frame1 = usb_read(USB_FRM_NUM1); /* Least significant 8 bits */ |
1951 | u32 frame2 = usb_read(USB_FRM_NUM2); /* Most significant 3 bits */ | 1951 | u32 frame2 = usb_read(USB_FRM_NUM2); /* Most significant 3 bits */ |
1952 | DEBUG("%s, %p\n", __FUNCTION__, _gadget); | 1952 | DEBUG("%s, %p\n", __func__, _gadget); |
1953 | return ((frame2 & 0x07) << 8) | (frame1 & 0xff); | 1953 | return ((frame2 & 0x07) << 8) | (frame1 & 0xff); |
1954 | } | 1954 | } |
1955 | 1955 | ||
@@ -1970,7 +1970,7 @@ static const struct usb_gadget_ops lh7a40x_udc_ops = { | |||
1970 | 1970 | ||
1971 | static void nop_release(struct device *dev) | 1971 | static void nop_release(struct device *dev) |
1972 | { | 1972 | { |
1973 | DEBUG("%s %s\n", __FUNCTION__, dev->bus_id); | 1973 | DEBUG("%s %s\n", __func__, dev->bus_id); |
1974 | } | 1974 | } |
1975 | 1975 | ||
1976 | static struct lh7a40x_udc memory = { | 1976 | static struct lh7a40x_udc memory = { |
@@ -2065,7 +2065,7 @@ static int lh7a40x_udc_probe(struct platform_device *pdev) | |||
2065 | struct lh7a40x_udc *dev = &memory; | 2065 | struct lh7a40x_udc *dev = &memory; |
2066 | int retval; | 2066 | int retval; |
2067 | 2067 | ||
2068 | DEBUG("%s: %p\n", __FUNCTION__, pdev); | 2068 | DEBUG("%s: %p\n", __func__, pdev); |
2069 | 2069 | ||
2070 | spin_lock_init(&dev->lock); | 2070 | spin_lock_init(&dev->lock); |
2071 | dev->dev = &pdev->dev; | 2071 | dev->dev = &pdev->dev; |
@@ -2098,7 +2098,7 @@ static int lh7a40x_udc_remove(struct platform_device *pdev) | |||
2098 | { | 2098 | { |
2099 | struct lh7a40x_udc *dev = platform_get_drvdata(pdev); | 2099 | struct lh7a40x_udc *dev = platform_get_drvdata(pdev); |
2100 | 2100 | ||
2101 | DEBUG("%s: %p\n", __FUNCTION__, pdev); | 2101 | DEBUG("%s: %p\n", __func__, pdev); |
2102 | 2102 | ||
2103 | if (dev->driver) | 2103 | if (dev->driver) |
2104 | return -EBUSY; | 2104 | return -EBUSY; |
@@ -2131,7 +2131,7 @@ static struct platform_driver udc_driver = { | |||
2131 | 2131 | ||
2132 | static int __init udc_init(void) | 2132 | static int __init udc_init(void) |
2133 | { | 2133 | { |
2134 | DEBUG("%s: %s version %s\n", __FUNCTION__, driver_name, DRIVER_VERSION); | 2134 | DEBUG("%s: %s version %s\n", __func__, driver_name, DRIVER_VERSION); |
2135 | return platform_driver_register(&udc_driver); | 2135 | return platform_driver_register(&udc_driver); |
2136 | } | 2136 | } |
2137 | 2137 | ||
diff --git a/drivers/usb/gadget/net2280.h b/drivers/usb/gadget/net2280.h index 44ca139983d8..1f2af398a9a4 100644 --- a/drivers/usb/gadget/net2280.h +++ b/drivers/usb/gadget/net2280.h | |||
@@ -299,7 +299,7 @@ static inline void assert_out_naking (struct net2280_ep *ep, const char *where) | |||
299 | &ep->regs->ep_rsp); | 299 | &ep->regs->ep_rsp); |
300 | } | 300 | } |
301 | } | 301 | } |
302 | #define ASSERT_OUT_NAKING(ep) assert_out_naking(ep,__FUNCTION__) | 302 | #define ASSERT_OUT_NAKING(ep) assert_out_naking(ep,__func__) |
303 | #else | 303 | #else |
304 | #define ASSERT_OUT_NAKING(ep) do {} while (0) | 304 | #define ASSERT_OUT_NAKING(ep) do {} while (0) |
305 | #endif | 305 | #endif |
diff --git a/drivers/usb/gadget/omap_udc.c b/drivers/usb/gadget/omap_udc.c index 56277d24f041..95f7662376f1 100644 --- a/drivers/usb/gadget/omap_udc.c +++ b/drivers/usb/gadget/omap_udc.c | |||
@@ -163,7 +163,7 @@ static int omap_ep_enable(struct usb_ep *_ep, | |||
163 | || ep->bEndpointAddress != desc->bEndpointAddress | 163 | || ep->bEndpointAddress != desc->bEndpointAddress |
164 | || ep->maxpacket < le16_to_cpu | 164 | || ep->maxpacket < le16_to_cpu |
165 | (desc->wMaxPacketSize)) { | 165 | (desc->wMaxPacketSize)) { |
166 | DBG("%s, bad ep or descriptor\n", __FUNCTION__); | 166 | DBG("%s, bad ep or descriptor\n", __func__); |
167 | return -EINVAL; | 167 | return -EINVAL; |
168 | } | 168 | } |
169 | maxp = le16_to_cpu (desc->wMaxPacketSize); | 169 | maxp = le16_to_cpu (desc->wMaxPacketSize); |
@@ -171,7 +171,7 @@ static int omap_ep_enable(struct usb_ep *_ep, | |||
171 | && maxp != ep->maxpacket) | 171 | && maxp != ep->maxpacket) |
172 | || le16_to_cpu(desc->wMaxPacketSize) > ep->maxpacket | 172 | || le16_to_cpu(desc->wMaxPacketSize) > ep->maxpacket |
173 | || !desc->wMaxPacketSize) { | 173 | || !desc->wMaxPacketSize) { |
174 | DBG("%s, bad %s maxpacket\n", __FUNCTION__, _ep->name); | 174 | DBG("%s, bad %s maxpacket\n", __func__, _ep->name); |
175 | return -ERANGE; | 175 | return -ERANGE; |
176 | } | 176 | } |
177 | 177 | ||
@@ -194,13 +194,13 @@ static int omap_ep_enable(struct usb_ep *_ep, | |||
194 | if (ep->bmAttributes != desc->bmAttributes | 194 | if (ep->bmAttributes != desc->bmAttributes |
195 | && ep->bmAttributes != USB_ENDPOINT_XFER_BULK | 195 | && ep->bmAttributes != USB_ENDPOINT_XFER_BULK |
196 | && desc->bmAttributes != USB_ENDPOINT_XFER_INT) { | 196 | && desc->bmAttributes != USB_ENDPOINT_XFER_INT) { |
197 | DBG("%s, %s type mismatch\n", __FUNCTION__, _ep->name); | 197 | DBG("%s, %s type mismatch\n", __func__, _ep->name); |
198 | return -EINVAL; | 198 | return -EINVAL; |
199 | } | 199 | } |
200 | 200 | ||
201 | udc = ep->udc; | 201 | udc = ep->udc; |
202 | if (!udc->driver || udc->gadget.speed == USB_SPEED_UNKNOWN) { | 202 | if (!udc->driver || udc->gadget.speed == USB_SPEED_UNKNOWN) { |
203 | DBG("%s, bogus device state\n", __FUNCTION__); | 203 | DBG("%s, bogus device state\n", __func__); |
204 | return -ESHUTDOWN; | 204 | return -ESHUTDOWN; |
205 | } | 205 | } |
206 | 206 | ||
@@ -249,7 +249,7 @@ static int omap_ep_disable(struct usb_ep *_ep) | |||
249 | unsigned long flags; | 249 | unsigned long flags; |
250 | 250 | ||
251 | if (!_ep || !ep->desc) { | 251 | if (!_ep || !ep->desc) { |
252 | DBG("%s, %s not enabled\n", __FUNCTION__, | 252 | DBG("%s, %s not enabled\n", __func__, |
253 | _ep ? ep->ep.name : NULL); | 253 | _ep ? ep->ep.name : NULL); |
254 | return -EINVAL; | 254 | return -EINVAL; |
255 | } | 255 | } |
@@ -936,11 +936,11 @@ omap_ep_queue(struct usb_ep *_ep, struct usb_request *_req, gfp_t gfp_flags) | |||
936 | /* catch various bogus parameters */ | 936 | /* catch various bogus parameters */ |
937 | if (!_req || !req->req.complete || !req->req.buf | 937 | if (!_req || !req->req.complete || !req->req.buf |
938 | || !list_empty(&req->queue)) { | 938 | || !list_empty(&req->queue)) { |
939 | DBG("%s, bad params\n", __FUNCTION__); | 939 | DBG("%s, bad params\n", __func__); |
940 | return -EINVAL; | 940 | return -EINVAL; |
941 | } | 941 | } |
942 | if (!_ep || (!ep->desc && ep->bEndpointAddress)) { | 942 | if (!_ep || (!ep->desc && ep->bEndpointAddress)) { |
943 | DBG("%s, bad ep\n", __FUNCTION__); | 943 | DBG("%s, bad ep\n", __func__); |
944 | return -EINVAL; | 944 | return -EINVAL; |
945 | } | 945 | } |
946 | if (ep->bmAttributes == USB_ENDPOINT_XFER_ISOC) { | 946 | if (ep->bmAttributes == USB_ENDPOINT_XFER_ISOC) { |
@@ -959,7 +959,7 @@ omap_ep_queue(struct usb_ep *_ep, struct usb_request *_req, gfp_t gfp_flags) | |||
959 | && (ep->bEndpointAddress & USB_DIR_IN) == 0 | 959 | && (ep->bEndpointAddress & USB_DIR_IN) == 0 |
960 | && !cpu_class_is_omap2() | 960 | && !cpu_class_is_omap2() |
961 | && (req->req.length % ep->ep.maxpacket) != 0) { | 961 | && (req->req.length % ep->ep.maxpacket) != 0) { |
962 | DBG("%s, no partial packet OUT reads\n", __FUNCTION__); | 962 | DBG("%s, no partial packet OUT reads\n", __func__); |
963 | return -EMSGSIZE; | 963 | return -EMSGSIZE; |
964 | } | 964 | } |
965 | 965 | ||
diff --git a/drivers/usb/gadget/printer.c b/drivers/usb/gadget/printer.c index ecc1410073f4..76be75e3ab8f 100644 --- a/drivers/usb/gadget/printer.c +++ b/drivers/usb/gadget/printer.c | |||
@@ -915,7 +915,7 @@ static void printer_reset_interface(struct printer_dev *dev) | |||
915 | if (dev->interface < 0) | 915 | if (dev->interface < 0) |
916 | return; | 916 | return; |
917 | 917 | ||
918 | DBG(dev, "%s\n", __FUNCTION__); | 918 | DBG(dev, "%s\n", __func__); |
919 | 919 | ||
920 | if (dev->in) | 920 | if (dev->in) |
921 | usb_ep_disable(dev->in_ep); | 921 | usb_ep_disable(dev->in_ep); |
@@ -1284,7 +1284,7 @@ printer_disconnect(struct usb_gadget *gadget) | |||
1284 | struct printer_dev *dev = get_gadget_data(gadget); | 1284 | struct printer_dev *dev = get_gadget_data(gadget); |
1285 | unsigned long flags; | 1285 | unsigned long flags; |
1286 | 1286 | ||
1287 | DBG(dev, "%s\n", __FUNCTION__); | 1287 | DBG(dev, "%s\n", __func__); |
1288 | 1288 | ||
1289 | spin_lock_irqsave(&dev->lock, flags); | 1289 | spin_lock_irqsave(&dev->lock, flags); |
1290 | 1290 | ||
@@ -1300,7 +1300,7 @@ printer_unbind(struct usb_gadget *gadget) | |||
1300 | struct usb_request *req; | 1300 | struct usb_request *req; |
1301 | 1301 | ||
1302 | 1302 | ||
1303 | DBG(dev, "%s\n", __FUNCTION__); | 1303 | DBG(dev, "%s\n", __func__); |
1304 | 1304 | ||
1305 | /* Remove sysfs files */ | 1305 | /* Remove sysfs files */ |
1306 | device_destroy(usb_gadget_class, g_printer_devno); | 1306 | device_destroy(usb_gadget_class, g_printer_devno); |
diff --git a/drivers/usb/gadget/pxa2xx_udc.c b/drivers/usb/gadget/pxa2xx_udc.c index c00cd8b9d3d1..08f699b1fc57 100644 --- a/drivers/usb/gadget/pxa2xx_udc.c +++ b/drivers/usb/gadget/pxa2xx_udc.c | |||
@@ -235,7 +235,7 @@ static int pxa2xx_ep_enable (struct usb_ep *_ep, | |||
235 | || ep->bEndpointAddress != desc->bEndpointAddress | 235 | || ep->bEndpointAddress != desc->bEndpointAddress |
236 | || ep->fifo_size < le16_to_cpu | 236 | || ep->fifo_size < le16_to_cpu |
237 | (desc->wMaxPacketSize)) { | 237 | (desc->wMaxPacketSize)) { |
238 | DMSG("%s, bad ep or descriptor\n", __FUNCTION__); | 238 | DMSG("%s, bad ep or descriptor\n", __func__); |
239 | return -EINVAL; | 239 | return -EINVAL; |
240 | } | 240 | } |
241 | 241 | ||
@@ -243,7 +243,7 @@ static int pxa2xx_ep_enable (struct usb_ep *_ep, | |||
243 | if (ep->bmAttributes != desc->bmAttributes | 243 | if (ep->bmAttributes != desc->bmAttributes |
244 | && ep->bmAttributes != USB_ENDPOINT_XFER_BULK | 244 | && ep->bmAttributes != USB_ENDPOINT_XFER_BULK |
245 | && desc->bmAttributes != USB_ENDPOINT_XFER_INT) { | 245 | && desc->bmAttributes != USB_ENDPOINT_XFER_INT) { |
246 | DMSG("%s, %s type mismatch\n", __FUNCTION__, _ep->name); | 246 | DMSG("%s, %s type mismatch\n", __func__, _ep->name); |
247 | return -EINVAL; | 247 | return -EINVAL; |
248 | } | 248 | } |
249 | 249 | ||
@@ -252,13 +252,13 @@ static int pxa2xx_ep_enable (struct usb_ep *_ep, | |||
252 | && le16_to_cpu (desc->wMaxPacketSize) | 252 | && le16_to_cpu (desc->wMaxPacketSize) |
253 | != BULK_FIFO_SIZE) | 253 | != BULK_FIFO_SIZE) |
254 | || !desc->wMaxPacketSize) { | 254 | || !desc->wMaxPacketSize) { |
255 | DMSG("%s, bad %s maxpacket\n", __FUNCTION__, _ep->name); | 255 | DMSG("%s, bad %s maxpacket\n", __func__, _ep->name); |
256 | return -ERANGE; | 256 | return -ERANGE; |
257 | } | 257 | } |
258 | 258 | ||
259 | dev = ep->dev; | 259 | dev = ep->dev; |
260 | if (!dev->driver || dev->gadget.speed == USB_SPEED_UNKNOWN) { | 260 | if (!dev->driver || dev->gadget.speed == USB_SPEED_UNKNOWN) { |
261 | DMSG("%s, bogus device state\n", __FUNCTION__); | 261 | DMSG("%s, bogus device state\n", __func__); |
262 | return -ESHUTDOWN; | 262 | return -ESHUTDOWN; |
263 | } | 263 | } |
264 | 264 | ||
@@ -283,7 +283,7 @@ static int pxa2xx_ep_disable (struct usb_ep *_ep) | |||
283 | 283 | ||
284 | ep = container_of (_ep, struct pxa2xx_ep, ep); | 284 | ep = container_of (_ep, struct pxa2xx_ep, ep); |
285 | if (!_ep || !ep->desc) { | 285 | if (!_ep || !ep->desc) { |
286 | DMSG("%s, %s not enabled\n", __FUNCTION__, | 286 | DMSG("%s, %s not enabled\n", __func__, |
287 | _ep ? ep->ep.name : NULL); | 287 | _ep ? ep->ep.name : NULL); |
288 | return -EINVAL; | 288 | return -EINVAL; |
289 | } | 289 | } |
@@ -461,7 +461,7 @@ void ep0start(struct pxa2xx_udc *dev, u32 flags, const char *tag) | |||
461 | USIR0 = USIR0_IR0; | 461 | USIR0 = USIR0_IR0; |
462 | dev->req_pending = 0; | 462 | dev->req_pending = 0; |
463 | DBG(DBG_VERY_NOISY, "%s %s, %02x/%02x\n", | 463 | DBG(DBG_VERY_NOISY, "%s %s, %02x/%02x\n", |
464 | __FUNCTION__, tag, UDCCS0, flags); | 464 | __func__, tag, UDCCS0, flags); |
465 | } | 465 | } |
466 | 466 | ||
467 | static int | 467 | static int |
@@ -651,20 +651,20 @@ pxa2xx_ep_queue(struct usb_ep *_ep, struct usb_request *_req, gfp_t gfp_flags) | |||
651 | req = container_of(_req, struct pxa2xx_request, req); | 651 | req = container_of(_req, struct pxa2xx_request, req); |
652 | if (unlikely (!_req || !_req->complete || !_req->buf | 652 | if (unlikely (!_req || !_req->complete || !_req->buf |
653 | || !list_empty(&req->queue))) { | 653 | || !list_empty(&req->queue))) { |
654 | DMSG("%s, bad params\n", __FUNCTION__); | 654 | DMSG("%s, bad params\n", __func__); |
655 | return -EINVAL; | 655 | return -EINVAL; |
656 | } | 656 | } |
657 | 657 | ||
658 | ep = container_of(_ep, struct pxa2xx_ep, ep); | 658 | ep = container_of(_ep, struct pxa2xx_ep, ep); |
659 | if (unlikely (!_ep || (!ep->desc && ep->ep.name != ep0name))) { | 659 | if (unlikely (!_ep || (!ep->desc && ep->ep.name != ep0name))) { |
660 | DMSG("%s, bad ep\n", __FUNCTION__); | 660 | DMSG("%s, bad ep\n", __func__); |
661 | return -EINVAL; | 661 | return -EINVAL; |
662 | } | 662 | } |
663 | 663 | ||
664 | dev = ep->dev; | 664 | dev = ep->dev; |
665 | if (unlikely (!dev->driver | 665 | if (unlikely (!dev->driver |
666 | || dev->gadget.speed == USB_SPEED_UNKNOWN)) { | 666 | || dev->gadget.speed == USB_SPEED_UNKNOWN)) { |
667 | DMSG("%s, bogus device state\n", __FUNCTION__); | 667 | DMSG("%s, bogus device state\n", __func__); |
668 | return -ESHUTDOWN; | 668 | return -ESHUTDOWN; |
669 | } | 669 | } |
670 | 670 | ||
@@ -807,7 +807,7 @@ static int pxa2xx_ep_set_halt(struct usb_ep *_ep, int value) | |||
807 | if (unlikely (!_ep | 807 | if (unlikely (!_ep |
808 | || (!ep->desc && ep->ep.name != ep0name)) | 808 | || (!ep->desc && ep->ep.name != ep0name)) |
809 | || ep->bmAttributes == USB_ENDPOINT_XFER_ISOC) { | 809 | || ep->bmAttributes == USB_ENDPOINT_XFER_ISOC) { |
810 | DMSG("%s, bad ep\n", __FUNCTION__); | 810 | DMSG("%s, bad ep\n", __func__); |
811 | return -EINVAL; | 811 | return -EINVAL; |
812 | } | 812 | } |
813 | if (value == 0) { | 813 | if (value == 0) { |
@@ -859,7 +859,7 @@ static int pxa2xx_ep_fifo_status(struct usb_ep *_ep) | |||
859 | 859 | ||
860 | ep = container_of(_ep, struct pxa2xx_ep, ep); | 860 | ep = container_of(_ep, struct pxa2xx_ep, ep); |
861 | if (!_ep) { | 861 | if (!_ep) { |
862 | DMSG("%s, bad ep\n", __FUNCTION__); | 862 | DMSG("%s, bad ep\n", __func__); |
863 | return -ENODEV; | 863 | return -ENODEV; |
864 | } | 864 | } |
865 | /* pxa can't report unclaimed bytes from IN fifos */ | 865 | /* pxa can't report unclaimed bytes from IN fifos */ |
@@ -878,7 +878,7 @@ static void pxa2xx_ep_fifo_flush(struct usb_ep *_ep) | |||
878 | 878 | ||
879 | ep = container_of(_ep, struct pxa2xx_ep, ep); | 879 | ep = container_of(_ep, struct pxa2xx_ep, ep); |
880 | if (!_ep || ep->ep.name == ep0name || !list_empty(&ep->queue)) { | 880 | if (!_ep || ep->ep.name == ep0name || !list_empty(&ep->queue)) { |
881 | DMSG("%s, bad ep\n", __FUNCTION__); | 881 | DMSG("%s, bad ep\n", __func__); |
882 | return; | 882 | return; |
883 | } | 883 | } |
884 | 884 | ||
@@ -1813,7 +1813,7 @@ pxa2xx_udc_irq(int irq, void *_dev) | |||
1813 | 1813 | ||
1814 | static void nop_release (struct device *dev) | 1814 | static void nop_release (struct device *dev) |
1815 | { | 1815 | { |
1816 | DMSG("%s %s\n", __FUNCTION__, dev->bus_id); | 1816 | DMSG("%s %s\n", __func__, dev->bus_id); |
1817 | } | 1817 | } |
1818 | 1818 | ||
1819 | /* this uses load-time allocation and initialization (instead of | 1819 | /* this uses load-time allocation and initialization (instead of |
diff --git a/drivers/usb/gadget/rndis.c b/drivers/usb/gadget/rndis.c index 934911ee5c72..bd58dd504f6f 100644 --- a/drivers/usb/gadget/rndis.c +++ b/drivers/usb/gadget/rndis.c | |||
@@ -204,7 +204,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
204 | 204 | ||
205 | /* mandatory */ | 205 | /* mandatory */ |
206 | case OID_GEN_SUPPORTED_LIST: | 206 | case OID_GEN_SUPPORTED_LIST: |
207 | DBG("%s: OID_GEN_SUPPORTED_LIST\n", __FUNCTION__); | 207 | DBG("%s: OID_GEN_SUPPORTED_LIST\n", __func__); |
208 | length = sizeof (oid_supported_list); | 208 | length = sizeof (oid_supported_list); |
209 | count = length / sizeof (u32); | 209 | count = length / sizeof (u32); |
210 | for (i = 0; i < count; i++) | 210 | for (i = 0; i < count; i++) |
@@ -214,7 +214,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
214 | 214 | ||
215 | /* mandatory */ | 215 | /* mandatory */ |
216 | case OID_GEN_HARDWARE_STATUS: | 216 | case OID_GEN_HARDWARE_STATUS: |
217 | DBG("%s: OID_GEN_HARDWARE_STATUS\n", __FUNCTION__); | 217 | DBG("%s: OID_GEN_HARDWARE_STATUS\n", __func__); |
218 | /* Bogus question! | 218 | /* Bogus question! |
219 | * Hardware must be ready to receive high level protocols. | 219 | * Hardware must be ready to receive high level protocols. |
220 | * BTW: | 220 | * BTW: |
@@ -227,14 +227,14 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
227 | 227 | ||
228 | /* mandatory */ | 228 | /* mandatory */ |
229 | case OID_GEN_MEDIA_SUPPORTED: | 229 | case OID_GEN_MEDIA_SUPPORTED: |
230 | DBG("%s: OID_GEN_MEDIA_SUPPORTED\n", __FUNCTION__); | 230 | DBG("%s: OID_GEN_MEDIA_SUPPORTED\n", __func__); |
231 | *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr].medium); | 231 | *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr].medium); |
232 | retval = 0; | 232 | retval = 0; |
233 | break; | 233 | break; |
234 | 234 | ||
235 | /* mandatory */ | 235 | /* mandatory */ |
236 | case OID_GEN_MEDIA_IN_USE: | 236 | case OID_GEN_MEDIA_IN_USE: |
237 | DBG("%s: OID_GEN_MEDIA_IN_USE\n", __FUNCTION__); | 237 | DBG("%s: OID_GEN_MEDIA_IN_USE\n", __func__); |
238 | /* one medium, one transport... (maybe you do it better) */ | 238 | /* one medium, one transport... (maybe you do it better) */ |
239 | *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr].medium); | 239 | *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr].medium); |
240 | retval = 0; | 240 | retval = 0; |
@@ -242,7 +242,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
242 | 242 | ||
243 | /* mandatory */ | 243 | /* mandatory */ |
244 | case OID_GEN_MAXIMUM_FRAME_SIZE: | 244 | case OID_GEN_MAXIMUM_FRAME_SIZE: |
245 | DBG("%s: OID_GEN_MAXIMUM_FRAME_SIZE\n", __FUNCTION__); | 245 | DBG("%s: OID_GEN_MAXIMUM_FRAME_SIZE\n", __func__); |
246 | if (rndis_per_dev_params [configNr].dev) { | 246 | if (rndis_per_dev_params [configNr].dev) { |
247 | *outbuf = cpu_to_le32 ( | 247 | *outbuf = cpu_to_le32 ( |
248 | rndis_per_dev_params [configNr].dev->mtu); | 248 | rndis_per_dev_params [configNr].dev->mtu); |
@@ -253,7 +253,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
253 | /* mandatory */ | 253 | /* mandatory */ |
254 | case OID_GEN_LINK_SPEED: | 254 | case OID_GEN_LINK_SPEED: |
255 | if (rndis_debug > 1) | 255 | if (rndis_debug > 1) |
256 | DBG("%s: OID_GEN_LINK_SPEED\n", __FUNCTION__); | 256 | DBG("%s: OID_GEN_LINK_SPEED\n", __func__); |
257 | if (rndis_per_dev_params [configNr].media_state | 257 | if (rndis_per_dev_params [configNr].media_state |
258 | == NDIS_MEDIA_STATE_DISCONNECTED) | 258 | == NDIS_MEDIA_STATE_DISCONNECTED) |
259 | *outbuf = __constant_cpu_to_le32 (0); | 259 | *outbuf = __constant_cpu_to_le32 (0); |
@@ -265,7 +265,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
265 | 265 | ||
266 | /* mandatory */ | 266 | /* mandatory */ |
267 | case OID_GEN_TRANSMIT_BLOCK_SIZE: | 267 | case OID_GEN_TRANSMIT_BLOCK_SIZE: |
268 | DBG("%s: OID_GEN_TRANSMIT_BLOCK_SIZE\n", __FUNCTION__); | 268 | DBG("%s: OID_GEN_TRANSMIT_BLOCK_SIZE\n", __func__); |
269 | if (rndis_per_dev_params [configNr].dev) { | 269 | if (rndis_per_dev_params [configNr].dev) { |
270 | *outbuf = cpu_to_le32 ( | 270 | *outbuf = cpu_to_le32 ( |
271 | rndis_per_dev_params [configNr].dev->mtu); | 271 | rndis_per_dev_params [configNr].dev->mtu); |
@@ -275,7 +275,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
275 | 275 | ||
276 | /* mandatory */ | 276 | /* mandatory */ |
277 | case OID_GEN_RECEIVE_BLOCK_SIZE: | 277 | case OID_GEN_RECEIVE_BLOCK_SIZE: |
278 | DBG("%s: OID_GEN_RECEIVE_BLOCK_SIZE\n", __FUNCTION__); | 278 | DBG("%s: OID_GEN_RECEIVE_BLOCK_SIZE\n", __func__); |
279 | if (rndis_per_dev_params [configNr].dev) { | 279 | if (rndis_per_dev_params [configNr].dev) { |
280 | *outbuf = cpu_to_le32 ( | 280 | *outbuf = cpu_to_le32 ( |
281 | rndis_per_dev_params [configNr].dev->mtu); | 281 | rndis_per_dev_params [configNr].dev->mtu); |
@@ -285,7 +285,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
285 | 285 | ||
286 | /* mandatory */ | 286 | /* mandatory */ |
287 | case OID_GEN_VENDOR_ID: | 287 | case OID_GEN_VENDOR_ID: |
288 | DBG("%s: OID_GEN_VENDOR_ID\n", __FUNCTION__); | 288 | DBG("%s: OID_GEN_VENDOR_ID\n", __func__); |
289 | *outbuf = cpu_to_le32 ( | 289 | *outbuf = cpu_to_le32 ( |
290 | rndis_per_dev_params [configNr].vendorID); | 290 | rndis_per_dev_params [configNr].vendorID); |
291 | retval = 0; | 291 | retval = 0; |
@@ -293,7 +293,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
293 | 293 | ||
294 | /* mandatory */ | 294 | /* mandatory */ |
295 | case OID_GEN_VENDOR_DESCRIPTION: | 295 | case OID_GEN_VENDOR_DESCRIPTION: |
296 | DBG("%s: OID_GEN_VENDOR_DESCRIPTION\n", __FUNCTION__); | 296 | DBG("%s: OID_GEN_VENDOR_DESCRIPTION\n", __func__); |
297 | length = strlen (rndis_per_dev_params [configNr].vendorDescr); | 297 | length = strlen (rndis_per_dev_params [configNr].vendorDescr); |
298 | memcpy (outbuf, | 298 | memcpy (outbuf, |
299 | rndis_per_dev_params [configNr].vendorDescr, length); | 299 | rndis_per_dev_params [configNr].vendorDescr, length); |
@@ -301,7 +301,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
301 | break; | 301 | break; |
302 | 302 | ||
303 | case OID_GEN_VENDOR_DRIVER_VERSION: | 303 | case OID_GEN_VENDOR_DRIVER_VERSION: |
304 | DBG("%s: OID_GEN_VENDOR_DRIVER_VERSION\n", __FUNCTION__); | 304 | DBG("%s: OID_GEN_VENDOR_DRIVER_VERSION\n", __func__); |
305 | /* Created as LE */ | 305 | /* Created as LE */ |
306 | *outbuf = rndis_driver_version; | 306 | *outbuf = rndis_driver_version; |
307 | retval = 0; | 307 | retval = 0; |
@@ -309,14 +309,14 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
309 | 309 | ||
310 | /* mandatory */ | 310 | /* mandatory */ |
311 | case OID_GEN_CURRENT_PACKET_FILTER: | 311 | case OID_GEN_CURRENT_PACKET_FILTER: |
312 | DBG("%s: OID_GEN_CURRENT_PACKET_FILTER\n", __FUNCTION__); | 312 | DBG("%s: OID_GEN_CURRENT_PACKET_FILTER\n", __func__); |
313 | *outbuf = cpu_to_le32 (*rndis_per_dev_params[configNr].filter); | 313 | *outbuf = cpu_to_le32 (*rndis_per_dev_params[configNr].filter); |
314 | retval = 0; | 314 | retval = 0; |
315 | break; | 315 | break; |
316 | 316 | ||
317 | /* mandatory */ | 317 | /* mandatory */ |
318 | case OID_GEN_MAXIMUM_TOTAL_SIZE: | 318 | case OID_GEN_MAXIMUM_TOTAL_SIZE: |
319 | DBG("%s: OID_GEN_MAXIMUM_TOTAL_SIZE\n", __FUNCTION__); | 319 | DBG("%s: OID_GEN_MAXIMUM_TOTAL_SIZE\n", __func__); |
320 | *outbuf = __constant_cpu_to_le32(RNDIS_MAX_TOTAL_SIZE); | 320 | *outbuf = __constant_cpu_to_le32(RNDIS_MAX_TOTAL_SIZE); |
321 | retval = 0; | 321 | retval = 0; |
322 | break; | 322 | break; |
@@ -324,14 +324,14 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
324 | /* mandatory */ | 324 | /* mandatory */ |
325 | case OID_GEN_MEDIA_CONNECT_STATUS: | 325 | case OID_GEN_MEDIA_CONNECT_STATUS: |
326 | if (rndis_debug > 1) | 326 | if (rndis_debug > 1) |
327 | DBG("%s: OID_GEN_MEDIA_CONNECT_STATUS\n", __FUNCTION__); | 327 | DBG("%s: OID_GEN_MEDIA_CONNECT_STATUS\n", __func__); |
328 | *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr] | 328 | *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr] |
329 | .media_state); | 329 | .media_state); |
330 | retval = 0; | 330 | retval = 0; |
331 | break; | 331 | break; |
332 | 332 | ||
333 | case OID_GEN_PHYSICAL_MEDIUM: | 333 | case OID_GEN_PHYSICAL_MEDIUM: |
334 | DBG("%s: OID_GEN_PHYSICAL_MEDIUM\n", __FUNCTION__); | 334 | DBG("%s: OID_GEN_PHYSICAL_MEDIUM\n", __func__); |
335 | *outbuf = __constant_cpu_to_le32 (0); | 335 | *outbuf = __constant_cpu_to_le32 (0); |
336 | retval = 0; | 336 | retval = 0; |
337 | break; | 337 | break; |
@@ -341,7 +341,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
341 | * versions emit undefined RNDIS messages. DOCUMENT ALL THESE! | 341 | * versions emit undefined RNDIS messages. DOCUMENT ALL THESE! |
342 | */ | 342 | */ |
343 | case OID_GEN_MAC_OPTIONS: /* from WinME */ | 343 | case OID_GEN_MAC_OPTIONS: /* from WinME */ |
344 | DBG("%s: OID_GEN_MAC_OPTIONS\n", __FUNCTION__); | 344 | DBG("%s: OID_GEN_MAC_OPTIONS\n", __func__); |
345 | *outbuf = __constant_cpu_to_le32( | 345 | *outbuf = __constant_cpu_to_le32( |
346 | NDIS_MAC_OPTION_RECEIVE_SERIALIZED | 346 | NDIS_MAC_OPTION_RECEIVE_SERIALIZED |
347 | | NDIS_MAC_OPTION_FULL_DUPLEX); | 347 | | NDIS_MAC_OPTION_FULL_DUPLEX); |
@@ -353,7 +353,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
353 | /* mandatory */ | 353 | /* mandatory */ |
354 | case OID_GEN_XMIT_OK: | 354 | case OID_GEN_XMIT_OK: |
355 | if (rndis_debug > 1) | 355 | if (rndis_debug > 1) |
356 | DBG("%s: OID_GEN_XMIT_OK\n", __FUNCTION__); | 356 | DBG("%s: OID_GEN_XMIT_OK\n", __func__); |
357 | if (rndis_per_dev_params [configNr].stats) { | 357 | if (rndis_per_dev_params [configNr].stats) { |
358 | *outbuf = cpu_to_le32 ( | 358 | *outbuf = cpu_to_le32 ( |
359 | rndis_per_dev_params [configNr].stats->tx_packets - | 359 | rndis_per_dev_params [configNr].stats->tx_packets - |
@@ -366,7 +366,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
366 | /* mandatory */ | 366 | /* mandatory */ |
367 | case OID_GEN_RCV_OK: | 367 | case OID_GEN_RCV_OK: |
368 | if (rndis_debug > 1) | 368 | if (rndis_debug > 1) |
369 | DBG("%s: OID_GEN_RCV_OK\n", __FUNCTION__); | 369 | DBG("%s: OID_GEN_RCV_OK\n", __func__); |
370 | if (rndis_per_dev_params [configNr].stats) { | 370 | if (rndis_per_dev_params [configNr].stats) { |
371 | *outbuf = cpu_to_le32 ( | 371 | *outbuf = cpu_to_le32 ( |
372 | rndis_per_dev_params [configNr].stats->rx_packets - | 372 | rndis_per_dev_params [configNr].stats->rx_packets - |
@@ -379,7 +379,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
379 | /* mandatory */ | 379 | /* mandatory */ |
380 | case OID_GEN_XMIT_ERROR: | 380 | case OID_GEN_XMIT_ERROR: |
381 | if (rndis_debug > 1) | 381 | if (rndis_debug > 1) |
382 | DBG("%s: OID_GEN_XMIT_ERROR\n", __FUNCTION__); | 382 | DBG("%s: OID_GEN_XMIT_ERROR\n", __func__); |
383 | if (rndis_per_dev_params [configNr].stats) { | 383 | if (rndis_per_dev_params [configNr].stats) { |
384 | *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr] | 384 | *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr] |
385 | .stats->tx_errors); | 385 | .stats->tx_errors); |
@@ -390,7 +390,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
390 | /* mandatory */ | 390 | /* mandatory */ |
391 | case OID_GEN_RCV_ERROR: | 391 | case OID_GEN_RCV_ERROR: |
392 | if (rndis_debug > 1) | 392 | if (rndis_debug > 1) |
393 | DBG("%s: OID_GEN_RCV_ERROR\n", __FUNCTION__); | 393 | DBG("%s: OID_GEN_RCV_ERROR\n", __func__); |
394 | if (rndis_per_dev_params [configNr].stats) { | 394 | if (rndis_per_dev_params [configNr].stats) { |
395 | *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr] | 395 | *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr] |
396 | .stats->rx_errors); | 396 | .stats->rx_errors); |
@@ -400,7 +400,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
400 | 400 | ||
401 | /* mandatory */ | 401 | /* mandatory */ |
402 | case OID_GEN_RCV_NO_BUFFER: | 402 | case OID_GEN_RCV_NO_BUFFER: |
403 | DBG("%s: OID_GEN_RCV_NO_BUFFER\n", __FUNCTION__); | 403 | DBG("%s: OID_GEN_RCV_NO_BUFFER\n", __func__); |
404 | if (rndis_per_dev_params [configNr].stats) { | 404 | if (rndis_per_dev_params [configNr].stats) { |
405 | *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr] | 405 | *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr] |
406 | .stats->rx_dropped); | 406 | .stats->rx_dropped); |
@@ -410,7 +410,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
410 | 410 | ||
411 | #ifdef RNDIS_OPTIONAL_STATS | 411 | #ifdef RNDIS_OPTIONAL_STATS |
412 | case OID_GEN_DIRECTED_BYTES_XMIT: | 412 | case OID_GEN_DIRECTED_BYTES_XMIT: |
413 | DBG("%s: OID_GEN_DIRECTED_BYTES_XMIT\n", __FUNCTION__); | 413 | DBG("%s: OID_GEN_DIRECTED_BYTES_XMIT\n", __func__); |
414 | /* | 414 | /* |
415 | * Aunt Tilly's size of shoes | 415 | * Aunt Tilly's size of shoes |
416 | * minus antarctica count of penguins | 416 | * minus antarctica count of penguins |
@@ -430,7 +430,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
430 | break; | 430 | break; |
431 | 431 | ||
432 | case OID_GEN_DIRECTED_FRAMES_XMIT: | 432 | case OID_GEN_DIRECTED_FRAMES_XMIT: |
433 | DBG("%s: OID_GEN_DIRECTED_FRAMES_XMIT\n", __FUNCTION__); | 433 | DBG("%s: OID_GEN_DIRECTED_FRAMES_XMIT\n", __func__); |
434 | /* dito */ | 434 | /* dito */ |
435 | if (rndis_per_dev_params [configNr].stats) { | 435 | if (rndis_per_dev_params [configNr].stats) { |
436 | *outbuf = cpu_to_le32 ( | 436 | *outbuf = cpu_to_le32 ( |
@@ -446,7 +446,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
446 | break; | 446 | break; |
447 | 447 | ||
448 | case OID_GEN_MULTICAST_BYTES_XMIT: | 448 | case OID_GEN_MULTICAST_BYTES_XMIT: |
449 | DBG("%s: OID_GEN_MULTICAST_BYTES_XMIT\n", __FUNCTION__); | 449 | DBG("%s: OID_GEN_MULTICAST_BYTES_XMIT\n", __func__); |
450 | if (rndis_per_dev_params [configNr].stats) { | 450 | if (rndis_per_dev_params [configNr].stats) { |
451 | *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr] | 451 | *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr] |
452 | .stats->multicast*1234); | 452 | .stats->multicast*1234); |
@@ -455,7 +455,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
455 | break; | 455 | break; |
456 | 456 | ||
457 | case OID_GEN_MULTICAST_FRAMES_XMIT: | 457 | case OID_GEN_MULTICAST_FRAMES_XMIT: |
458 | DBG("%s: OID_GEN_MULTICAST_FRAMES_XMIT\n", __FUNCTION__); | 458 | DBG("%s: OID_GEN_MULTICAST_FRAMES_XMIT\n", __func__); |
459 | if (rndis_per_dev_params [configNr].stats) { | 459 | if (rndis_per_dev_params [configNr].stats) { |
460 | *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr] | 460 | *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr] |
461 | .stats->multicast); | 461 | .stats->multicast); |
@@ -464,7 +464,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
464 | break; | 464 | break; |
465 | 465 | ||
466 | case OID_GEN_BROADCAST_BYTES_XMIT: | 466 | case OID_GEN_BROADCAST_BYTES_XMIT: |
467 | DBG("%s: OID_GEN_BROADCAST_BYTES_XMIT\n", __FUNCTION__); | 467 | DBG("%s: OID_GEN_BROADCAST_BYTES_XMIT\n", __func__); |
468 | if (rndis_per_dev_params [configNr].stats) { | 468 | if (rndis_per_dev_params [configNr].stats) { |
469 | *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr] | 469 | *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr] |
470 | .stats->tx_packets/42*255); | 470 | .stats->tx_packets/42*255); |
@@ -473,7 +473,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
473 | break; | 473 | break; |
474 | 474 | ||
475 | case OID_GEN_BROADCAST_FRAMES_XMIT: | 475 | case OID_GEN_BROADCAST_FRAMES_XMIT: |
476 | DBG("%s: OID_GEN_BROADCAST_FRAMES_XMIT\n", __FUNCTION__); | 476 | DBG("%s: OID_GEN_BROADCAST_FRAMES_XMIT\n", __func__); |
477 | if (rndis_per_dev_params [configNr].stats) { | 477 | if (rndis_per_dev_params [configNr].stats) { |
478 | *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr] | 478 | *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr] |
479 | .stats->tx_packets/42); | 479 | .stats->tx_packets/42); |
@@ -482,19 +482,19 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
482 | break; | 482 | break; |
483 | 483 | ||
484 | case OID_GEN_DIRECTED_BYTES_RCV: | 484 | case OID_GEN_DIRECTED_BYTES_RCV: |
485 | DBG("%s: OID_GEN_DIRECTED_BYTES_RCV\n", __FUNCTION__); | 485 | DBG("%s: OID_GEN_DIRECTED_BYTES_RCV\n", __func__); |
486 | *outbuf = __constant_cpu_to_le32 (0); | 486 | *outbuf = __constant_cpu_to_le32 (0); |
487 | retval = 0; | 487 | retval = 0; |
488 | break; | 488 | break; |
489 | 489 | ||
490 | case OID_GEN_DIRECTED_FRAMES_RCV: | 490 | case OID_GEN_DIRECTED_FRAMES_RCV: |
491 | DBG("%s: OID_GEN_DIRECTED_FRAMES_RCV\n", __FUNCTION__); | 491 | DBG("%s: OID_GEN_DIRECTED_FRAMES_RCV\n", __func__); |
492 | *outbuf = __constant_cpu_to_le32 (0); | 492 | *outbuf = __constant_cpu_to_le32 (0); |
493 | retval = 0; | 493 | retval = 0; |
494 | break; | 494 | break; |
495 | 495 | ||
496 | case OID_GEN_MULTICAST_BYTES_RCV: | 496 | case OID_GEN_MULTICAST_BYTES_RCV: |
497 | DBG("%s: OID_GEN_MULTICAST_BYTES_RCV\n", __FUNCTION__); | 497 | DBG("%s: OID_GEN_MULTICAST_BYTES_RCV\n", __func__); |
498 | if (rndis_per_dev_params [configNr].stats) { | 498 | if (rndis_per_dev_params [configNr].stats) { |
499 | *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr] | 499 | *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr] |
500 | .stats->multicast * 1111); | 500 | .stats->multicast * 1111); |
@@ -503,7 +503,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
503 | break; | 503 | break; |
504 | 504 | ||
505 | case OID_GEN_MULTICAST_FRAMES_RCV: | 505 | case OID_GEN_MULTICAST_FRAMES_RCV: |
506 | DBG("%s: OID_GEN_MULTICAST_FRAMES_RCV\n", __FUNCTION__); | 506 | DBG("%s: OID_GEN_MULTICAST_FRAMES_RCV\n", __func__); |
507 | if (rndis_per_dev_params [configNr].stats) { | 507 | if (rndis_per_dev_params [configNr].stats) { |
508 | *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr] | 508 | *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr] |
509 | .stats->multicast); | 509 | .stats->multicast); |
@@ -512,7 +512,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
512 | break; | 512 | break; |
513 | 513 | ||
514 | case OID_GEN_BROADCAST_BYTES_RCV: | 514 | case OID_GEN_BROADCAST_BYTES_RCV: |
515 | DBG("%s: OID_GEN_BROADCAST_BYTES_RCV\n", __FUNCTION__); | 515 | DBG("%s: OID_GEN_BROADCAST_BYTES_RCV\n", __func__); |
516 | if (rndis_per_dev_params [configNr].stats) { | 516 | if (rndis_per_dev_params [configNr].stats) { |
517 | *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr] | 517 | *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr] |
518 | .stats->rx_packets/42*255); | 518 | .stats->rx_packets/42*255); |
@@ -521,7 +521,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
521 | break; | 521 | break; |
522 | 522 | ||
523 | case OID_GEN_BROADCAST_FRAMES_RCV: | 523 | case OID_GEN_BROADCAST_FRAMES_RCV: |
524 | DBG("%s: OID_GEN_BROADCAST_FRAMES_RCV\n", __FUNCTION__); | 524 | DBG("%s: OID_GEN_BROADCAST_FRAMES_RCV\n", __func__); |
525 | if (rndis_per_dev_params [configNr].stats) { | 525 | if (rndis_per_dev_params [configNr].stats) { |
526 | *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr] | 526 | *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr] |
527 | .stats->rx_packets/42); | 527 | .stats->rx_packets/42); |
@@ -530,7 +530,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
530 | break; | 530 | break; |
531 | 531 | ||
532 | case OID_GEN_RCV_CRC_ERROR: | 532 | case OID_GEN_RCV_CRC_ERROR: |
533 | DBG("%s: OID_GEN_RCV_CRC_ERROR\n", __FUNCTION__); | 533 | DBG("%s: OID_GEN_RCV_CRC_ERROR\n", __func__); |
534 | if (rndis_per_dev_params [configNr].stats) { | 534 | if (rndis_per_dev_params [configNr].stats) { |
535 | *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr] | 535 | *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr] |
536 | .stats->rx_crc_errors); | 536 | .stats->rx_crc_errors); |
@@ -539,7 +539,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
539 | break; | 539 | break; |
540 | 540 | ||
541 | case OID_GEN_TRANSMIT_QUEUE_LENGTH: | 541 | case OID_GEN_TRANSMIT_QUEUE_LENGTH: |
542 | DBG("%s: OID_GEN_TRANSMIT_QUEUE_LENGTH\n", __FUNCTION__); | 542 | DBG("%s: OID_GEN_TRANSMIT_QUEUE_LENGTH\n", __func__); |
543 | *outbuf = __constant_cpu_to_le32 (0); | 543 | *outbuf = __constant_cpu_to_le32 (0); |
544 | retval = 0; | 544 | retval = 0; |
545 | break; | 545 | break; |
@@ -549,7 +549,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
549 | 549 | ||
550 | /* mandatory */ | 550 | /* mandatory */ |
551 | case OID_802_3_PERMANENT_ADDRESS: | 551 | case OID_802_3_PERMANENT_ADDRESS: |
552 | DBG("%s: OID_802_3_PERMANENT_ADDRESS\n", __FUNCTION__); | 552 | DBG("%s: OID_802_3_PERMANENT_ADDRESS\n", __func__); |
553 | if (rndis_per_dev_params [configNr].dev) { | 553 | if (rndis_per_dev_params [configNr].dev) { |
554 | length = ETH_ALEN; | 554 | length = ETH_ALEN; |
555 | memcpy (outbuf, | 555 | memcpy (outbuf, |
@@ -561,7 +561,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
561 | 561 | ||
562 | /* mandatory */ | 562 | /* mandatory */ |
563 | case OID_802_3_CURRENT_ADDRESS: | 563 | case OID_802_3_CURRENT_ADDRESS: |
564 | DBG("%s: OID_802_3_CURRENT_ADDRESS\n", __FUNCTION__); | 564 | DBG("%s: OID_802_3_CURRENT_ADDRESS\n", __func__); |
565 | if (rndis_per_dev_params [configNr].dev) { | 565 | if (rndis_per_dev_params [configNr].dev) { |
566 | length = ETH_ALEN; | 566 | length = ETH_ALEN; |
567 | memcpy (outbuf, | 567 | memcpy (outbuf, |
@@ -573,7 +573,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
573 | 573 | ||
574 | /* mandatory */ | 574 | /* mandatory */ |
575 | case OID_802_3_MULTICAST_LIST: | 575 | case OID_802_3_MULTICAST_LIST: |
576 | DBG("%s: OID_802_3_MULTICAST_LIST\n", __FUNCTION__); | 576 | DBG("%s: OID_802_3_MULTICAST_LIST\n", __func__); |
577 | /* Multicast base address only */ | 577 | /* Multicast base address only */ |
578 | *outbuf = __constant_cpu_to_le32 (0xE0000000); | 578 | *outbuf = __constant_cpu_to_le32 (0xE0000000); |
579 | retval = 0; | 579 | retval = 0; |
@@ -581,21 +581,21 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
581 | 581 | ||
582 | /* mandatory */ | 582 | /* mandatory */ |
583 | case OID_802_3_MAXIMUM_LIST_SIZE: | 583 | case OID_802_3_MAXIMUM_LIST_SIZE: |
584 | DBG("%s: OID_802_3_MAXIMUM_LIST_SIZE\n", __FUNCTION__); | 584 | DBG("%s: OID_802_3_MAXIMUM_LIST_SIZE\n", __func__); |
585 | /* Multicast base address only */ | 585 | /* Multicast base address only */ |
586 | *outbuf = __constant_cpu_to_le32 (1); | 586 | *outbuf = __constant_cpu_to_le32 (1); |
587 | retval = 0; | 587 | retval = 0; |
588 | break; | 588 | break; |
589 | 589 | ||
590 | case OID_802_3_MAC_OPTIONS: | 590 | case OID_802_3_MAC_OPTIONS: |
591 | DBG("%s: OID_802_3_MAC_OPTIONS\n", __FUNCTION__); | 591 | DBG("%s: OID_802_3_MAC_OPTIONS\n", __func__); |
592 | break; | 592 | break; |
593 | 593 | ||
594 | /* ieee802.3 statistics OIDs (table 4-4) */ | 594 | /* ieee802.3 statistics OIDs (table 4-4) */ |
595 | 595 | ||
596 | /* mandatory */ | 596 | /* mandatory */ |
597 | case OID_802_3_RCV_ERROR_ALIGNMENT: | 597 | case OID_802_3_RCV_ERROR_ALIGNMENT: |
598 | DBG("%s: OID_802_3_RCV_ERROR_ALIGNMENT\n", __FUNCTION__); | 598 | DBG("%s: OID_802_3_RCV_ERROR_ALIGNMENT\n", __func__); |
599 | if (rndis_per_dev_params [configNr].stats) { | 599 | if (rndis_per_dev_params [configNr].stats) { |
600 | *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr] | 600 | *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr] |
601 | .stats->rx_frame_errors); | 601 | .stats->rx_frame_errors); |
@@ -605,51 +605,51 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
605 | 605 | ||
606 | /* mandatory */ | 606 | /* mandatory */ |
607 | case OID_802_3_XMIT_ONE_COLLISION: | 607 | case OID_802_3_XMIT_ONE_COLLISION: |
608 | DBG("%s: OID_802_3_XMIT_ONE_COLLISION\n", __FUNCTION__); | 608 | DBG("%s: OID_802_3_XMIT_ONE_COLLISION\n", __func__); |
609 | *outbuf = __constant_cpu_to_le32 (0); | 609 | *outbuf = __constant_cpu_to_le32 (0); |
610 | retval = 0; | 610 | retval = 0; |
611 | break; | 611 | break; |
612 | 612 | ||
613 | /* mandatory */ | 613 | /* mandatory */ |
614 | case OID_802_3_XMIT_MORE_COLLISIONS: | 614 | case OID_802_3_XMIT_MORE_COLLISIONS: |
615 | DBG("%s: OID_802_3_XMIT_MORE_COLLISIONS\n", __FUNCTION__); | 615 | DBG("%s: OID_802_3_XMIT_MORE_COLLISIONS\n", __func__); |
616 | *outbuf = __constant_cpu_to_le32 (0); | 616 | *outbuf = __constant_cpu_to_le32 (0); |
617 | retval = 0; | 617 | retval = 0; |
618 | break; | 618 | break; |
619 | 619 | ||
620 | #ifdef RNDIS_OPTIONAL_STATS | 620 | #ifdef RNDIS_OPTIONAL_STATS |
621 | case OID_802_3_XMIT_DEFERRED: | 621 | case OID_802_3_XMIT_DEFERRED: |
622 | DBG("%s: OID_802_3_XMIT_DEFERRED\n", __FUNCTION__); | 622 | DBG("%s: OID_802_3_XMIT_DEFERRED\n", __func__); |
623 | /* TODO */ | 623 | /* TODO */ |
624 | break; | 624 | break; |
625 | 625 | ||
626 | case OID_802_3_XMIT_MAX_COLLISIONS: | 626 | case OID_802_3_XMIT_MAX_COLLISIONS: |
627 | DBG("%s: OID_802_3_XMIT_MAX_COLLISIONS\n", __FUNCTION__); | 627 | DBG("%s: OID_802_3_XMIT_MAX_COLLISIONS\n", __func__); |
628 | /* TODO */ | 628 | /* TODO */ |
629 | break; | 629 | break; |
630 | 630 | ||
631 | case OID_802_3_RCV_OVERRUN: | 631 | case OID_802_3_RCV_OVERRUN: |
632 | DBG("%s: OID_802_3_RCV_OVERRUN\n", __FUNCTION__); | 632 | DBG("%s: OID_802_3_RCV_OVERRUN\n", __func__); |
633 | /* TODO */ | 633 | /* TODO */ |
634 | break; | 634 | break; |
635 | 635 | ||
636 | case OID_802_3_XMIT_UNDERRUN: | 636 | case OID_802_3_XMIT_UNDERRUN: |
637 | DBG("%s: OID_802_3_XMIT_UNDERRUN\n", __FUNCTION__); | 637 | DBG("%s: OID_802_3_XMIT_UNDERRUN\n", __func__); |
638 | /* TODO */ | 638 | /* TODO */ |
639 | break; | 639 | break; |
640 | 640 | ||
641 | case OID_802_3_XMIT_HEARTBEAT_FAILURE: | 641 | case OID_802_3_XMIT_HEARTBEAT_FAILURE: |
642 | DBG("%s: OID_802_3_XMIT_HEARTBEAT_FAILURE\n", __FUNCTION__); | 642 | DBG("%s: OID_802_3_XMIT_HEARTBEAT_FAILURE\n", __func__); |
643 | /* TODO */ | 643 | /* TODO */ |
644 | break; | 644 | break; |
645 | 645 | ||
646 | case OID_802_3_XMIT_TIMES_CRS_LOST: | 646 | case OID_802_3_XMIT_TIMES_CRS_LOST: |
647 | DBG("%s: OID_802_3_XMIT_TIMES_CRS_LOST\n", __FUNCTION__); | 647 | DBG("%s: OID_802_3_XMIT_TIMES_CRS_LOST\n", __func__); |
648 | /* TODO */ | 648 | /* TODO */ |
649 | break; | 649 | break; |
650 | 650 | ||
651 | case OID_802_3_XMIT_LATE_COLLISIONS: | 651 | case OID_802_3_XMIT_LATE_COLLISIONS: |
652 | DBG("%s: OID_802_3_XMIT_LATE_COLLISIONS\n", __FUNCTION__); | 652 | DBG("%s: OID_802_3_XMIT_LATE_COLLISIONS\n", __func__); |
653 | /* TODO */ | 653 | /* TODO */ |
654 | break; | 654 | break; |
655 | #endif /* RNDIS_OPTIONAL_STATS */ | 655 | #endif /* RNDIS_OPTIONAL_STATS */ |
@@ -657,7 +657,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
657 | #ifdef RNDIS_PM | 657 | #ifdef RNDIS_PM |
658 | /* power management OIDs (table 4-5) */ | 658 | /* power management OIDs (table 4-5) */ |
659 | case OID_PNP_CAPABILITIES: | 659 | case OID_PNP_CAPABILITIES: |
660 | DBG("%s: OID_PNP_CAPABILITIES\n", __FUNCTION__); | 660 | DBG("%s: OID_PNP_CAPABILITIES\n", __func__); |
661 | 661 | ||
662 | /* for now, no wakeup capabilities */ | 662 | /* for now, no wakeup capabilities */ |
663 | length = sizeof (struct NDIS_PNP_CAPABILITIES); | 663 | length = sizeof (struct NDIS_PNP_CAPABILITIES); |
@@ -665,7 +665,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
665 | retval = 0; | 665 | retval = 0; |
666 | break; | 666 | break; |
667 | case OID_PNP_QUERY_POWER: | 667 | case OID_PNP_QUERY_POWER: |
668 | DBG("%s: OID_PNP_QUERY_POWER D%d\n", __FUNCTION__, | 668 | DBG("%s: OID_PNP_QUERY_POWER D%d\n", __func__, |
669 | le32_to_cpu(get_unaligned((__le32 *)buf)) - 1); | 669 | le32_to_cpu(get_unaligned((__le32 *)buf)) - 1); |
670 | /* only suspend is a real power state, and | 670 | /* only suspend is a real power state, and |
671 | * it can't be entered by OID_PNP_SET_POWER... | 671 | * it can't be entered by OID_PNP_SET_POWER... |
@@ -677,7 +677,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
677 | 677 | ||
678 | default: | 678 | default: |
679 | pr_warning("%s: query unknown OID 0x%08X\n", | 679 | pr_warning("%s: query unknown OID 0x%08X\n", |
680 | __FUNCTION__, OID); | 680 | __func__, OID); |
681 | } | 681 | } |
682 | if (retval < 0) | 682 | if (retval < 0) |
683 | length = 0; | 683 | length = 0; |
@@ -729,7 +729,7 @@ static int gen_ndis_set_resp (u8 configNr, u32 OID, u8 *buf, u32 buf_len, | |||
729 | *params->filter = (u16) le32_to_cpu(get_unaligned( | 729 | *params->filter = (u16) le32_to_cpu(get_unaligned( |
730 | (__le32 *)buf)); | 730 | (__le32 *)buf)); |
731 | DBG("%s: OID_GEN_CURRENT_PACKET_FILTER %08x\n", | 731 | DBG("%s: OID_GEN_CURRENT_PACKET_FILTER %08x\n", |
732 | __FUNCTION__, *params->filter); | 732 | __func__, *params->filter); |
733 | 733 | ||
734 | /* this call has a significant side effect: it's | 734 | /* this call has a significant side effect: it's |
735 | * what makes the packet flow start and stop, like | 735 | * what makes the packet flow start and stop, like |
@@ -753,7 +753,7 @@ update_linkstate: | |||
753 | 753 | ||
754 | case OID_802_3_MULTICAST_LIST: | 754 | case OID_802_3_MULTICAST_LIST: |
755 | /* I think we can ignore this */ | 755 | /* I think we can ignore this */ |
756 | DBG("%s: OID_802_3_MULTICAST_LIST\n", __FUNCTION__); | 756 | DBG("%s: OID_802_3_MULTICAST_LIST\n", __func__); |
757 | retval = 0; | 757 | retval = 0; |
758 | break; | 758 | break; |
759 | #if 0 | 759 | #if 0 |
@@ -762,7 +762,7 @@ update_linkstate: | |||
762 | struct rndis_config_parameter *param; | 762 | struct rndis_config_parameter *param; |
763 | param = (struct rndis_config_parameter *) buf; | 763 | param = (struct rndis_config_parameter *) buf; |
764 | DBG("%s: OID_GEN_RNDIS_CONFIG_PARAMETER '%*s'\n", | 764 | DBG("%s: OID_GEN_RNDIS_CONFIG_PARAMETER '%*s'\n", |
765 | __FUNCTION__, | 765 | __func__, |
766 | min(cpu_to_le32(param->ParameterNameLength),80), | 766 | min(cpu_to_le32(param->ParameterNameLength),80), |
767 | buf + param->ParameterNameOffset); | 767 | buf + param->ParameterNameOffset); |
768 | retval = 0; | 768 | retval = 0; |
@@ -778,7 +778,7 @@ update_linkstate: | |||
778 | * FIXME ... then things go batty; Windows wedges itself. | 778 | * FIXME ... then things go batty; Windows wedges itself. |
779 | */ | 779 | */ |
780 | i = le32_to_cpu(get_unaligned((__le32 *)buf)); | 780 | i = le32_to_cpu(get_unaligned((__le32 *)buf)); |
781 | DBG("%s: OID_PNP_SET_POWER D%d\n", __FUNCTION__, i - 1); | 781 | DBG("%s: OID_PNP_SET_POWER D%d\n", __func__, i - 1); |
782 | switch (i) { | 782 | switch (i) { |
783 | case NdisDeviceStateD0: | 783 | case NdisDeviceStateD0: |
784 | *params->filter = params->saved_filter; | 784 | *params->filter = params->saved_filter; |
@@ -802,7 +802,7 @@ update_linkstate: | |||
802 | 802 | ||
803 | default: | 803 | default: |
804 | pr_warning("%s: set unknown OID 0x%08X, size %d\n", | 804 | pr_warning("%s: set unknown OID 0x%08X, size %d\n", |
805 | __FUNCTION__, OID, buf_len); | 805 | __func__, OID, buf_len); |
806 | } | 806 | } |
807 | 807 | ||
808 | return retval; | 808 | return retval; |
@@ -855,7 +855,7 @@ static int rndis_query_response (int configNr, rndis_query_msg_type *buf) | |||
855 | rndis_query_cmplt_type *resp; | 855 | rndis_query_cmplt_type *resp; |
856 | rndis_resp_t *r; | 856 | rndis_resp_t *r; |
857 | 857 | ||
858 | // DBG("%s: OID = %08X\n", __FUNCTION__, cpu_to_le32(buf->OID)); | 858 | // DBG("%s: OID = %08X\n", __func__, cpu_to_le32(buf->OID)); |
859 | if (!rndis_per_dev_params [configNr].dev) return -ENOTSUPP; | 859 | if (!rndis_per_dev_params [configNr].dev) return -ENOTSUPP; |
860 | 860 | ||
861 | /* | 861 | /* |
@@ -908,9 +908,9 @@ static int rndis_set_response (int configNr, rndis_set_msg_type *buf) | |||
908 | BufOffset = le32_to_cpu (buf->InformationBufferOffset); | 908 | BufOffset = le32_to_cpu (buf->InformationBufferOffset); |
909 | 909 | ||
910 | #ifdef VERBOSE | 910 | #ifdef VERBOSE |
911 | DBG("%s: Length: %d\n", __FUNCTION__, BufLength); | 911 | DBG("%s: Length: %d\n", __func__, BufLength); |
912 | DBG("%s: Offset: %d\n", __FUNCTION__, BufOffset); | 912 | DBG("%s: Offset: %d\n", __func__, BufOffset); |
913 | DBG("%s: InfoBuffer: ", __FUNCTION__); | 913 | DBG("%s: InfoBuffer: ", __func__); |
914 | 914 | ||
915 | for (i = 0; i < BufLength; i++) { | 915 | for (i = 0; i < BufLength; i++) { |
916 | DBG("%02x ", *(((u8 *) buf) + i + 8 + BufOffset)); | 916 | DBG("%02x ", *(((u8 *) buf) + i + 8 + BufOffset)); |
@@ -1080,14 +1080,14 @@ int rndis_msg_parser (u8 configNr, u8 *buf) | |||
1080 | switch (MsgType) { | 1080 | switch (MsgType) { |
1081 | case REMOTE_NDIS_INITIALIZE_MSG: | 1081 | case REMOTE_NDIS_INITIALIZE_MSG: |
1082 | DBG("%s: REMOTE_NDIS_INITIALIZE_MSG\n", | 1082 | DBG("%s: REMOTE_NDIS_INITIALIZE_MSG\n", |
1083 | __FUNCTION__ ); | 1083 | __func__ ); |
1084 | params->state = RNDIS_INITIALIZED; | 1084 | params->state = RNDIS_INITIALIZED; |
1085 | return rndis_init_response (configNr, | 1085 | return rndis_init_response (configNr, |
1086 | (rndis_init_msg_type *) buf); | 1086 | (rndis_init_msg_type *) buf); |
1087 | 1087 | ||
1088 | case REMOTE_NDIS_HALT_MSG: | 1088 | case REMOTE_NDIS_HALT_MSG: |
1089 | DBG("%s: REMOTE_NDIS_HALT_MSG\n", | 1089 | DBG("%s: REMOTE_NDIS_HALT_MSG\n", |
1090 | __FUNCTION__ ); | 1090 | __func__ ); |
1091 | params->state = RNDIS_UNINITIALIZED; | 1091 | params->state = RNDIS_UNINITIALIZED; |
1092 | if (params->dev) { | 1092 | if (params->dev) { |
1093 | netif_carrier_off (params->dev); | 1093 | netif_carrier_off (params->dev); |
@@ -1105,7 +1105,7 @@ int rndis_msg_parser (u8 configNr, u8 *buf) | |||
1105 | 1105 | ||
1106 | case REMOTE_NDIS_RESET_MSG: | 1106 | case REMOTE_NDIS_RESET_MSG: |
1107 | DBG("%s: REMOTE_NDIS_RESET_MSG\n", | 1107 | DBG("%s: REMOTE_NDIS_RESET_MSG\n", |
1108 | __FUNCTION__ ); | 1108 | __func__ ); |
1109 | return rndis_reset_response (configNr, | 1109 | return rndis_reset_response (configNr, |
1110 | (rndis_reset_msg_type *) buf); | 1110 | (rndis_reset_msg_type *) buf); |
1111 | 1111 | ||
@@ -1113,7 +1113,7 @@ int rndis_msg_parser (u8 configNr, u8 *buf) | |||
1113 | /* For USB: host does this every 5 seconds */ | 1113 | /* For USB: host does this every 5 seconds */ |
1114 | if (rndis_debug > 1) | 1114 | if (rndis_debug > 1) |
1115 | DBG("%s: REMOTE_NDIS_KEEPALIVE_MSG\n", | 1115 | DBG("%s: REMOTE_NDIS_KEEPALIVE_MSG\n", |
1116 | __FUNCTION__ ); | 1116 | __func__ ); |
1117 | return rndis_keepalive_response (configNr, | 1117 | return rndis_keepalive_response (configNr, |
1118 | (rndis_keepalive_msg_type *) | 1118 | (rndis_keepalive_msg_type *) |
1119 | buf); | 1119 | buf); |
@@ -1124,7 +1124,7 @@ int rndis_msg_parser (u8 configNr, u8 *buf) | |||
1124 | * suspending itself. | 1124 | * suspending itself. |
1125 | */ | 1125 | */ |
1126 | pr_warning("%s: unknown RNDIS message 0x%08X len %d\n", | 1126 | pr_warning("%s: unknown RNDIS message 0x%08X len %d\n", |
1127 | __FUNCTION__ , MsgType, MsgLength); | 1127 | __func__ , MsgType, MsgLength); |
1128 | { | 1128 | { |
1129 | unsigned i; | 1129 | unsigned i; |
1130 | for (i = 0; i < MsgLength; i += 16) { | 1130 | for (i = 0; i < MsgLength; i += 16) { |
@@ -1159,7 +1159,7 @@ int rndis_register (int (* rndis_control_ack) (struct net_device *)) | |||
1159 | if (!rndis_per_dev_params [i].used) { | 1159 | if (!rndis_per_dev_params [i].used) { |
1160 | rndis_per_dev_params [i].used = 1; | 1160 | rndis_per_dev_params [i].used = 1; |
1161 | rndis_per_dev_params [i].ack = rndis_control_ack; | 1161 | rndis_per_dev_params [i].ack = rndis_control_ack; |
1162 | DBG("%s: configNr = %d\n", __FUNCTION__, i); | 1162 | DBG("%s: configNr = %d\n", __func__, i); |
1163 | return i; | 1163 | return i; |
1164 | } | 1164 | } |
1165 | } | 1165 | } |
@@ -1170,7 +1170,7 @@ int rndis_register (int (* rndis_control_ack) (struct net_device *)) | |||
1170 | 1170 | ||
1171 | void rndis_deregister (int configNr) | 1171 | void rndis_deregister (int configNr) |
1172 | { | 1172 | { |
1173 | DBG("%s: \n", __FUNCTION__ ); | 1173 | DBG("%s: \n", __func__ ); |
1174 | 1174 | ||
1175 | if (configNr >= RNDIS_MAX_CONFIGS) return; | 1175 | if (configNr >= RNDIS_MAX_CONFIGS) return; |
1176 | rndis_per_dev_params [configNr].used = 0; | 1176 | rndis_per_dev_params [configNr].used = 0; |
@@ -1182,7 +1182,7 @@ int rndis_set_param_dev (u8 configNr, struct net_device *dev, | |||
1182 | struct net_device_stats *stats, | 1182 | struct net_device_stats *stats, |
1183 | u16 *cdc_filter) | 1183 | u16 *cdc_filter) |
1184 | { | 1184 | { |
1185 | DBG("%s:\n", __FUNCTION__ ); | 1185 | DBG("%s:\n", __func__ ); |
1186 | if (!dev || !stats) return -1; | 1186 | if (!dev || !stats) return -1; |
1187 | if (configNr >= RNDIS_MAX_CONFIGS) return -1; | 1187 | if (configNr >= RNDIS_MAX_CONFIGS) return -1; |
1188 | 1188 | ||
@@ -1195,7 +1195,7 @@ int rndis_set_param_dev (u8 configNr, struct net_device *dev, | |||
1195 | 1195 | ||
1196 | int rndis_set_param_vendor (u8 configNr, u32 vendorID, const char *vendorDescr) | 1196 | int rndis_set_param_vendor (u8 configNr, u32 vendorID, const char *vendorDescr) |
1197 | { | 1197 | { |
1198 | DBG("%s:\n", __FUNCTION__ ); | 1198 | DBG("%s:\n", __func__ ); |
1199 | if (!vendorDescr) return -1; | 1199 | if (!vendorDescr) return -1; |
1200 | if (configNr >= RNDIS_MAX_CONFIGS) return -1; | 1200 | if (configNr >= RNDIS_MAX_CONFIGS) return -1; |
1201 | 1201 | ||
@@ -1207,7 +1207,7 @@ int rndis_set_param_vendor (u8 configNr, u32 vendorID, const char *vendorDescr) | |||
1207 | 1207 | ||
1208 | int rndis_set_param_medium (u8 configNr, u32 medium, u32 speed) | 1208 | int rndis_set_param_medium (u8 configNr, u32 medium, u32 speed) |
1209 | { | 1209 | { |
1210 | DBG("%s: %u %u\n", __FUNCTION__, medium, speed); | 1210 | DBG("%s: %u %u\n", __func__, medium, speed); |
1211 | if (configNr >= RNDIS_MAX_CONFIGS) return -1; | 1211 | if (configNr >= RNDIS_MAX_CONFIGS) return -1; |
1212 | 1212 | ||
1213 | rndis_per_dev_params [configNr].medium = medium; | 1213 | rndis_per_dev_params [configNr].medium = medium; |
@@ -1415,7 +1415,7 @@ int __init rndis_init (void) | |||
1415 | if (!(rndis_connect_state [i] | 1415 | if (!(rndis_connect_state [i] |
1416 | = create_proc_entry (name, 0660, NULL))) | 1416 | = create_proc_entry (name, 0660, NULL))) |
1417 | { | 1417 | { |
1418 | DBG("%s :remove entries", __FUNCTION__); | 1418 | DBG("%s :remove entries", __func__); |
1419 | while (i) { | 1419 | while (i) { |
1420 | sprintf (name, NAME_TEMPLATE, --i); | 1420 | sprintf (name, NAME_TEMPLATE, --i); |
1421 | remove_proc_entry (name, NULL); | 1421 | remove_proc_entry (name, NULL); |