ar6000_set_host_app_area(struct ar6_softc *ar)
{
    u32 address, data;
    struct host_app_area_s host_app_area;

    /* Fetch the address of the host_app_area_s instance in the host interest area */
    address = TARG_VTOP(ar->arTargetType, HOST_INTEREST_ITEM_ADDRESS(ar, hi_app_host_interest));
    if (ar6000_ReadRegDiag(ar->arHifDevice, &address, &data) != 0) {
        return A_ERROR;
    }
    address = TARG_VTOP(ar->arTargetType, data);
    host_app_area.wmi_protocol_ver = WMI_PROTOCOL_VERSION;
    if (ar6000_WriteDataDiag(ar->arHifDevice, address,
                             (u8 *)&host_app_area,
                             sizeof(struct host_app_area_s)) != 0)
    {
        return A_ERROR;
    }

    return 0;
}
ar6000_set_host_app_area(struct ar6_softc *ar)
{
    u32 address, data;
    struct host_app_area_s host_app_area;

     
    address = TARG_VTOP(ar->arTargetType, HOST_INTEREST_ITEM_ADDRESS(ar, hi_app_host_interest));
    if (ar6000_ReadRegDiag(ar->arHifDevice, &address, &data) != 0) {
        return A_ERROR;
    }
    address = TARG_VTOP(ar->arTargetType, data);
    host_app_area.wmi_protocol_ver = WMI_PROTOCOL_VERSION;
    if (ar6000_WriteDataDiag(ar->arHifDevice, address,
                             (u8 *)&host_app_area,
                             sizeof(struct host_app_area_s)) != 0)
    {
        return A_ERROR;
    }

    return 0;
}