diff options
author | hayeswang <hayeswang@realtek.com> | 2015-02-05 22:30:51 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-02-08 01:46:25 -0500 |
commit | f5aaaa6db62ac679ca42884cb8e22db7330cfca9 (patch) | |
tree | cf73fa0f51aa4e0ff6d67ad0b143dfe5325d0f08 | |
parent | 6e74d1749a338d1435b413a92968f7e3de7c0278 (diff) |
r8152: use BIT macro
Use BIT macro to replace (1 << bits).
Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/usb/r8152.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 24e6aef907eb..5980ac6c48dd 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/net/usb/r8152.c | |||
@@ -489,16 +489,16 @@ struct rx_desc { | |||
489 | #define RX_LEN_MASK 0x7fff | 489 | #define RX_LEN_MASK 0x7fff |
490 | 490 | ||
491 | __le32 opts2; | 491 | __le32 opts2; |
492 | #define RD_UDP_CS (1 << 23) | 492 | #define RD_UDP_CS BIT(23) |
493 | #define RD_TCP_CS (1 << 22) | 493 | #define RD_TCP_CS BIT(22) |
494 | #define RD_IPV6_CS (1 << 20) | 494 | #define RD_IPV6_CS BIT(20) |
495 | #define RD_IPV4_CS (1 << 19) | 495 | #define RD_IPV4_CS BIT(19) |
496 | 496 | ||
497 | __le32 opts3; | 497 | __le32 opts3; |
498 | #define IPF (1 << 23) /* IP checksum fail */ | 498 | #define IPF BIT(23) /* IP checksum fail */ |
499 | #define UDPF (1 << 22) /* UDP checksum fail */ | 499 | #define UDPF BIT(22) /* UDP checksum fail */ |
500 | #define TCPF (1 << 21) /* TCP checksum fail */ | 500 | #define TCPF BIT(21) /* TCP checksum fail */ |
501 | #define RX_VLAN_TAG (1 << 16) | 501 | #define RX_VLAN_TAG BIT(16) |
502 | 502 | ||
503 | __le32 opts4; | 503 | __le32 opts4; |
504 | __le32 opts5; | 504 | __le32 opts5; |
@@ -507,24 +507,24 @@ struct rx_desc { | |||
507 | 507 | ||
508 | struct tx_desc { | 508 | struct tx_desc { |
509 | __le32 opts1; | 509 | __le32 opts1; |
510 | #define TX_FS (1 << 31) /* First segment of a packet */ | 510 | #define TX_FS BIT(31) /* First segment of a packet */ |
511 | #define TX_LS (1 << 30) /* Final segment of a packet */ | 511 | #define TX_LS BIT(30) /* Final segment of a packet */ |
512 | #define GTSENDV4 (1 << 28) | 512 | #define GTSENDV4 BIT(28) |
513 | #define GTSENDV6 (1 << 27) | 513 | #define GTSENDV6 BIT(27) |
514 | #define GTTCPHO_SHIFT 18 | 514 | #define GTTCPHO_SHIFT 18 |
515 | #define GTTCPHO_MAX 0x7fU | 515 | #define GTTCPHO_MAX 0x7fU |
516 | #define TX_LEN_MAX 0x3ffffU | 516 | #define TX_LEN_MAX 0x3ffffU |
517 | 517 | ||
518 | __le32 opts2; | 518 | __le32 opts2; |
519 | #define UDP_CS (1 << 31) /* Calculate UDP/IP checksum */ | 519 | #define UDP_CS BIT(31) /* Calculate UDP/IP checksum */ |
520 | #define TCP_CS (1 << 30) /* Calculate TCP/IP checksum */ | 520 | #define TCP_CS BIT(30) /* Calculate TCP/IP checksum */ |
521 | #define IPV4_CS (1 << 29) /* Calculate IPv4 checksum */ | 521 | #define IPV4_CS BIT(29) /* Calculate IPv4 checksum */ |
522 | #define IPV6_CS (1 << 28) /* Calculate IPv6 checksum */ | 522 | #define IPV6_CS BIT(28) /* Calculate IPv6 checksum */ |
523 | #define MSS_SHIFT 17 | 523 | #define MSS_SHIFT 17 |
524 | #define MSS_MAX 0x7ffU | 524 | #define MSS_MAX 0x7ffU |
525 | #define TCPHO_SHIFT 17 | 525 | #define TCPHO_SHIFT 17 |
526 | #define TCPHO_MAX 0x7ffU | 526 | #define TCPHO_MAX 0x7ffU |
527 | #define TX_VLAN_TAG (1 << 16) | 527 | #define TX_VLAN_TAG BIT(16) |
528 | }; | 528 | }; |
529 | 529 | ||
530 | struct r8152; | 530 | struct r8152; |