Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 150070
b: refs/heads/master
c: a8c3083
h: refs/heads/master
v: v3
  • Loading branch information
Ben Hutchings authored and David S. Miller committed Apr 30, 2009
1 parent 59c91d2 commit b2f55b4
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 44c22ee91b56d7cad3b48c439dd96aad2e910fbc
refs/heads/master: a8c30832b5b12e5d4e9d1c20cdac3cc2880e08b8
16 changes: 16 additions & 0 deletions trunk/include/linux/mii.h
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,22 @@ static inline unsigned int mii_duplex (unsigned int duplex_lock,
return 0;
}

/**
* mii_advertise_flowctrl - get flow control advertisement flags
* @cap: Flow control capabilities (FLOW_CTRL_RX, FLOW_CTRL_TX or both)
*/
static inline u16 mii_advertise_flowctrl(int cap)
{
u16 adv = 0;

if (cap & FLOW_CTRL_RX)
adv = ADVERTISE_PAUSE_CAP | ADVERTISE_PAUSE_ASYM;
if (cap & FLOW_CTRL_TX)
adv ^= ADVERTISE_PAUSE_ASYM;

return adv;
}

/**
* mii_resolve_flowctrl_fdx
* @lcladv: value of MII ADVERTISE register
Expand Down

0 comments on commit b2f55b4

Please sign in to comment.