Am 15.01.2018 um 13:09 schrieb Johannes Berg: > On Wed, 2018-01-10 at 17:42 +0100, Benjamin Beichler wrote: > >> 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. > It's weird to have the same address twice - perhaps we can XOR 0x40 or > so? I really don't know, why there were 2 addresses introduced in the first place, and why the netlink operations for receiving only check against the second address and not the first address (see get_hwsim_data_ref_from_addr). My suggestion would be, only allocate one mac address and check against this one. I don't know, whether really any user of hwsim rely on the structure, that an adapter needs two mac addresses. Since this is part of the initial commit, this decision is not documented in git ... > johannes > > -- M.Sc. Benjamin Beichler Universität Rostock, Fakultät für Informatik und Elektrotechnik Institut für Angewandte Mikroelektronik und Datentechnik University of Rostock, Department of CS and EE Institute of Applied Microelectronics and CE Richard-Wagner-Straße 31 18119 Rostock Deutschland/Germany phone: +49 (0) 381 498 - 7278 email: Benjamin.Beichler@xxxxxxxxxxxxxx www: http://www.imd.uni-rostock.de/