Re: [PATCH 2/2] mac80211-hwsim: Add HWSIM_CMD_GET_RADIO command

2014-11-10 Thread Johannes Berg
On Fri, 2014-11-07 at 10:22 +0200, Patrik Flykt wrote: +static int hwsim_dump_radio_nl(struct sk_buff *skb, +struct netlink_callback *cb) +{ + struct mac80211_hwsim_data *data = NULL; + + spin_lock_bh(hwsim_radio_lock); + + list_for_each_entry(data,

[PATCH 2/2] mac80211-hwsim: Add HWSIM_CMD_GET_RADIO command

2014-11-07 Thread Patrik Flykt
HWSIM_CMD_GET_RADIO returns information about a specific radio id or all of them all in response to a dump. Create the netlink skb or use the one provided by the dump functionality. Utilize the existing attribute appending function to return the same information as when creating a new hwsim radio.