staging: vt6655: inherit addr_assign_type along with dev_addr
authorBjørn Mork <bjorn@mork.no>
Fri, 30 Aug 2013 16:08:52 +0000 (18:08 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 4 Sep 2013 00:57:50 +0000 (20:57 -0400)
A device inheriting a random or set address should reflect this in
its addr_assign_type.

Cc: Forest Bond <forest@alittletooquiet.net>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/staging/vt6655/hostap.c
drivers/staging/vt6655/ioctl.c
drivers/staging/vt6655/wpactl.c

index 57a08c5771f29fd93568fe6fdc0a4d841dbed218..8acff44a9e753f38481a8b74c6c20a3b62d7f452 100644 (file)
@@ -86,7 +86,7 @@ static int hostap_enable_hostapd(PSDevice pDevice, int rtnl_locked)
 
        apdev_priv = netdev_priv(pDevice->apdev);
        *apdev_priv = *pDevice;
-       memcpy(pDevice->apdev->dev_addr, dev->dev_addr, ETH_ALEN);
+       eth_hw_addr_inherit(pDevice->apdev, dev);
 
        pDevice->apdev->netdev_ops = &apdev_netdev_ops;
 
index 46e0e41e7e6084ddbfbd369bd410a14a3ff73dec..b5cd2e44e53dac9079c9964bdbe97cc10fb2c907 100644 (file)
@@ -460,7 +460,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq)
                }
                if (sValue.dwValue == 1) {
                        DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "up wpadev\n");
-                       memcpy(pDevice->wpadev->dev_addr, pDevice->dev->dev_addr, ETH_ALEN);
+                       eth_hw_addr_inherit(pDevice->wpadev, pDevice->dev);
                        pDevice->bWPADEVUp = true;
                } else {
                        DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "close wpadev\n");
index 869f62c678e60c1e67f4d624fc5a724fe733be1e..e8d9ecd2913aa32d512e94ddc3ef0fb522904fa2 100644 (file)
@@ -96,7 +96,7 @@ static int wpa_init_wpadev(PSDevice pDevice)
 
        wpadev_priv = netdev_priv(pDevice->wpadev);
        *wpadev_priv = *pDevice;
-       memcpy(pDevice->wpadev->dev_addr, dev->dev_addr, ETH_ALEN);
+       eth_hw_addr_inherit(pDevice->wpadev, dev);
        pDevice->wpadev->base_addr = dev->base_addr;
        pDevice->wpadev->irq = dev->irq;
        pDevice->wpadev->mem_start = dev->mem_start;