aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000e/lib.c
diff options
context:
space:
mode:
authorBruce Allan <bruce.w.allan@intel.com>2009-11-20 18:26:44 -0500
committerDavid S. Miller <davem@davemloft.net>2009-11-21 14:34:18 -0500
commit564ea9bba1a1380d5474504bcd943ee84075534f (patch)
tree8378c606230b63ad403927ba4018fb2eb588efb6 /drivers/net/e1000e/lib.c
parent84efb7b968ab91d0099620865b3f563eb0ddf5a6 (diff)
e1000e: set bools to true/false instead of 1/0
Set booleans to 'true' or 'false' to make it clear it is a boolean. Also change instances of TRUE/FALSE in comments to lowercase true/false. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/e1000e/lib.c')
-rw-r--r--drivers/net/e1000e/lib.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/net/e1000e/lib.c b/drivers/net/e1000e/lib.c
index 0c6ad0e67175..d173bf88cc94 100644
--- a/drivers/net/e1000e/lib.c
+++ b/drivers/net/e1000e/lib.c
@@ -371,7 +371,7 @@ s32 e1000e_check_for_copper_link(struct e1000_hw *hw)
371 if (!link) 371 if (!link)
372 return ret_val; /* No link detected */ 372 return ret_val; /* No link detected */
373 373
374 mac->get_link_status = 0; 374 mac->get_link_status = false;
375 375
376 /* 376 /*
377 * Check if there was DownShift, must be checked 377 * Check if there was DownShift, must be checked
@@ -1603,7 +1603,7 @@ void e1000e_reset_adaptive(struct e1000_hw *hw)
1603 mac->ifs_step_size = IFS_STEP; 1603 mac->ifs_step_size = IFS_STEP;
1604 mac->ifs_ratio = IFS_RATIO; 1604 mac->ifs_ratio = IFS_RATIO;
1605 1605
1606 mac->in_ifs_mode = 0; 1606 mac->in_ifs_mode = false;
1607 ew32(AIT, 0); 1607 ew32(AIT, 0);
1608} 1608}
1609 1609
@@ -1620,7 +1620,7 @@ void e1000e_update_adaptive(struct e1000_hw *hw)
1620 1620
1621 if ((mac->collision_delta * mac->ifs_ratio) > mac->tx_packet_delta) { 1621 if ((mac->collision_delta * mac->ifs_ratio) > mac->tx_packet_delta) {
1622 if (mac->tx_packet_delta > MIN_NUM_XMITS) { 1622 if (mac->tx_packet_delta > MIN_NUM_XMITS) {
1623 mac->in_ifs_mode = 1; 1623 mac->in_ifs_mode = true;
1624 if (mac->current_ifs_val < mac->ifs_max_val) { 1624 if (mac->current_ifs_val < mac->ifs_max_val) {
1625 if (!mac->current_ifs_val) 1625 if (!mac->current_ifs_val)
1626 mac->current_ifs_val = mac->ifs_min_val; 1626 mac->current_ifs_val = mac->ifs_min_val;
@@ -1634,7 +1634,7 @@ void e1000e_update_adaptive(struct e1000_hw *hw)
1634 if (mac->in_ifs_mode && 1634 if (mac->in_ifs_mode &&
1635 (mac->tx_packet_delta <= MIN_NUM_XMITS)) { 1635 (mac->tx_packet_delta <= MIN_NUM_XMITS)) {
1636 mac->current_ifs_val = 0; 1636 mac->current_ifs_val = 0;
1637 mac->in_ifs_mode = 0; 1637 mac->in_ifs_mode = false;
1638 ew32(AIT, 0); 1638 ew32(AIT, 0);
1639 } 1639 }
1640 } 1640 }
@@ -2277,7 +2277,7 @@ bool e1000e_enable_tx_pkt_filtering(struct e1000_hw *hw)
2277 2277
2278 /* No manageability, no filtering */ 2278 /* No manageability, no filtering */
2279 if (!e1000e_check_mng_mode(hw)) { 2279 if (!e1000e_check_mng_mode(hw)) {
2280 hw->mac.tx_pkt_filtering = 0; 2280 hw->mac.tx_pkt_filtering = false;
2281 return 0; 2281 return 0;
2282 } 2282 }
2283 2283
@@ -2287,7 +2287,7 @@ bool e1000e_enable_tx_pkt_filtering(struct e1000_hw *hw)
2287 */ 2287 */
2288 ret_val = e1000_mng_enable_host_if(hw); 2288 ret_val = e1000_mng_enable_host_if(hw);
2289 if (ret_val != 0) { 2289 if (ret_val != 0) {
2290 hw->mac.tx_pkt_filtering = 0; 2290 hw->mac.tx_pkt_filtering = false;
2291 return ret_val; 2291 return ret_val;
2292 } 2292 }
2293 2293
@@ -2306,17 +2306,17 @@ bool e1000e_enable_tx_pkt_filtering(struct e1000_hw *hw)
2306 * take the safe route of assuming Tx filtering is enabled. 2306 * take the safe route of assuming Tx filtering is enabled.
2307 */ 2307 */
2308 if ((hdr_csum != csum) || (hdr->signature != E1000_IAMT_SIGNATURE)) { 2308 if ((hdr_csum != csum) || (hdr->signature != E1000_IAMT_SIGNATURE)) {
2309 hw->mac.tx_pkt_filtering = 1; 2309 hw->mac.tx_pkt_filtering = true;
2310 return 1; 2310 return 1;
2311 } 2311 }
2312 2312
2313 /* Cookie area is valid, make the final check for filtering. */ 2313 /* Cookie area is valid, make the final check for filtering. */
2314 if (!(hdr->status & E1000_MNG_DHCP_COOKIE_STATUS_PARSING)) { 2314 if (!(hdr->status & E1000_MNG_DHCP_COOKIE_STATUS_PARSING)) {
2315 hw->mac.tx_pkt_filtering = 0; 2315 hw->mac.tx_pkt_filtering = false;
2316 return 0; 2316 return 0;
2317 } 2317 }
2318 2318
2319 hw->mac.tx_pkt_filtering = 1; 2319 hw->mac.tx_pkt_filtering = true;
2320 return 1; 2320 return 1;
2321} 2321}
2322 2322
@@ -2473,7 +2473,7 @@ bool e1000e_enable_mng_pass_thru(struct e1000_hw *hw)
2473{ 2473{
2474 u32 manc; 2474 u32 manc;
2475 u32 fwsm, factps; 2475 u32 fwsm, factps;
2476 bool ret_val = 0; 2476 bool ret_val = false;
2477 2477
2478 manc = er32(MANC); 2478 manc = er32(MANC);
2479 2479
@@ -2488,13 +2488,13 @@ bool e1000e_enable_mng_pass_thru(struct e1000_hw *hw)
2488 if (!(factps & E1000_FACTPS_MNGCG) && 2488 if (!(factps & E1000_FACTPS_MNGCG) &&
2489 ((fwsm & E1000_FWSM_MODE_MASK) == 2489 ((fwsm & E1000_FWSM_MODE_MASK) ==
2490 (e1000_mng_mode_pt << E1000_FWSM_MODE_SHIFT))) { 2490 (e1000_mng_mode_pt << E1000_FWSM_MODE_SHIFT))) {
2491 ret_val = 1; 2491 ret_val = true;
2492 return ret_val; 2492 return ret_val;
2493 } 2493 }
2494 } else { 2494 } else {
2495 if ((manc & E1000_MANC_SMBUS_EN) && 2495 if ((manc & E1000_MANC_SMBUS_EN) &&
2496 !(manc & E1000_MANC_ASF_EN)) { 2496 !(manc & E1000_MANC_ASF_EN)) {
2497 ret_val = 1; 2497 ret_val = true;
2498 return ret_val; 2498 return ret_val;
2499 } 2499 }
2500 } 2500 }