Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 45736
b: refs/heads/master
c: 4e996b3
h: refs/heads/master
v: v3
  • Loading branch information
Thomas Klein authored and Jeff Garzik committed Jan 23, 2007
1 parent 192660a commit 1c3e2db
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 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: e919b5938b11e1d48a6dcdcb2860e890a954f10d
refs/heads/master: 4e996b32e0585756c335b35980dc68852c33f297
15 changes: 14 additions & 1 deletion trunk/drivers/net/ehea/ehea_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2269,6 +2269,8 @@ static void ehea_tx_watchdog(struct net_device *dev)
int ehea_sense_adapter_attr(struct ehea_adapter *adapter)
{
struct hcp_query_ehea *cb;
struct device_node *lhea_dn = NULL;
struct device_node *eth_dn = NULL;
u64 hret;
int ret;

Expand All @@ -2285,7 +2287,18 @@ int ehea_sense_adapter_attr(struct ehea_adapter *adapter)
goto out_herr;
}

adapter->num_ports = cb->num_ports;
/* Determine the number of available logical ports
* by counting the child nodes of the lhea OFDT entry
*/
adapter->num_ports = 0;
lhea_dn = of_find_node_by_name(lhea_dn, "lhea");
do {
eth_dn = of_get_next_child(lhea_dn, eth_dn);
if (eth_dn)
adapter->num_ports++;
} while ( eth_dn );
of_node_put(lhea_dn);

adapter->max_mc_mac = cb->max_mc_mac - 1;
ret = 0;

Expand Down

0 comments on commit 1c3e2db

Please sign in to comment.