diff options
author | Ajay Singh <ajay.kathat@microchip.com> | 2020-11-25 11:41:08 +0000 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2020-12-02 21:38:07 +0200 |
commit | c04fabacb780b6d8dbc2e7258b383d7a91f69ad9 (patch) | |
tree | bcf385954f3b3baaef5e0c4be4a546a63588d7f7 /drivers/net/wireless/microchip/wilc1000/hif.c | |
parent | 75729e110e680687668fd5b4bdd7b25c92e9c00d (diff) | |
download | linux-c04fabacb780b6d8dbc2e7258b383d7a91f69ad9.tar.bz2 |
wilc1000: added 'ndo_set_mac_address' callback support
Added support for 'ndo_set_mac_address call' callback to allow change of
interface MAC address.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20201125114059.10006-2-ajay.kathat@microchip.com
Diffstat (limited to 'drivers/net/wireless/microchip/wilc1000/hif.c')
-rw-r--r-- | drivers/net/wireless/microchip/wilc1000/hif.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/net/wireless/microchip/wilc1000/hif.c b/drivers/net/wireless/microchip/wilc1000/hif.c index d025a3093015..a133736a7821 100644 --- a/drivers/net/wireless/microchip/wilc1000/hif.c +++ b/drivers/net/wireless/microchip/wilc1000/hif.c @@ -1276,6 +1276,23 @@ int wilc_get_mac_address(struct wilc_vif *vif, u8 *mac_addr) return result; } +int wilc_set_mac_address(struct wilc_vif *vif, u8 *mac_addr) +{ + struct wid wid; + int result; + + wid.id = WID_MAC_ADDR; + wid.type = WID_STR; + wid.size = ETH_ALEN; + wid.val = mac_addr; + + result = wilc_send_config_pkt(vif, WILC_SET_CFG, &wid, 1); + if (result) + netdev_err(vif->ndev, "Failed to get mac address\n"); + + return result; +} + int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, const u8 *ies, size_t ies_len) { |