[PATCH 3/5] P2P: modify p2p_get_pref_freq

Peer, Ilan ilan.peer
Fri May 23 10:41:40 PDT 2014



> -----Original Message-----
> From: Jouni Malinen [mailto:j at w1.fi]
> Sent: Friday, May 23, 2014 00:52
> To: Peer, Ilan
> Cc: hostap at lists.shmoo.com
> Subject: Re: [PATCH 3/5] P2P: modify p2p_get_pref_freq
> 
> On Mon, May 19, 2014 at 10:05:37AM +0300, Ilan Peer wrote:
> > In p2p_get_pref_freq, if the channels argument is NULL, select a
> > preferred channel that is also one of the P2P Device configured
> > channels.
> 
> > diff --git a/src/p2p/p2p_utils.c b/src/p2p/p2p_utils.c index
> > de47c12..8f1d4f6 100644
> 
> What is the base version used for this patch?

Based on http://hostap.epitest.fi/gitweb/gitweb.cgi?p=hostap.git;a=commit;h=28fa4eb2b2dd971321e49591aade07d56695cf3e

This was before your patch " P2P: Iterate through full pref_chan list in search of a valid channel".

> 
> > @@ -385,22 +385,16 @@ unsigned int p2p_get_pref_freq(struct p2p_data
> > *p2p,  {
> >  	unsigned int i;
> >  	int freq = 0;
> > +	struct p2p_channels *tmpc = channels ?
> > +		(struct p2p_channels *)channels : &p2p->cfg->channels;
> >
> > -	if (channels == NULL) {
> > -		if (p2p->cfg->num_pref_chan) {
> > -			freq = p2p_channel_to_freq(
> > -				p2p->cfg->pref_chan[0].op_class,
> > -				p2p->cfg->pref_chan[0].chan);
> > -			if (freq < 0)
> > -				freq = 0;
> > -		}
> > -		return freq;
> > -	}
> 
> This deleted section exist in hostap.git master branch..
> 

Will send a fixed version.

Thanks in advance,

Ilan.





More information about the Hostap mailing list