P2P: Reduce off channel wait time for some P2P Action frames
authorAvraham Stern <avraham.stern@intel.com>
Mon, 25 Jan 2016 10:28:48 +0000 (12:28 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 6 Feb 2016 16:19:03 +0000 (18:19 +0200)
commit360a9d5a8f8b6c35319229fc13fdf0a86700b023
treeead9e7ec288f5746649fd839cb672f888e24ee4c
parent1fc63fe2998c6d4218b503e90d6c6fe4075f05ba
P2P: Reduce off channel wait time for some P2P Action frames

Setting a long off channel wait time for P2P Action frames when
we know we are already on the right channel may cause a delay in
sending the Action frame (because the driver may not be able to
satisfy the request for long wait time until previous off channel
requests are over). This may be crucial for P2P response frames
that must be sent within 100 milliseconds of receiving the request.

Fix this by adjusting P2P Action frame wait times as follows:

 1. For GO Negotiation Response frame, shorten the wait time to 100 ms.
    This is reasonable because the peer has just sent us the GO
    Negotiation Request frame, so it is known to be on the right
    channel and is probably ready to send us the GO Negotiation
    Confirmation frame without delay.
 2. For GO Negotiation Confirmation, P2P Invitation Response, and
    Provision Discovery Response frames, there is no need for wait
    time at all as this is the last frame in the exchange. So set
    the wait time to 50 ms to ensure there is enough time to send the
    frame.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
src/p2p/p2p_go_neg.c
src/p2p/p2p_invitation.c
src/p2p/p2p_pd.c