Commit Graph

24 Commits

Author SHA1 Message Date
Tim Kourt 34ffadb087 hwsim: Make attribute names consistent 2016-07-13 10:23:31 -05:00
Tim Kourt c6fb438c73 hwsim: Report exit status to the parent 2016-07-13 10:06:52 -05:00
Tim Kourt 0b8d641d2e hwsim: Refactor create/list/destroy action logic 2016-07-07 15:20:59 -05:00
Tim Kourt a7916ebdf2 hwsim: Fix string length bug 2016-07-07 13:44:23 -05:00
Denis Kenzior 8b20019ded hwsim: Add option to enable p2p support 2016-07-07 12:26:16 -05:00
Denis Kenzior 87296b4aab hwsim: Update to new l_main api 2016-06-09 09:56:37 -05:00
Tim Kourt 63a4972672 hwsim: Remove bogus info msg 2016-05-18 14:01:52 -05:00
Tim Kourt 9536c27d35 hwsim: Add params: --name, --nointerface 2016-05-17 17:58:13 -05:00
Tim Kourt 5d29871d89 hwsim: Fixed the errors reported by checkpatch.pl 2016-04-20 21:24:48 -05:00
Andrzej Zaborowski 92841b4976 hwsim: Don't try l_genl_attr_next if _attr_init fails.
This was causing a segfault.
2015-04-17 10:50:56 -05:00
Andrzej Zaborowski 0a6b6d0ca5 hwsim: Fix #define 2015-04-17 10:50:39 -05:00
Denis Kenzior 5594de8d27 hwsim: Use new l_genl send() APIs 2015-02-27 11:00:58 -06:00
Denis Kenzior ff30bb86dd hwsim: Fixup minor style issues 2014-11-14 22:17:30 -06:00
Denis Kenzior 55ddc6f49e hwsim: Call list_callback_done in all cases 2014-11-14 22:14:31 -06:00
Patrik Flykt f1a5dcf6f3 hwsim: Add support for HWSIM_CMD_GET_RADIO
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.
2014-11-14 22:06:06 -06:00
Patrik Flykt c2a140382a hwsim: Exit hwsim if MAC80211_HWSIM vanishes
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.
2014-11-14 21:52:57 -06:00
Denis Kenzior 47f91a47e6 hwsim: Fix up whitespace issues 2014-11-01 21:29:40 -05:00
Jukka Rissanen fb4075da5e hwsim: Receive multicast netlink event for NEW/DEL radio commands
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.
2014-11-01 21:29:40 -05:00
Denis Kenzior f125a78df8 hwsim: Minor style fix 2014-10-13 12:56:27 -05:00
Jukka Rissanen 1a07cf4ab1 hwsim: Add attribute to destroy radio when program stops
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.
2014-10-13 12:53:09 -05:00
Denis Kenzior c3e9ac662a hwsim: Cleanup some style issues 2014-10-07 21:36:10 -05:00
Denis Kenzior 210187fb45 hwsim: Make compile 2014-10-07 21:35:58 -05:00
Jukka Rissanen a052cb5d3c hwsim: Radio id was not parsed properly
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.
2014-10-07 21:31:36 -05:00
Marcel Holtmann 2d75ab55e7 tools: Add simple utility for interacting with mac80221_hwsim 2014-08-08 15:40:43 -07:00