Following tasks are done as relevant kernel patches are accepted into
linux kernel.
- Add support for returning HWSIM_ATTR_RADIO_ID from HWSIM_CMD_CREATE_RADIO
- Rename HWSIM_CMD_CREATE_RADIO into HWSIM_CMD_NEW_RADIO
- Rename HWSIM_CMD_DESTROY_RADIO into HWSIM_CMD_DEL_RADIO
- Provide multicast events for HWSIM_CMD_NEW_RADIO and HWSIM_CMD_DEL_RADIO
Kernel sends HWSIM_CMD_NEW_RADIO and HWSIM_CMD_DEL_RADIO multicast
events when new radio have been created and when existing one has
been deleted. The events are sent to "config" netlink multicast group.
The hwsim catches these events and uses the information to monitor
what simulated radios are created and deleted in the system.
Because none of the attributes are assigned until after the DeviceAdded
signal is emitted, the signal appears with invalid properties. For now,
move the netdev structure fill-out into the if statement.
If the netdev attributes can change, then these need to be handled
separately and appropriate signals to be sent.
The "Add support for client tracking of HWSIM_CMD_CREATE_RADIO"
task is done. The patch to kernel mac80211_hwsim kernel module
was submitted and it was added to mac80211-next tree 09 Oct 2014
in commit "e9ed49bf4c2c"
The new attribute causes the radio to be removed if the hwsim process
dies. This is the default behaviour. If user calls the binary with -k
option, then the radio is kept after hwsim quits.
This requires kernel support for HWSIM_ATTR_DESTROY_RADIO_ON_CLOSE
attribute.
Lowering priority of HWSIM_ATTR_RADIO_ID task as we get the radio
id in error code field. If we really want to create a new attribute
for the radio id, then the TODO entry is still valid.
When a new radio is created, the kernel returns the new radio id
in the error code. If the error < 0, then that means a real error
and other values are used as a radio id.
When a radio is destroyed, the error code 0 means a success and
other values indicate an error.