Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 203690
b: refs/heads/master
c: 5c4ac8c
h: refs/heads/master
v: v3
  • Loading branch information
Andy Shevchenko authored and David S. Miller committed Jul 23, 2010
1 parent a72b108 commit 4d58a39
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 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: 2b27822ff8f257f810761c3d23e8104d1404cf3b
refs/heads/master: 5c4ac8c60aba4b2e9549d139586612855b0fea09
11 changes: 5 additions & 6 deletions trunk/drivers/net/ksz884x.c
Original file line number Diff line number Diff line change
Expand Up @@ -6894,13 +6894,12 @@ static void get_mac_addr(struct dev_info *hw_priv, u8 *macaddr, int port)
i = j = num = got_num = 0;
while (j < MAC_ADDR_LEN) {
if (macaddr[i]) {
int digit;

got_num = 1;
if ('0' <= macaddr[i] && macaddr[i] <= '9')
num = num * 16 + macaddr[i] - '0';
else if ('A' <= macaddr[i] && macaddr[i] <= 'F')
num = num * 16 + 10 + macaddr[i] - 'A';
else if ('a' <= macaddr[i] && macaddr[i] <= 'f')
num = num * 16 + 10 + macaddr[i] - 'a';
digit = hex_to_bin(macaddr[i]);
if (digit >= 0)
num = num * 16 + digit;
else if (':' == macaddr[i])
got_num = 2;
else
Expand Down

0 comments on commit 4d58a39

Please sign in to comment.