staging: wilc1000: remove use of 'src_addr' element in 'wilc_vif' struct
authorAjay Singh <ajay.kathat@microchip.com>
Wed, 26 Jun 2019 12:41:01 +0000 (12:41 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 1 Jul 2019 07:01:41 +0000 (09:01 +0200)
Remove use of 'src_addr' element in wilc_vif, as the same information
already copied to net_device->dev_addr.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wilc1000/wilc_netdev.c
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
drivers/staging/wilc1000/wilc_wfi_netdevice.h

index 0af60b2f9f6dc9ea9a4a55a0e577e20fe5ff2c06..565e2b5d06164c1f648b0d482484336149998142 100644 (file)
@@ -638,8 +638,7 @@ static int wilc_mac_open(struct net_device *ndev)
 
        wilc_get_mac_address(vif, mac_add);
        netdev_dbg(ndev, "Mac address: %pM\n", mac_add);
-       memcpy(vif->src_addr, mac_add, ETH_ALEN);
-       memcpy(ndev->dev_addr, vif->src_addr, ETH_ALEN);
+       ether_addr_copy(ndev->dev_addr, mac_add);
 
        if (!is_valid_ether_addr(ndev->dev_addr)) {
                netdev_err(ndev, "Wrong MAC address\n");
index 1580909604f2f5f89eb9f96aa724cfa2df6c4968..d72fdd333050cd45042237942f794a41f9d7ffa9 100644 (file)
@@ -1499,7 +1499,7 @@ static int start_ap(struct wiphy *wiphy, struct net_device *dev,
        if (ret != 0)
                netdev_err(dev, "Error in setting channel\n");
 
-       wilc_wlan_set_bssid(dev, vif->src_addr, WILC_AP_MODE);
+       wilc_wlan_set_bssid(dev, dev->dev_addr, WILC_AP_MODE);
        wilc_set_power_mgmt(vif, 0, 0);
 
        return wilc_add_beacon(vif, settings->beacon_interval,
index d5d830d738e63fc268718437a599990f6c471109..e28c8de8fd0569a5535687ccde6c7946ee74684a 100644 (file)
@@ -198,7 +198,6 @@ struct wilc_vif {
        struct frame_reg frame_reg[NUM_REG_FRAME];
        struct net_device_stats netstats;
        struct wilc *wilc;
-       u8 src_addr[ETH_ALEN];
        u8 bssid[ETH_ALEN];
        struct host_if_drv *hif_drv;
        struct net_device *ndev;