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
This commit is contained in:
Ajay Singh
2020-11-25 11:41:08 +00:00
committed by Kalle Valo
parent 75729e110e
commit c04fabacb7
3 changed files with 56 additions and 0 deletions

View File

@@ -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)
{