diff options
author | Ajay Singh <ajay.kathat@microchip.com> | 2019-06-26 12:41:01 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-07-01 09:01:41 +0200 |
commit | 39cf54fc6af3d573f2e9bb9526376f34f5126f3d (patch) | |
tree | cb1f502b35f50a7f76a84ce5e938b41da554df32 /drivers/staging/wilc1000 | |
parent | 264a472d29b8843c979a361abcf2f324bcb045cf (diff) |
staging: wilc1000: remove use of 'src_addr' element in 'wilc_vif' struct
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>
Diffstat (limited to 'drivers/staging/wilc1000')
-rw-r--r-- | drivers/staging/wilc1000/wilc_netdev.c | 3 | ||||
-rw-r--r-- | drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 2 | ||||
-rw-r--r-- | drivers/staging/wilc1000/wilc_wfi_netdevice.h | 1 |
3 files changed, 2 insertions, 4 deletions
diff --git a/drivers/staging/wilc1000/wilc_netdev.c b/drivers/staging/wilc1000/wilc_netdev.c index 0af60b2f9f6d..565e2b5d0616 100644 --- a/drivers/staging/wilc1000/wilc_netdev.c +++ b/drivers/staging/wilc1000/wilc_netdev.c @@ -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"); diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c index 1580909604f2..d72fdd333050 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c @@ -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, diff --git a/drivers/staging/wilc1000/wilc_wfi_netdevice.h b/drivers/staging/wilc1000/wilc_wfi_netdevice.h index d5d830d738e6..e28c8de8fd05 100644 --- a/drivers/staging/wilc1000/wilc_wfi_netdevice.h +++ b/drivers/staging/wilc1000/wilc_wfi_netdevice.h @@ -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; |