[PATCH 3/5] P2P: modify p2p_get_pref_freq

Jouni Malinen j
Thu May 22 14:51:39 PDT 2014


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?

> @@ -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..

-- 
Jouni Malinen                                            PGP id EFC895FA



More information about the Hostap mailing list