Skip to content

Commit

Permalink
cmd: mii: don't check address for 'device' subcommand
Browse files Browse the repository at this point in the history
All mii operations require a valid PHY address except the 'device'
command, which expects the PHY name rather than the address.

Signed-off-by: Hector Palacios <[email protected]>
Acked-by: Joe Hershberger <[email protected]>
  • Loading branch information
hpalacio authored and jhershbe committed Oct 24, 2018
1 parent 1ed3c09 commit fb265a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/mii.c
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ static int do_mii(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
mask = simple_strtoul(argv[5], NULL, 16);
}

if (addrhi > 31) {
if (addrhi > 31 && strncmp(op, "de", 2)) {
printf("Incorrect PHY address. Range should be 0-31\n");
return CMD_RET_USAGE;
}
Expand Down

0 comments on commit fb265a7

Please sign in to comment.