- if ((NULL != tmp) && (12 <= strlen(tmp))) {
- int i;
- /* convert MAC from string to int */
- for (i = 0; i < 6; i++) {
- ethaddr[i] = tmp ? simple_strtoul(tmp, &end, 16) : 0;
- if (tmp)
- tmp = (*end) ? end + 1 : end;
- }
- } else if (fec_get_hwaddr(edev, ethaddr) == 0) {