Search Linux Wireless

Re: [PATCH] mac80211-hwsim: Add support for HWSIM_ATTR_DESTROY_RADIO_ON_CLOSE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2014-10-09 at 14:29 +0300, Jukka Rissanen wrote:

> +struct urelease_work {
> +	struct work_struct w;
> +	u32 portid;
> +};

Wouldn't it be simpler to embed the work struct in the hwsim data, and
just queue that up when the device is affected? you should be able to
walk the list in the notifier, I'd think.

> +static void remove_user_radios(u32 portid)
> +{
> +	struct urelease_work *w;
> +
> +	w = kmalloc(sizeof(*w), GFP_ATOMIC);
> +	if (w) {
> +		INIT_WORK((struct work_struct *)w, urelease_event_work);

That cast is currently correct, but still clearly the wrong thing to do.

> +		w->portid = portid;
> +		schedule_work((struct work_struct *)w);

ditto

johannes

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux