Esempio n. 1
0
/* registered removal callback from the HIF layer */
static A_STATUS HTCTargetRemovedHandler(void *handle, A_STATUS status)
{
    HTC_TARGET *target;

    AR_DEBUG_PRINTF(ATH_DEBUG_TRC, ("+HTCTargetRemovedHandler handle:0x%X \n",(A_UINT32)handle));

    if (NULL == handle) {
            /* this could be NULL in the event that target initialization failed */
        return A_OK;
    }

    target = ((AR6K_DEVICE *)handle)->HTCContext;

    AR_DEBUG_PRINTF(ATH_DEBUG_TRC, ("   removing target:0x%X instance:0x%X ... \n",
            (A_UINT32)target, (A_UINT32)target->pInstanceContext));

    if (target->pInstanceContext != NULL) {
            /* let upper layer know, it needs to call HTCStop() */
        HTCInitInfo.DeleteInstance(target->pInstanceContext);
    }

    HIFShutDownDevice(target->Device.HIFDevice);

    HTCCleanup(target);
    AR_DEBUG_PRINTF(ATH_DEBUG_TRC, ("-HTCTargetRemovedHandler \n"));
    return A_OK;
}
Esempio n. 2
0
void
HTCShutDown(HTC_TARGET *target)
{
    HTC_DEBUG_PRINTF(ATH_LOG_TRC, "HTCShutDown: Enter\n");

    if (target != NULL) {
        HIFShutDownDevice(target->device);
        delTargetInstance(target);
        A_MEMZERO(target, sizeof(HTC_TARGET));
        A_FREE(target);
    } else {
        HIFShutDownDevice(NULL);
    }
    A_DELETE_WAITQUEUE_HEAD(&htcEvent);

    HTC_DEBUG_PRINTF(ATH_LOG_TRC, "HTCShutDown: Exit\n");
}
Esempio n. 3
0
/* undo what was done in HTCInit() */
void HTCShutDown(void)
{
    AR_DEBUG_PRINTF(ATH_DEBUG_TRC, ("+HTCShutDown: \n"));
    HTCInitialized = FALSE;
        /* undo HTCInit */
    HIFShutDownDevice(NULL);
    AR_DEBUG_PRINTF(ATH_DEBUG_TRC, ("-HTCShutDown: \n"));
}