Skip to content
Snippets Groups Projects
Commit 8d4fcf6e authored by Anjan Chanda's avatar Anjan Chanda
Browse files

libethernet: bcm: fix port bitmap calculation

parent 1294b515
No related branches found
No related tags found
Loading
......@@ -75,7 +75,7 @@ static int bcm_eth_get_unit_port(const char *ifname, int *unit, int *port)
if (!data.port && data.port_map) {
unsigned int portmap = data.port_map;
for (i = 0; i < sizeof(portmap); i++) {
for (i = 0; i < 8 * sizeof(portmap); i++) {
if (!!(portmap & (1 << i))) {
*port = i;
break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment