Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b5dfae02 authored by Ben Greear's avatar Ben Greear Committed by Johannes Berg
Browse files

mac80211: support creating vifs with specified mac address



This is useful when creating virtual interfaces.

Signed-off-by: default avatarBen Greear <greearb@candelatech.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent e8f479b1
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -1671,6 +1671,9 @@ int ieee80211_if_add(struct ieee80211_local *local, const char *name,
		}

		ieee80211_assign_perm_addr(local, ndev->perm_addr, type);
		if (params && is_valid_ether_addr(params->macaddr))
			memcpy(ndev->dev_addr, params->macaddr, ETH_ALEN);
		else
			memcpy(ndev->dev_addr, ndev->perm_addr, ETH_ALEN);
		SET_NETDEV_DEV(ndev, wiphy_dev(local->hw.wiphy));

+1 −0
Original line number Diff line number Diff line
@@ -542,6 +542,7 @@ struct ieee80211_hw *ieee80211_alloc_hw_nm(size_t priv_data_len,
			   NL80211_FEATURE_SAE |
			   NL80211_FEATURE_HT_IBSS |
			   NL80211_FEATURE_VIF_TXPOWER |
			   NL80211_FEATURE_MAC_ON_CREATE |
			   NL80211_FEATURE_USERSPACE_MPM;

	if (!ops->hw_scan)