Commit 385b35ab authored by Philipp Hortmann's avatar Philipp Hortmann Committed by Greg Kroah-Hartman

staging: vt6655: Use loop in vt6655_mac_write_bssid_addr

Use loop in vt6655_mac_write_bssid_addr to avoid multiple
similar statements.
Signed-off-by: default avatarPhilipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/b3b93ae7ce41562565e9007eb4580b9c47a2881f.1657134099.git.philipp.g.hortmann@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3deb12ea
......@@ -192,12 +192,8 @@ device_set_options(struct vnt_private *priv)
static void vt6655_mac_write_bssid_addr(void __iomem *iobase, const u8 *mac_addr)
{
iowrite8(1, iobase + MAC_REG_PAGE1SEL);
iowrite8(mac_addr[0], iobase + MAC_REG_BSSID0);
iowrite8(mac_addr[1], iobase + MAC_REG_BSSID0 + 1);
iowrite8(mac_addr[2], iobase + MAC_REG_BSSID0 + 2);
iowrite8(mac_addr[3], iobase + MAC_REG_BSSID0 + 3);
iowrite8(mac_addr[4], iobase + MAC_REG_BSSID0 + 4);
iowrite8(mac_addr[5], iobase + MAC_REG_BSSID0 + 5);
for (int i = 0; i < 6; i++)
iowrite8(mac_addr[i], iobase + MAC_REG_BSSID0 + i);
iowrite8(0, iobase + MAC_REG_PAGE1SEL);
}
......
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