mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 09:36:22 +02:00
wifi: mac80211: Allow setting MAC address on interface creation
Allow setting the interface MAC address for NAN Device interfaces and P2P Device interfaces on interface creation. Signed-off-by: Ilan Peer <ilan.peer@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20260504101829.d268b245037b.I351e16270c34ee734fed98da25db848211ab7cc2@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
fe553d240d
commit
4bcf276e4a
|
|
@ -2280,7 +2280,12 @@ int ieee80211_if_add(struct ieee80211_local *local, const char *name,
|
|||
|
||||
sdata->dev = NULL;
|
||||
strscpy(sdata->name, name, IFNAMSIZ);
|
||||
ieee80211_assign_perm_addr(local, wdev->address, type);
|
||||
|
||||
if (is_valid_ether_addr(params->macaddr))
|
||||
memcpy(wdev->address, params->macaddr, ETH_ALEN);
|
||||
else
|
||||
ieee80211_assign_perm_addr(local, wdev->address, type);
|
||||
|
||||
memcpy(sdata->vif.addr, wdev->address, ETH_ALEN);
|
||||
ether_addr_copy(sdata->vif.bss_conf.addr, sdata->vif.addr);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user