P2P:Extend wait time only for response type action frames.

in wlan_hdd_action we are not checking whether the received packet
is action frame or not before extending wait duration, Therefore
made changes to  check if the received frame is action packet and
of type response.

CRs-Fixed: 586076
(cherry picked from commit 5b786d22bb9ea3719106e72e4fd600a0923b0ddd)

Change-Id: I07ac864da0d5e9ecf40e7d5de58c97962a01fff9
P2P: Check for p2p resp action packets properly

add logic to check whether a packet is p2p public action response
kind of packet or not. Earlier logic missed to check OUI, OUI_TYPE
and action type fields.

CRs-Fixed: 608271
Change-Id: I653b058e4a407bc07b908619e759d9cbd403ee66
P2P: Extend RoC only when RoC is not enough

Extend the RoC only when the remaining duration of RoC is not
enough to transmit the current action packet. Currently checking
if the remaining time is more than 20ms or not. If not, then only
reschedule the RoC again.

CRs-fixed: 608276
Change-Id: Iccdb1ab3cc4b328cf372dd85b4f384348e424409
P2P: Set Remain On Channel start time on Ready indication

Earlier logic sets Remain On Channel start time at time of requsting
for Remain On Channel but it is better to set start time at time of
Remain On Channel Ready indication which gives more appropriate
indication of Remain On Channel start time.

CRs-fixed: 608276

(cherry picked from commit 310bb5586914104a3ac8b1698da611b216d32aa4)

Change-Id: I76022924f90cc732d0b2c3ee7850f8bf9ad4cdf3
P2P: Prevent RoC Cancel indication to supplicant

The cancellation event is coming when the execution thread is
inside wlan_hdd_check_remain_on_channel function itself. Hence
assign the required flag accordingly.

CRs-fixed: 608280
Change-Id: Ia3b262be8ddc4225e7ffd8f0e54a50fb3ba94a94
P2P: Preserve cookie while extending RoC

To extend RoC, the current RoC is getting cancelled and a new RoC
is requested. Preserve the cookie of RoC that is getting cancelled
and assign it to the newly requested ROC. This will avoid the
confusion to supplicant and possible misbehaviour.

CRs-fixed: 608283
Change-Id: Id7f5dc47854a63fe7293c2d4561d222414bfb3ff
P2P: Cancel scan when Invitation req is received

Abort any ongoing scan when Invitation req is received so that
sending invitation response will not be delayed and prevents the
possible timeout on requestor side.

CRs-fixed: 608265
Change-Id: Id2dae3653ede62a30683b6ccd82ff9d644a09663
Wlan: Revision 3.2.3.231

Revision 3.2.3.231