On 04/02/2013 17:04, Johannes Berg wrote: > On Fri, 2013-02-01 at 18:11 +0100, Nicolas Cavallari wrote: >> Allow not specifying the channel when transmitting a management frame. >> This allows user space code to not track the current channel. This is >> especially useful in IBSS mode, because userspace is not informed when >> the channel changes because of a merge and requesting the current >> channel before using it can introduce races. > > >> @@ -836,10 +837,23 @@ int cfg80211_mlme_mgmt_tx(struct cfg80211_registered_device *rdev, >> err = -EOPNOTSUPP; >> break; >> } >> + if (!err && chan == NULL) { >> + cfg80211_get_chan_state(wdev, &chan, &chan_mode); > > I'm not sure this is the best way of handling it. Is there a reason to > not pass NULL through to the driver(s) (and audit them) instead? This > channel access could be racy for channel changes still, etc. I couldn't understand how tracing would work with NULL arguments, and while most of the drivers totally ignore the channel argument or does not read it when offchan is false, the ath6kl driver actually uses the given channel and ignores the offchannel argument. -- 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