Search Linux Wireless

Re: [PATCH 2/2] mac80211: in mgmt_tx use the current channel if none has been specified

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

 



On Mon, Jun 03, 2013 at 08:16:03PM +0200, Johannes Berg wrote:
> 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.

ah, you are right. Now I see why these two changes do not make sense at all :-)

Thanks!

-- 
Antonio Quartulli

..each of us alone is worth nothing..
Ernesto "Che" Guevara

Attachment: signature.asc
Description: Digital signature


[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