Exemplo n.º 1
0
VOID
p2pStateAbort_CHNL_ON_HAND (
    IN P_ADAPTER_T prAdapter,
    IN P_P2P_FSM_INFO_T prP2pFsmInfo,
    IN P_BSS_INFO_T prP2pBssInfo,
    IN ENUM_P2P_STATE_T eNextState
    )
{
    P_P2P_CHNL_REQ_INFO_T prChnlReqInfo = (P_P2P_CHNL_REQ_INFO_T)NULL;


    do {
        ASSERT_BREAK((prAdapter != NULL) && (prP2pFsmInfo != NULL));

        prChnlReqInfo = &(prP2pFsmInfo->rChnlReqInfo);

        cnmTimerStopTimer(prAdapter, &(prP2pFsmInfo->rP2pFsmTimeoutTimer));

        /* Restore the original channel info. */
        prP2pBssInfo->ucPrimaryChannel = prChnlReqInfo->ucOriChnlNum;
        prP2pBssInfo->eBand = prChnlReqInfo->eOriBand;
        prP2pBssInfo->eBssSCO = prChnlReqInfo->eOriChnlSco;

        if (eNextState != P2P_STATE_CHNL_ON_HAND) {
            /* Indicate channel return. */
            kalP2PIndicateChannelExpired(prAdapter->prGlueInfo, &prP2pFsmInfo->rChnlReqInfo);

            // Return Channel.
            p2pFuncReleaseCh(prAdapter, &(prP2pFsmInfo->rChnlReqInfo));
        }

    } while (FALSE);
    return;
} /* p2pStateAbort_CHNL_ON_HAND */
Exemplo n.º 2
0
VOID
p2pDevStateAbort_CHNL_ON_HAND(IN P_ADAPTER_T prAdapter,
			      IN P_BSS_INFO_T prP2pBssInfo,
			      IN P_P2P_DEV_FSM_INFO_T prP2pDevFsmInfo,
			      IN P_P2P_CHNL_REQ_INFO_T prChnlReqInfo)
{
	do {
		ASSERT_BREAK((prAdapter != NULL) || (prChnlReqInfo != NULL));

		cnmTimerStopTimer(prAdapter, &(prP2pDevFsmInfo->rP2pFsmTimeoutTimer));

		prP2pBssInfo->ucPrimaryChannel = prChnlReqInfo->ucOriChnlNum;
		prP2pBssInfo->eBand = prChnlReqInfo->eOriBand;
		prP2pBssInfo->eBssSCO = prChnlReqInfo->eOriChnlSco;

		kalP2PIndicateChannelExpired(prAdapter->prGlueInfo,
					     prChnlReqInfo->u8Cookie,
					     prChnlReqInfo->ucReqChnlNum,
					     prChnlReqInfo->eBand, prChnlReqInfo->eChnlSco);

		p2pFuncReleaseCh(prAdapter, prP2pDevFsmInfo->ucBssIndex, prChnlReqInfo);
	} while (FALSE);

	return;
}				/* p2pDevStateAbort_CHNL_ON_HAND */