Commit 30765436 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Greg Kroah-Hartman

staging: rtl8712: re-use native mac_pton() helper

There is a nice helper to parse MAC. Let's use it and remove custom
implementation.
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0dcde508
...@@ -353,11 +353,6 @@ static void disable_ht_for_spec_devid(const struct usb_device_id *pdid, ...@@ -353,11 +353,6 @@ static void disable_ht_for_spec_devid(const struct usb_device_id *pdid,
} }
} }
static u8 key_2char2num(u8 hch, u8 lch)
{
return (hex_to_bin(hch) << 4) | hex_to_bin(lch);
}
/* /*
* drv_init() - a device potentially for us * drv_init() - a device potentially for us
* *
...@@ -465,16 +460,7 @@ static int r871xu_drv_init(struct usb_interface *pusb_intf, ...@@ -465,16 +460,7 @@ static int r871xu_drv_init(struct usb_interface *pusb_intf,
r8712_efuse_pg_packet_read(padapter, offset, r8712_efuse_pg_packet_read(padapter, offset,
&pdata[i]); &pdata[i]);
if (r8712_initmac) { if (!r8712_initmac || !mac_pton(r8712_initmac, mac)) {
/* Users specify the mac address */
int jj, kk;
for (jj = 0, kk = 0; jj < ETH_ALEN;
jj++, kk += 3)
mac[jj] =
key_2char2num(r8712_initmac[kk],
r8712_initmac[kk + 1]);
} else {
/* Use the mac address stored in the Efuse /* Use the mac address stored in the Efuse
* offset = 0x12 for usb in efuse * offset = 0x12 for usb in efuse
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment