diff options
| author | John Livingston <john.livingston@twosixlabs.com> | 2017-11-15 15:42:06 -0500 |
|---|---|---|
| committer | John Livingston <john.livingston@twosixlabs.com> | 2017-11-15 16:03:17 -0500 |
| commit | 2d7472393e1adcb5b842597dd0478e06eeeb1742 (patch) | |
| tree | b82dfe42530ed7a2080c190aaa1089a38ea9dcef | |
| parent | dceef471f223dbea9d87fdbec98c5e05d961758d (diff) | |
macaddrsetup: Correct WLAN MAC address format
The macaddrsetup service writes the WLAN MAC address to a file in /data
so it can be read by the kernel driver later in boot. Unfortunately the
file output by the service doesn't match the format the kernel is
expecting, so the driver silently goes on to make up a MAC for the
interface. This corrects the format of the file to match the kernel.
| -rw-r--r-- | macaddrsetup.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/macaddrsetup.c b/macaddrsetup.c index 687890c..03703a5 100644 --- a/macaddrsetup.c +++ b/macaddrsetup.c @@ -109,8 +109,8 @@ int main(int argc, char **argv) exit(1); } - ret = fprintf(fpw, "%02x:%02x:%02x:%02x:%02x:%02x\n", buf[5], buf[4], buf[3], buf[2], buf[1], buf[0]); - if (ret != 18) { + ret = fprintf(fpw, "Intf0MacAddress=%02X%02X%02X%02X%02X%02X\nEND\n", buf[5], buf[4], buf[3], buf[2], buf[1], buf[0]); + if (ret != 33) { SLOGE("failed to write WLAN mac address\n"); ta_close(); fclose(fpw); |
