Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 179116
b: refs/heads/master
c: ca777f9
h: refs/heads/master
v: v3
  • Loading branch information
Bruce Allan authored and David S. Miller committed Jan 8, 2010
1 parent 576866e commit be0e764
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f464ba87fe7f346e270239354eb0d38f7a3b3e6b
refs/heads/master: ca777f9c098f1ea1c9ec61318cc909d0c8f465e1
16 changes: 9 additions & 7 deletions trunk/drivers/net/e1000e/lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -2301,20 +2301,22 @@ bool e1000e_enable_tx_pkt_filtering(struct e1000_hw *hw)
s32 ret_val, hdr_csum, csum;
u8 i, len;

hw->mac.tx_pkt_filtering = true;

/* No manageability, no filtering */
if (!e1000e_check_mng_mode(hw)) {
hw->mac.tx_pkt_filtering = false;
return 0;
goto out;
}

/*
* If we can't read from the host interface for whatever
* reason, disable filtering.
*/
ret_val = e1000_mng_enable_host_if(hw);
if (ret_val != 0) {
if (ret_val) {
hw->mac.tx_pkt_filtering = false;
return ret_val;
goto out;
}

/* Read in the header. Length and offset are in dwords. */
Expand All @@ -2333,17 +2335,17 @@ bool e1000e_enable_tx_pkt_filtering(struct e1000_hw *hw)
*/
if ((hdr_csum != csum) || (hdr->signature != E1000_IAMT_SIGNATURE)) {
hw->mac.tx_pkt_filtering = true;
return 1;
goto out;
}

/* Cookie area is valid, make the final check for filtering. */
if (!(hdr->status & E1000_MNG_DHCP_COOKIE_STATUS_PARSING)) {
hw->mac.tx_pkt_filtering = false;
return 0;
goto out;
}

hw->mac.tx_pkt_filtering = true;
return 1;
out:
return hw->mac.tx_pkt_filtering;
}

/**
Expand Down

0 comments on commit be0e764

Please sign in to comment.