[PATCH 2/3] P2P: always re-select oper channel if not hard coded

Arik Nemtsov arik at wizery.com
Tue Dec 25 14:49:52 EST 2012


On Tue, Dec 25, 2012 at 8:07 PM, Jouni Malinen <j at w1.fi> wrote:
> On Tue, Sep 04, 2012 at 08:52:50PM +0300, Arik Nemtsov wrote:
>> Since the operating channel is randomly set to 1/6/11 on init, which is
>> always in the channel intersection, we were effectively ignoring the set
>> of p2p preferred channels.
>> Fix this by trying to get the best channel we can, unless the user hard
>> coded the operating channel in the configuration file. Fall back to the
>> initial randomly selected channel if a better one cannot be chosen.
>
> I've been trying to discourage use of p2p_oper_{reg_class,channel}
> parameters in the configuration file since these were not really ever
> designed to be used for normal use cases (i.e., they were only for
> initial testing). As such, I'm not sure whether I would really like to
> apply this change since it adds more uses for these parameters. The
> proper way to force a specific channel is with the freq parameter to the
> P2P command that is used to form the group.

Note this change is essential to make patch 3/3 regarding HT40 (which
you applied) work correctly.

We would never call p2p_reselect_channel() normally, since
p2p_channels_includes(p2p->op_channel) always returns true. This is
because p2p->op_channel = 1/6/11 from the p2p init code..

I'm attaching a new version of this patch, which includes the fix to
p2p_process_go_neg_resp() I mentioned. It is rebased on the (close to)
latest code.

Arik
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-P2P-always-re-select-oper-channel-if-not-hard-coded.patch
Type: application/octet-stream
Size: 2378 bytes
Desc: not available
Url : http://lists.shmoo.com/pipermail/hostap/attachments/20121225/7ff989bd/attachment.obj 


More information about the HostAP mailing list