summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdhar, Mahesh Kumar <c_medhar@qti.qualcomm.com>2013-11-28 11:30:01 +0530
committerPrakash Dhavali <pdhavali@qca.qualcomm.com>2013-12-06 03:17:25 -0800
commit745f2908e7bdbdda3fea852e301447a8e4c87adf (patch)
tree9721debf038f597a713507df9992bbf9d2157ebd
parent3c1e62f8417763bef26337ddb92e23a56c17dbd4 (diff)
CLD:Handle extension of wait period during p2p send action frames
Wait period has to get extended when an action frame is requested to send on a channel in which the device already remains. Currently support to extend the existing remain on channel duration is not supported by the design and hence the same is achieved by a sequence of cancellation and request for a remain on channel. Host driver hides the notification of such sequence to the supplicant. Change-Id: I2045cfa81babd554b7586f20e0585a63b076b9e7 CRs-fixed: 578584
-rw-r--r--CORE/HDD/inc/wlan_hdd_main.h3
-rw-r--r--CORE/HDD/src/wlan_hdd_p2p.c38
2 files changed, 39 insertions, 2 deletions
diff --git a/CORE/HDD/inc/wlan_hdd_main.h b/CORE/HDD/inc/wlan_hdd_main.h
index 3e8cc9f2caf6..2ba9e7fbe358 100644
--- a/CORE/HDD/inc/wlan_hdd_main.h
+++ b/CORE/HDD/inc/wlan_hdd_main.h
@@ -801,6 +801,9 @@ struct hdd_adapter_s
v_BOOL_t higherDtimTransition;
hdd_scaninfo_t scan_info;
+#ifdef QCA_WIFI_2_0
+ v_BOOL_t internalCancelRemainOnChReq;
+#endif
};
#define WLAN_HDD_GET_STATION_CTX_PTR(pAdapter) (&(pAdapter)->sessionCtx.station)
diff --git a/CORE/HDD/src/wlan_hdd_p2p.c b/CORE/HDD/src/wlan_hdd_p2p.c
index 34c8a5622231..a41a65886795 100644
--- a/CORE/HDD/src/wlan_hdd_p2p.c
+++ b/CORE/HDD/src/wlan_hdd_p2p.c
@@ -103,6 +103,19 @@ static void hdd_sendMgmtFrameOverMonitorIface( hdd_adapter_t *pMonAdapter,
tANI_U32 nFrameLength,
tANI_U8* pbFrames,
tANI_U8 frameType );
+#ifdef QCA_WIFI_2_0
+static bool hdd_p2p_is_action_type_rsp( tActionFrmType actionFrmType )
+{
+ if ( actionFrmType <= MAX_P2P_ACTION_FRAME_TYPE &&
+ actionFrmType != WLAN_HDD_GO_NEG_REQ &&
+ actionFrmType != WLAN_HDD_INVITATION_REQ &&
+ actionFrmType != WLAN_HDD_DEV_DIS_REQ &&
+ actionFrmType != WLAN_HDD_PROV_DIS_REQ )
+ return TRUE;
+ else
+ return FALSE;
+}
+#endif
eHalStatus wlan_hdd_remain_on_channel_callback( tHalHandle hHal, void* pCtx,
eHalStatus status )
@@ -121,8 +134,12 @@ eHalStatus wlan_hdd_remain_on_channel_callback( tHalHandle hHal, void* pCtx,
hddLog( LOG1, "Received remain on channel rsp");
cfgState->remain_on_chan_ctx = NULL;
-
+#ifdef QCA_WIFI_2_0
+ if( REMAIN_ON_CHANNEL_REQUEST == pRemainChanCtx->rem_on_chan_request &&
+ !pAdapter->internalCancelRemainOnChReq )
+#else
if( REMAIN_ON_CHANNEL_REQUEST == pRemainChanCtx->rem_on_chan_request )
+#endif
{
if( cfgState->buf )
{
@@ -143,7 +160,9 @@ eHalStatus wlan_hdd_remain_on_channel_callback( tHalHandle hHal, void* pCtx,
#endif
GFP_KERNEL);
}
-
+#ifdef QCA_WIFI_2_0
+ pAdapter->internalCancelRemainOnChReq = VOS_FALSE;
+#endif
if ( ( WLAN_HDD_INFRA_STATION == pAdapter->device_mode ) ||
( WLAN_HDD_P2P_CLIENT == pAdapter->device_mode ) ||
@@ -700,6 +719,21 @@ int wlan_hdd_action( struct wiphy *wiphy, struct net_device *dev,
// In case of P2P Client mode if we are already
// on the same channel then send the frame directly
+#ifdef QCA_WIFI_2_0
+ //For remain on channel we issue a passive scan to firmware
+ //but currently there is no provision for dynamically extending
+ //the dwell time therefore cancelling the ongoing remain on channel
+ //and requesting for new one.
+ //The below logic will be extended for request type action frames if
+ //needed in future.
+ if ( hdd_p2p_is_action_type_rsp(actionFrmType) &&
+ cfgState->remain_on_chan_ctx &&
+ cfgState->current_freq == chan->center_freq ) {
+ status = wlan_hdd_check_remain_on_channel(pAdapter);
+ if ( !status )
+ pAdapter->internalCancelRemainOnChReq = VOS_TRUE;
+ }
+#endif
if((cfgState->remain_on_chan_ctx != NULL) &&
(cfgState->current_freq == chan->center_freq)
)