On Mon, 2013-06-03 at 20:03 +0200, Antonio Quartulli wrote: > On Mon, Jun 03, 2013 at 05:01:30PM +0200, Johannes Berg wrote: > > On Mon, 2013-06-03 at 08:39 +0200, Antonio Quartulli wrote: > > > > > @@ -2845,6 +2852,10 @@ static int ieee80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev, > > > rcu_read_lock(); > > > chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf); > > > > > > + /* if no channel was specified, use the current one */ > > > + if (chanctx_conf && !chan) > > > + chan = chanctx_conf->def.chan; > > > + > > > if (chanctx_conf) > > > need_offchan = chan != chanctx_conf->def.chan; > > > else > > > @@ -2852,6 +2863,12 @@ static int ieee80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev, > > > rcu_read_unlock(); > > > } > > > > > > + /* at this point a channel should have been chosen */ > > > + if (!chan) { > > > + ret = -EINVAL; > > > + goto out_unlock; > > > + } > > > + > > > > These two changes make no sense at all. If you look at the function > > you'll see that "chan" isn't used at all after the check, > > uhm? it is passed to ieee80211_start_roc_work() right after (this part has not > been changed). > 2904 ret = ieee80211_start_roc_work(local, sdata, chan, No, you can't get there without need_offchan. 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