Skip to content
Commit 86da431a authored by Benjamin Beichler's avatar Benjamin Beichler Committed by Your Name
Browse files

BACKPORT: mac80211_hwsim: add permanent mac address option for new radios



If simulation needs predictable permanent mac addresses of hwsim wireless
phy, this patch add the ability to create a new radio with a user defined
permanent mac address. Allowed mac addresses needs to be locally
administrated mac addresses (as also the former fixed 42:* and 02:* were).

To do not break the operation with legacy software using hwsim, the new
address is set twice. The problem here is, the netlink call backs use
wiphy->addresses[1] as identification of a radio and not the proposed
permanent address (wiphy->addresses[0]). This design decision is not
documented in the kernel repo, therefore this patch simply reproduces this,
but with the same address.

Signed-off-by: default avatarBenjamin Beichler <benjamin.beichler@uni-rostock.de>
[make pointer const]
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Change-Id: Idff4d3269746470c076e6998351044711cf29a0f
(cherry picked from commit d6228c99eec0b291d139a72498516cc23ec880c1)
parent ebdecc69
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment