summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirav Shah <nnshah@qti.qualcomm.com>2013-12-28 21:22:09 +0530
committerPrakash Dhavali <pdhavali@codeaurora.org>2014-01-17 21:45:10 -0800
commit6db665d7190e9e46471791c42fdef00dc85b0696 (patch)
treeaa9b13dbba03e291f96b64965fb447f33d49612a
parent1f65926abb70d194d746f6377087c2e776ea1a80 (diff)
P2P: Setting 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: 593294 Change-Id: I2ecd8e923375c6b0f70bfe7641b20e99b8ac28e1
-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(