Search Linux Wireless

Re: [RFC] cfg80211: Make NL80211_CMD_SET_REG synchronous

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

 



On Tue, 2010-12-07 at 10:45 +0100, Helmut Schaa wrote:
> A user space caller of NL80211_CMD_SET_REG previously had no chance to
> verify if the regulatory domain change it requested already happened.
> Listening to NL80211_CMD_REG_CHANGE is not enough since it won't be
> triggered when the regulatory domain didn't change (for example because
> it was already the same before).
> 
> Fix this by making NL80211_CMD_SET_REG synchronous by adding a
> completion struct to the regulatory_hint_user function and wait for the
> completion of the regulatory request before returning.

Way too complicated. regulatory_hint_user() is called in a context that
can sleep, obviously, so you can just make it call something like
run_regulatory_request() that will cancel_work_sync(reg_work) and call
reg_todo() after queueing, instead of schedule_work(reg_work)  -- that
way when it returns all things have been processed.

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 Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux