Add rudimentary support for mac80211 scheduled scan feature.
This is done so that kernel support for task called "Bind
NL80211_CMD_START_SCHED_SCAN to netlink socket" from TODO
file can be tested. The current scan interval is set to 60
seconds which is probably too fast for the final version.
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.