Beispiel #1
0
/*----------------------------------------------------------------------------*/
BOOLEAN
p2pRemove(
    P_GLUE_INFO_T prGlueInfo
    )
{
    if(prGlueInfo->prAdapter->fgIsP2PRegistered == FALSE) {
        printk("p2p is not Registered.\n");
        return FALSE;
    }
    else {

#if defined(CONFIG_HAS_EARLYSUSPEND)
        glUnregisterEarlySuspend(&mt6620_p2p_early_suspend_desc);
#endif
        /*Check p2p fsm is stop or not. If not then stop now*/
        if(IS_P2P_ACTIVE(prGlueInfo->prAdapter)) {
            p2pStopImmediate(prGlueInfo);
        }
        prGlueInfo->prAdapter->fgIsP2PRegistered = FALSE;
        glUnregisterP2P(prGlueInfo);
        /*p2p is removed successfully*/
        return TRUE;
    }
    return FALSE;
}
/*----------------------------------------------------------------------------*/
BOOLEAN
p2pRemove(
    P_GLUE_INFO_T prGlueInfo
    )
{
    if(prGlueInfo->prAdapter->fgIsP2PRegistered == FALSE) {
        printk("p2p is not Registered.\n");
        return FALSE;
    }
    else {
        /*Check p2p fsm is stop or not. If not then stop now*/
        if(IS_P2P_ACTIVE(prGlueInfo->prAdapter)) {
            p2pStopImmediate(prGlueInfo);
        }
        prGlueInfo->prAdapter->fgIsP2PRegistered = FALSE;
        glUnregisterP2P(prGlueInfo);
        /*p2p is removed successfully*/
        return TRUE;
    }
    return FALSE;
}