Add a new option to the hwsim binary to fetch all or a given hwsim radio.
Print out radio information which is currently returned in the reply to
user space.
Add new hwsim attributes to the enum and tweak getopt to behave properly
with or without giving the radio id on the command line.
If the MAC80211_HWSIM netlink family disappears, exit hwsim. This can
happen already at startup, for example if MAC80211_HWSIM functionality is
not compiled in the kernel or respective module loaded.
Make sure to print some errors if attributes cannot be appended
to a message. It is dangerous to ignore the return code from
l_genl_msg_append_attr() because the kernel might act weirdly
if some attribute is missing.
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.