summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CORE/HDD/inc/wlan_hdd_p2p.h1
-rw-r--r--CORE/HDD/src/wlan_hdd_p2p.c6
2 files changed, 6 insertions, 1 deletions
diff --git a/CORE/HDD/inc/wlan_hdd_p2p.h b/CORE/HDD/inc/wlan_hdd_p2p.h
index 49fec6b78cbb..a26f086ec28f 100644
--- a/CORE/HDD/inc/wlan_hdd_p2p.h
+++ b/CORE/HDD/inc/wlan_hdd_p2p.h
@@ -37,6 +37,7 @@
#define WAIT_CANCEL_REM_CHAN 1000
#define WAIT_REM_CHAN_READY 1000
#define WAIT_CHANGE_CHANNEL_FOR_OFFCHANNEL_TX 3000
+#define READY_EVENT_PROPOGATE_TIME 2
#define ACTION_FRAME_DEFAULT_WAIT 200
diff --git a/CORE/HDD/src/wlan_hdd_p2p.c b/CORE/HDD/src/wlan_hdd_p2p.c
index 867b71eab277..c7937989c648 100644
--- a/CORE/HDD/src/wlan_hdd_p2p.c
+++ b/CORE/HDD/src/wlan_hdd_p2p.c
@@ -350,7 +350,6 @@ static int wlan_hdd_request_remain_on_channel( struct wiphy *wiphy,
pRemainChanCtx->chan_type = channel_type;
#endif
pRemainChanCtx->duration = duration;
- pRemainChanCtx->p2pRemOnChanTimeStamp = vos_timer_get_system_time();
pRemainChanCtx->dev = dev;
*cookie = (uintptr_t) pRemainChanCtx;
pRemainChanCtx->cookie = *cookie;
@@ -451,6 +450,11 @@ void hdd_remainChanReadyHandler( hdd_adapter_t *pAdapter )
if( pRemainChanCtx != NULL )
{
+ // Removing READY_EVENT_PROPOGATE_TIME from current time which gives
+ // more accurate Remain on Channel start time.
+ pRemainChanCtx->p2pRemOnChanTimeStamp =
+ vos_timer_get_system_time() - READY_EVENT_PROPOGATE_TIME;
+
if( REMAIN_ON_CHANNEL_REQUEST == pRemainChanCtx->rem_on_chan_request )
{
cfg80211_ready_on_channel(