Search Linux Wireless

[PATCH 02/35] Use existing macros to find bulk in and bulk out endpoints

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Pavel Roskin <proski@xxxxxxx>
---

 drivers/net/wireless/at76_usb.c |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)


diff --git a/drivers/net/wireless/at76_usb.c b/drivers/net/wireless/at76_usb.c
index f2a74d4..be9ef6e 100644
--- a/drivers/net/wireless/at76_usb.c
+++ b/drivers/net/wireless/at76_usb.c
@@ -2045,10 +2045,7 @@ static int at76_alloc_urbs(struct at76_priv *priv,
 			 __func__,
 			 i, endpoint->bEndpointAddress, endpoint->bmAttributes);
 
-		if ((endpoint->bEndpointAddress & 0x80) &&
-		    ((endpoint->bmAttributes & 3) == 0x02)) {
-			/* we found a bulk in endpoint */
-
+		if (usb_endpoint_is_bulk_in(endpoint)) {
 			priv->read_urb = usb_alloc_urb(0, GFP_KERNEL);
 			if (!priv->read_urb) {
 				err("No free urbs available");
@@ -2058,9 +2055,7 @@ static int at76_alloc_urbs(struct at76_priv *priv,
 			    usb_rcvbulkpipe(udev, endpoint->bEndpointAddress);
 		}
 
-		if (((endpoint->bEndpointAddress & 0x80) == 0x00) &&
-		    ((endpoint->bmAttributes & 3) == 0x02)) {
-			/* we found a bulk out endpoint */
+		if (usb_endpoint_is_bulk_out(endpoint)) {
 			priv->write_urb = usb_alloc_urb(0, GFP_KERNEL);
 			if (!priv->write_urb) {
 				err("no free urbs available");
-
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux