diff options
author | Joe Perches <joe@perches.com> | 2010-01-12 15:59:13 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-01-13 23:37:01 -0500 |
commit | 37fce430dd66a6251bde6ef0004a1da69b26c028 (patch) | |
tree | cf21987db4b818e8e515f9e707f3b272637de294 /drivers/net/tlan.c | |
parent | a60389abaab92213c79790e074ff6bc36ac0ebe5 (diff) |
drivers/net/tlan: Remove TRUE/FALSE defines, use bool
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/tlan.c')
-rw-r--r-- | drivers/net/tlan.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/drivers/net/tlan.c b/drivers/net/tlan.c index 613943eb6e75..3ec31dce99f9 100644 --- a/drivers/net/tlan.c +++ b/drivers/net/tlan.c | |||
@@ -338,7 +338,7 @@ static int TLan_PhyInternalService( struct net_device * ); | |||
338 | static int TLan_PhyDp83840aCheck( struct net_device * ); | 338 | static int TLan_PhyDp83840aCheck( struct net_device * ); |
339 | */ | 339 | */ |
340 | 340 | ||
341 | static int TLan_MiiReadReg( struct net_device *, u16, u16, u16 * ); | 341 | static bool TLan_MiiReadReg( struct net_device *, u16, u16, u16 * ); |
342 | static void TLan_MiiSendData( u16, u32, unsigned ); | 342 | static void TLan_MiiSendData( u16, u32, unsigned ); |
343 | static void TLan_MiiSync( u16 ); | 343 | static void TLan_MiiSync( u16 ); |
344 | static void TLan_MiiWriteReg( struct net_device *, u16, u16, u16 ); | 344 | static void TLan_MiiWriteReg( struct net_device *, u16, u16, u16 ); |
@@ -2204,7 +2204,7 @@ TLan_ResetAdapter( struct net_device *dev ) | |||
2204 | u32 data; | 2204 | u32 data; |
2205 | u8 data8; | 2205 | u8 data8; |
2206 | 2206 | ||
2207 | priv->tlanFullDuplex = FALSE; | 2207 | priv->tlanFullDuplex = false; |
2208 | priv->phyOnline=0; | 2208 | priv->phyOnline=0; |
2209 | netif_carrier_off(dev); | 2209 | netif_carrier_off(dev); |
2210 | 2210 | ||
@@ -2259,7 +2259,7 @@ TLan_ResetAdapter( struct net_device *dev ) | |||
2259 | TLan_DioWrite8( dev->base_addr, TLAN_ACOMMIT, 0x0a ); | 2259 | TLan_DioWrite8( dev->base_addr, TLAN_ACOMMIT, 0x0a ); |
2260 | } else if ( priv->duplex == TLAN_DUPLEX_FULL ) { | 2260 | } else if ( priv->duplex == TLAN_DUPLEX_FULL ) { |
2261 | TLan_DioWrite8( dev->base_addr, TLAN_ACOMMIT, 0x00 ); | 2261 | TLan_DioWrite8( dev->base_addr, TLAN_ACOMMIT, 0x00 ); |
2262 | priv->tlanFullDuplex = TRUE; | 2262 | priv->tlanFullDuplex = true; |
2263 | } else { | 2263 | } else { |
2264 | TLan_DioWrite8( dev->base_addr, TLAN_ACOMMIT, 0x08 ); | 2264 | TLan_DioWrite8( dev->base_addr, TLAN_ACOMMIT, 0x08 ); |
2265 | } | 2265 | } |
@@ -2651,14 +2651,14 @@ static void TLan_PhyStartLink( struct net_device *dev ) | |||
2651 | TLan_MiiWriteReg( dev, phy, MII_GEN_CTL, 0x0000); | 2651 | TLan_MiiWriteReg( dev, phy, MII_GEN_CTL, 0x0000); |
2652 | } else if ( priv->speed == TLAN_SPEED_10 && | 2652 | } else if ( priv->speed == TLAN_SPEED_10 && |
2653 | priv->duplex == TLAN_DUPLEX_FULL) { | 2653 | priv->duplex == TLAN_DUPLEX_FULL) { |
2654 | priv->tlanFullDuplex = TRUE; | 2654 | priv->tlanFullDuplex = true; |
2655 | TLan_MiiWriteReg( dev, phy, MII_GEN_CTL, 0x0100); | 2655 | TLan_MiiWriteReg( dev, phy, MII_GEN_CTL, 0x0100); |
2656 | } else if ( priv->speed == TLAN_SPEED_100 && | 2656 | } else if ( priv->speed == TLAN_SPEED_100 && |
2657 | priv->duplex == TLAN_DUPLEX_HALF) { | 2657 | priv->duplex == TLAN_DUPLEX_HALF) { |
2658 | TLan_MiiWriteReg( dev, phy, MII_GEN_CTL, 0x2000); | 2658 | TLan_MiiWriteReg( dev, phy, MII_GEN_CTL, 0x2000); |
2659 | } else if ( priv->speed == TLAN_SPEED_100 && | 2659 | } else if ( priv->speed == TLAN_SPEED_100 && |
2660 | priv->duplex == TLAN_DUPLEX_FULL) { | 2660 | priv->duplex == TLAN_DUPLEX_FULL) { |
2661 | priv->tlanFullDuplex = TRUE; | 2661 | priv->tlanFullDuplex = true; |
2662 | TLan_MiiWriteReg( dev, phy, MII_GEN_CTL, 0x2100); | 2662 | TLan_MiiWriteReg( dev, phy, MII_GEN_CTL, 0x2100); |
2663 | } else { | 2663 | } else { |
2664 | 2664 | ||
@@ -2695,7 +2695,7 @@ static void TLan_PhyStartLink( struct net_device *dev ) | |||
2695 | tctl &= ~TLAN_TC_AUISEL; | 2695 | tctl &= ~TLAN_TC_AUISEL; |
2696 | if ( priv->duplex == TLAN_DUPLEX_FULL ) { | 2696 | if ( priv->duplex == TLAN_DUPLEX_FULL ) { |
2697 | control |= MII_GC_DUPLEX; | 2697 | control |= MII_GC_DUPLEX; |
2698 | priv->tlanFullDuplex = TRUE; | 2698 | priv->tlanFullDuplex = true; |
2699 | } | 2699 | } |
2700 | if ( priv->speed == TLAN_SPEED_100 ) { | 2700 | if ( priv->speed == TLAN_SPEED_100 ) { |
2701 | control |= MII_GC_SPEEDSEL; | 2701 | control |= MII_GC_SPEEDSEL; |
@@ -2750,9 +2750,9 @@ static void TLan_PhyFinishAutoNeg( struct net_device *dev ) | |||
2750 | TLan_MiiReadReg( dev, phy, MII_AN_LPA, &an_lpa ); | 2750 | TLan_MiiReadReg( dev, phy, MII_AN_LPA, &an_lpa ); |
2751 | mode = an_adv & an_lpa & 0x03E0; | 2751 | mode = an_adv & an_lpa & 0x03E0; |
2752 | if ( mode & 0x0100 ) { | 2752 | if ( mode & 0x0100 ) { |
2753 | priv->tlanFullDuplex = TRUE; | 2753 | priv->tlanFullDuplex = true; |
2754 | } else if ( ! ( mode & 0x0080 ) && ( mode & 0x0040 ) ) { | 2754 | } else if ( ! ( mode & 0x0080 ) && ( mode & 0x0040 ) ) { |
2755 | priv->tlanFullDuplex = TRUE; | 2755 | priv->tlanFullDuplex = true; |
2756 | } | 2756 | } |
2757 | 2757 | ||
2758 | if ( ( ! ( mode & 0x0180 ) ) && | 2758 | if ( ( ! ( mode & 0x0180 ) ) && |
@@ -2855,8 +2855,8 @@ void TLan_PhyMonitor( struct net_device *dev ) | |||
2855 | * TLan_MiiReadReg | 2855 | * TLan_MiiReadReg |
2856 | * | 2856 | * |
2857 | * Returns: | 2857 | * Returns: |
2858 | * 0 if ack received ok | 2858 | * false if ack received ok |
2859 | * 1 otherwise. | 2859 | * true if no ack received or other error |
2860 | * | 2860 | * |
2861 | * Parms: | 2861 | * Parms: |
2862 | * dev The device structure containing | 2862 | * dev The device structure containing |
@@ -2875,17 +2875,17 @@ void TLan_PhyMonitor( struct net_device *dev ) | |||
2875 | * | 2875 | * |
2876 | **************************************************************/ | 2876 | **************************************************************/ |
2877 | 2877 | ||
2878 | static int TLan_MiiReadReg( struct net_device *dev, u16 phy, u16 reg, u16 *val ) | 2878 | static bool TLan_MiiReadReg( struct net_device *dev, u16 phy, u16 reg, u16 *val ) |
2879 | { | 2879 | { |
2880 | u8 nack; | 2880 | u8 nack; |
2881 | u16 sio, tmp; | 2881 | u16 sio, tmp; |
2882 | u32 i; | 2882 | u32 i; |
2883 | int err; | 2883 | bool err; |
2884 | int minten; | 2884 | int minten; |
2885 | TLanPrivateInfo *priv = netdev_priv(dev); | 2885 | TLanPrivateInfo *priv = netdev_priv(dev); |
2886 | unsigned long flags = 0; | 2886 | unsigned long flags = 0; |
2887 | 2887 | ||
2888 | err = FALSE; | 2888 | err = false; |
2889 | outw(TLAN_NET_SIO, dev->base_addr + TLAN_DIO_ADR); | 2889 | outw(TLAN_NET_SIO, dev->base_addr + TLAN_DIO_ADR); |
2890 | sio = dev->base_addr + TLAN_DIO_DATA + TLAN_NET_SIO; | 2890 | sio = dev->base_addr + TLAN_DIO_DATA + TLAN_NET_SIO; |
2891 | 2891 | ||
@@ -2918,7 +2918,7 @@ static int TLan_MiiReadReg( struct net_device *dev, u16 phy, u16 reg, u16 *val ) | |||
2918 | TLan_SetBit(TLAN_NET_SIO_MCLK, sio); | 2918 | TLan_SetBit(TLAN_NET_SIO_MCLK, sio); |
2919 | } | 2919 | } |
2920 | tmp = 0xffff; | 2920 | tmp = 0xffff; |
2921 | err = TRUE; | 2921 | err = true; |
2922 | } else { /* ACK, so read data */ | 2922 | } else { /* ACK, so read data */ |
2923 | for (tmp = 0, i = 0x8000; i; i >>= 1) { | 2923 | for (tmp = 0, i = 0x8000; i; i >>= 1) { |
2924 | TLan_ClearBit(TLAN_NET_SIO_MCLK, sio); | 2924 | TLan_ClearBit(TLAN_NET_SIO_MCLK, sio); |