Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/drv/generic/remote_nic.c

    rd5c1051 rb7fd2a0  
    9898 *
    9999 */
    100 int nic_send_frame(async_sess_t *dev_sess, void *data, size_t size)
     100errno_t nic_send_frame(async_sess_t *dev_sess, void *data, size_t size)
    101101{
    102102        async_exch_t *exch = async_exchange_begin(dev_sess);
     
    105105        aid_t req = async_send_1(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
    106106            NIC_SEND_MESSAGE, &answer);
    107         int retval = async_data_write_start(exch, data, size);
     107        errno_t retval = async_data_write_start(exch, data, size);
    108108       
    109109        async_exchange_end(exch);
     
    126126 *
    127127 */
    128 int nic_callback_create(async_sess_t *dev_sess, async_port_handler_t cfun,
     128errno_t nic_callback_create(async_sess_t *dev_sess, async_port_handler_t cfun,
    129129    void *carg)
    130130{
    131131        ipc_call_t answer;
    132         int rc;
    133         int retval;
     132        errno_t rc;
     133        errno_t retval;
    134134       
    135135        async_exch_t *exch = async_exchange_begin(dev_sess);
     
    158158 *
    159159 */
    160 int nic_get_state(async_sess_t *dev_sess, nic_device_state_t *state)
     160errno_t nic_get_state(async_sess_t *dev_sess, nic_device_state_t *state)
    161161{
    162162        assert(state);
     
    165165       
    166166        async_exch_t *exch = async_exchange_begin(dev_sess);
    167         int rc = async_req_1_1(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
     167        errno_t rc = async_req_1_1(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
    168168            NIC_GET_STATE, &_state);
    169169        async_exchange_end(exch);
     
    182182 *
    183183 */
    184 int nic_set_state(async_sess_t *dev_sess, nic_device_state_t state)
    185 {
    186         async_exch_t *exch = async_exchange_begin(dev_sess);
    187         int rc = async_req_2_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
     184errno_t nic_set_state(async_sess_t *dev_sess, nic_device_state_t state)
     185{
     186        async_exch_t *exch = async_exchange_begin(dev_sess);
     187        errno_t rc = async_req_2_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
    188188            NIC_SET_STATE, state);
    189189        async_exchange_end(exch);
     
    200200 *
    201201 */
    202 int nic_get_address(async_sess_t *dev_sess, nic_address_t *address)
     202errno_t nic_get_address(async_sess_t *dev_sess, nic_address_t *address)
    203203{
    204204        assert(address);
     
    207207        aid_t aid = async_send_1(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
    208208            NIC_GET_ADDRESS, NULL);
    209         int rc = async_data_read_start(exch, address, sizeof(nic_address_t));
    210         async_exchange_end(exch);
    211        
    212         int res;
     209        errno_t rc = async_data_read_start(exch, address, sizeof(nic_address_t));
     210        async_exchange_end(exch);
     211       
     212        errno_t res;
    213213        async_wait_for(aid, &res);
    214214       
     
    227227 *
    228228 */
    229 int nic_set_address(async_sess_t *dev_sess, const nic_address_t *address)
     229errno_t nic_set_address(async_sess_t *dev_sess, const nic_address_t *address)
    230230{
    231231        assert(address);
     
    234234        aid_t aid = async_send_1(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
    235235            NIC_SET_ADDRESS, NULL);
    236         int rc = async_data_write_start(exch, address, sizeof(nic_address_t));
    237         async_exchange_end(exch);
    238        
    239         int res;
     236        errno_t rc = async_data_write_start(exch, address, sizeof(nic_address_t));
     237        async_exchange_end(exch);
     238       
     239        errno_t res;
    240240        async_wait_for(aid, &res);
    241241       
     
    254254 *
    255255 */
    256 int nic_get_stats(async_sess_t *dev_sess, nic_device_stats_t *stats)
     256errno_t nic_get_stats(async_sess_t *dev_sess, nic_device_stats_t *stats)
    257257{
    258258        assert(stats);
     
    260260        async_exch_t *exch = async_exchange_begin(dev_sess);
    261261       
    262         int rc = async_req_1_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
     262        errno_t rc = async_req_1_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
    263263            NIC_GET_STATS);
    264264        if (rc != EOK) {
     
    284284 *
    285285 */
    286 int nic_get_device_info(async_sess_t *dev_sess, nic_device_info_t *device_info)
     286errno_t nic_get_device_info(async_sess_t *dev_sess, nic_device_info_t *device_info)
    287287{
    288288        assert(device_info);
     
    292292        aid_t aid = async_send_1(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
    293293            NIC_GET_DEVICE_INFO, NULL);
    294         int rc = async_data_read_start(exch, device_info, sizeof(nic_device_info_t));
    295         async_exchange_end(exch);
    296 
    297         int res;
     294        errno_t rc = async_data_read_start(exch, device_info, sizeof(nic_device_info_t));
     295        async_exchange_end(exch);
     296
     297        errno_t res;
    298298        async_wait_for(aid, &res);
    299299       
     
    312312 *
    313313 */
    314 int nic_get_cable_state(async_sess_t *dev_sess, nic_cable_state_t *cable_state)
     314errno_t nic_get_cable_state(async_sess_t *dev_sess, nic_cable_state_t *cable_state)
    315315{
    316316        assert(cable_state);
     
    319319       
    320320        async_exch_t *exch = async_exchange_begin(dev_sess);
    321         int rc = async_req_1_1(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
     321        errno_t rc = async_req_1_1(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
    322322            NIC_GET_CABLE_STATE, &_cable_state);
    323323        async_exchange_end(exch);
     
    338338 *
    339339 */
    340 int nic_get_operation_mode(async_sess_t *dev_sess, int *speed,
     340errno_t nic_get_operation_mode(async_sess_t *dev_sess, int *speed,
    341341   nic_channel_mode_t *duplex, nic_role_t *role)
    342342{
     
    346346       
    347347        async_exch_t *exch = async_exchange_begin(dev_sess);
    348         int rc = async_req_1_3(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
     348        errno_t rc = async_req_1_3(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
    349349            NIC_GET_OPERATION_MODE, &_speed, &_duplex, &_role);
    350350        async_exchange_end(exch);
     
    375375 *
    376376 */
    377 int nic_set_operation_mode(async_sess_t *dev_sess, int speed,
     377errno_t nic_set_operation_mode(async_sess_t *dev_sess, int speed,
    378378    nic_channel_mode_t duplex, nic_role_t role)
    379379{
    380380        async_exch_t *exch = async_exchange_begin(dev_sess);
    381         int rc = async_req_4_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
     381        errno_t rc = async_req_4_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
    382382            NIC_SET_OPERATION_MODE, (sysarg_t) speed, (sysarg_t) duplex,
    383383            (sysarg_t) role);
     
    400400 *
    401401 */
    402 int nic_autoneg_enable(async_sess_t *dev_sess, uint32_t advertisement)
    403 {
    404         async_exch_t *exch = async_exchange_begin(dev_sess);
    405         int rc = async_req_2_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
     402errno_t nic_autoneg_enable(async_sess_t *dev_sess, uint32_t advertisement)
     403{
     404        async_exch_t *exch = async_exchange_begin(dev_sess);
     405        errno_t rc = async_req_2_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
    406406            NIC_AUTONEG_ENABLE, (sysarg_t) advertisement);
    407407        async_exchange_end(exch);
     
    417417 *
    418418 */
    419 int nic_autoneg_disable(async_sess_t *dev_sess)
    420 {
    421         async_exch_t *exch = async_exchange_begin(dev_sess);
    422         int rc = async_req_1_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
     419errno_t nic_autoneg_disable(async_sess_t *dev_sess)
     420{
     421        async_exch_t *exch = async_exchange_begin(dev_sess);
     422        errno_t rc = async_req_1_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
    423423            NIC_AUTONEG_DISABLE);
    424424        async_exchange_end(exch);
     
    444444 *
    445445 */
    446 int nic_autoneg_probe(async_sess_t *dev_sess, uint32_t *our_advertisement,
     446errno_t nic_autoneg_probe(async_sess_t *dev_sess, uint32_t *our_advertisement,
    447447    uint32_t *their_advertisement, nic_result_t *result,
    448448    nic_result_t *their_result)
     
    454454       
    455455        async_exch_t *exch = async_exchange_begin(dev_sess);
    456         int rc = async_req_1_4(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
     456        errno_t rc = async_req_1_4(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
    457457            NIC_AUTONEG_PROBE, &_our_advertisement, &_their_advertisement,
    458458            &_result, &_their_result);
     
    481481 *
    482482 */
    483 int nic_autoneg_restart(async_sess_t *dev_sess)
    484 {
    485         async_exch_t *exch = async_exchange_begin(dev_sess);
    486         int rc = async_req_1_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
     483errno_t nic_autoneg_restart(async_sess_t *dev_sess)
     484{
     485        async_exch_t *exch = async_exchange_begin(dev_sess);
     486        errno_t rc = async_req_1_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
    487487            NIC_AUTONEG_RESTART);
    488488        async_exchange_end(exch);
     
    501501 *
    502502 */
    503 int nic_get_pause(async_sess_t *dev_sess, nic_result_t *we_send,
     503errno_t nic_get_pause(async_sess_t *dev_sess, nic_result_t *we_send,
    504504    nic_result_t *we_receive, uint16_t *pause)
    505505{
     
    509509       
    510510        async_exch_t *exch = async_exchange_begin(dev_sess);
    511         int rc = async_req_1_3(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
     511        errno_t rc = async_req_1_3(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
    512512            NIC_GET_PAUSE, &_we_send, &_we_receive, &_pause);
    513513        async_exchange_end(exch);
     
    539539 *
    540540 */
    541 int nic_set_pause(async_sess_t *dev_sess, int allow_send, int allow_receive,
     541errno_t nic_set_pause(async_sess_t *dev_sess, int allow_send, int allow_receive,
    542542    uint16_t pause)
    543543{
    544544        async_exch_t *exch = async_exchange_begin(dev_sess);
    545         int rc = async_req_4_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
     545        errno_t rc = async_req_4_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
    546546            NIC_SET_PAUSE, allow_send, allow_receive, pause);
    547547        async_exchange_end(exch);
     
    566566 *
    567567 */
    568 int nic_unicast_get_mode(async_sess_t *dev_sess, nic_unicast_mode_t *mode,
     568errno_t nic_unicast_get_mode(async_sess_t *dev_sess, nic_unicast_mode_t *mode,
    569569    size_t max_count, nic_address_t *address_list, size_t *address_count)
    570570{
     
    579579        async_exch_t *exch = async_exchange_begin(dev_sess);
    580580       
    581         int rc = async_req_2_2(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
     581        errno_t rc = async_req_2_2(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
    582582            NIC_UNICAST_GET_MODE, max_count, &_mode, &_address_count);
    583583        if (rc != EOK) {
     
    609609 *
    610610 */
    611 int nic_unicast_set_mode(async_sess_t *dev_sess, nic_unicast_mode_t mode,
     611errno_t nic_unicast_set_mode(async_sess_t *dev_sess, nic_unicast_mode_t mode,
    612612    const nic_address_t *address_list, size_t address_count)
    613613{
     
    620620            NIC_UNICAST_SET_MODE, (sysarg_t) mode, address_count, NULL);
    621621       
    622         int rc;
     622        errno_t rc;
    623623        if (address_count)
    624624                rc = async_data_write_start(exch, address_list,
     
    629629        async_exchange_end(exch);
    630630       
    631         int res;
     631        errno_t res;
    632632        async_wait_for(message_id, &res);
    633633       
     
    655655 *
    656656 */
    657 int nic_multicast_get_mode(async_sess_t *dev_sess, nic_multicast_mode_t *mode,
     657errno_t nic_multicast_get_mode(async_sess_t *dev_sess, nic_multicast_mode_t *mode,
    658658    size_t max_count, nic_address_t *address_list, size_t *address_count)
    659659{
     
    668668       
    669669        sysarg_t ac;
    670         int rc = async_req_2_2(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
     670        errno_t rc = async_req_2_2(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
    671671            NIC_MULTICAST_GET_MODE, max_count, &_mode, &ac);
    672672        if (rc != EOK) {
     
    697697 *
    698698 */
    699 int nic_multicast_set_mode(async_sess_t *dev_sess, nic_multicast_mode_t mode,
     699errno_t nic_multicast_set_mode(async_sess_t *dev_sess, nic_multicast_mode_t mode,
    700700    const nic_address_t *address_list, size_t address_count)
    701701{
     
    708708            NIC_MULTICAST_SET_MODE, (sysarg_t) mode, address_count, NULL);
    709709       
    710         int rc;
     710        errno_t rc;
    711711        if (address_count)
    712712                rc = async_data_write_start(exch, address_list,
     
    717717        async_exchange_end(exch);
    718718       
    719         int res;
     719        errno_t res;
    720720        async_wait_for(message_id, &res);
    721721       
     
    734734 *
    735735 */
    736 int nic_broadcast_get_mode(async_sess_t *dev_sess, nic_broadcast_mode_t *mode)
     736errno_t nic_broadcast_get_mode(async_sess_t *dev_sess, nic_broadcast_mode_t *mode)
    737737{
    738738        assert(mode);
     
    741741       
    742742        async_exch_t *exch = async_exchange_begin(dev_sess);
    743         int rc = async_req_1_1(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
     743        errno_t rc = async_req_1_1(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
    744744            NIC_BROADCAST_GET_MODE, &_mode);
    745745        async_exchange_end(exch);
     
    758758 *
    759759 */
    760 int nic_broadcast_set_mode(async_sess_t *dev_sess, nic_broadcast_mode_t mode)
    761 {
    762         async_exch_t *exch = async_exchange_begin(dev_sess);
    763         int rc = async_req_2_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
     760errno_t nic_broadcast_set_mode(async_sess_t *dev_sess, nic_broadcast_mode_t mode)
     761{
     762        async_exch_t *exch = async_exchange_begin(dev_sess);
     763        errno_t rc = async_req_2_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
    764764            NIC_BROADCAST_SET_MODE, mode);
    765765        async_exchange_end(exch);
     
    776776 *
    777777 */
    778 int nic_defective_get_mode(async_sess_t *dev_sess, uint32_t *mode)
     778errno_t nic_defective_get_mode(async_sess_t *dev_sess, uint32_t *mode)
    779779{
    780780        assert(mode);
     
    783783       
    784784        async_exch_t *exch = async_exchange_begin(dev_sess);
    785         int rc = async_req_1_1(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
     785        errno_t rc = async_req_1_1(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
    786786            NIC_DEFECTIVE_GET_MODE, &_mode);
    787787        async_exchange_end(exch);
     
    800800 *
    801801 */
    802 int nic_defective_set_mode(async_sess_t *dev_sess, uint32_t mode)
    803 {
    804         async_exch_t *exch = async_exchange_begin(dev_sess);
    805         int rc = async_req_2_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
     802errno_t nic_defective_set_mode(async_sess_t *dev_sess, uint32_t mode)
     803{
     804        async_exch_t *exch = async_exchange_begin(dev_sess);
     805        errno_t rc = async_req_2_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
    806806            NIC_DEFECTIVE_SET_MODE, mode);
    807807        async_exchange_end(exch);
     
    822822 *
    823823 */
    824 int nic_blocked_sources_get(async_sess_t *dev_sess, size_t max_count,
     824errno_t nic_blocked_sources_get(async_sess_t *dev_sess, size_t max_count,
    825825    nic_address_t *address_list, size_t *address_count)
    826826{
     
    831831       
    832832        sysarg_t ac;
    833         int rc = async_req_2_1(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
     833        errno_t rc = async_req_2_1(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
    834834            NIC_BLOCKED_SOURCES_GET, max_count, &ac);
    835835        if (rc != EOK) {
     
    858858 *
    859859 */
    860 int nic_blocked_sources_set(async_sess_t *dev_sess,
     860errno_t nic_blocked_sources_set(async_sess_t *dev_sess,
    861861    const nic_address_t *address_list, size_t address_count)
    862862{
     
    869869            NIC_BLOCKED_SOURCES_SET, address_count, NULL);
    870870       
    871         int rc;
     871        errno_t rc;
    872872        if (address_count)
    873873                rc = async_data_write_start(exch, address_list,
     
    878878        async_exchange_end(exch);
    879879       
    880         int res;
     880        errno_t res;
    881881        async_wait_for(message_id, &res);
    882882       
     
    895895 *
    896896 */
    897 int nic_vlan_get_mask(async_sess_t *dev_sess, nic_vlan_mask_t *mask)
     897errno_t nic_vlan_get_mask(async_sess_t *dev_sess, nic_vlan_mask_t *mask)
    898898{
    899899        assert(mask);
    900900       
    901901        async_exch_t *exch = async_exchange_begin(dev_sess);
    902         int rc = async_req_1_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
     902        errno_t rc = async_req_1_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
    903903            NIC_VLAN_GET_MASK);
    904904        if (rc != EOK) {
     
    923923 *
    924924 */
    925 int nic_vlan_set_mask(async_sess_t *dev_sess, const nic_vlan_mask_t *mask)
     925errno_t nic_vlan_set_mask(async_sess_t *dev_sess, const nic_vlan_mask_t *mask)
    926926{
    927927        async_exch_t *exch = async_exchange_begin(dev_sess);
     
    930930            NIC_VLAN_SET_MASK, mask != NULL, NULL);
    931931       
    932         int rc;
     932        errno_t rc;
    933933        if (mask != NULL)
    934934                rc = async_data_write_start(exch, mask, sizeof(nic_vlan_mask_t));
     
    938938        async_exchange_end(exch);
    939939       
    940         int res;
     940        errno_t res;
    941941        async_wait_for(message_id, &res);
    942942       
     
    963963 *
    964964 */
    965 int nic_vlan_set_tag(async_sess_t *dev_sess, uint16_t tag, bool add, bool strip)
    966 {
    967         async_exch_t *exch = async_exchange_begin(dev_sess);
    968         int rc = async_req_4_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
     965errno_t nic_vlan_set_tag(async_sess_t *dev_sess, uint16_t tag, bool add, bool strip)
     966{
     967        async_exch_t *exch = async_exchange_begin(dev_sess);
     968        errno_t rc = async_req_4_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
    969969            NIC_VLAN_SET_TAG, (sysarg_t) tag, (sysarg_t) add, (sysarg_t) strip);
    970970        async_exchange_end(exch);
     
    985985 *
    986986 */
    987 int nic_wol_virtue_add(async_sess_t *dev_sess, nic_wv_type_t type,
     987errno_t nic_wol_virtue_add(async_sess_t *dev_sess, nic_wv_type_t type,
    988988    const void *data, size_t length, nic_wv_id_t *id)
    989989{
     
    997997            NIC_WOL_VIRTUE_ADD, (sysarg_t) type, send_data, &result);
    998998       
    999         int res;
     999        errno_t res;
    10001000        if (send_data) {
    1001                 int rc = async_data_write_start(exch, data, length);
     1001                errno_t rc = async_data_write_start(exch, data, length);
    10021002                if (rc != EOK) {
    10031003                        async_exchange_end(exch);
     
    10221022 *
    10231023 */
    1024 int nic_wol_virtue_remove(async_sess_t *dev_sess, nic_wv_id_t id)
    1025 {
    1026         async_exch_t *exch = async_exchange_begin(dev_sess);
    1027         int rc = async_req_2_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
     1024errno_t nic_wol_virtue_remove(async_sess_t *dev_sess, nic_wv_id_t id)
     1025{
     1026        async_exch_t *exch = async_exchange_begin(dev_sess);
     1027        errno_t rc = async_req_2_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
    10281028            NIC_WOL_VIRTUE_REMOVE, (sysarg_t) id);
    10291029        async_exchange_end(exch);
     
    10451045 *
    10461046 */
    1047 int nic_wol_virtue_probe(async_sess_t *dev_sess, nic_wv_id_t id,
     1047errno_t nic_wol_virtue_probe(async_sess_t *dev_sess, nic_wv_id_t id,
    10481048    nic_wv_type_t *type, size_t max_length, void *data, size_t *length)
    10491049{
     
    10561056        async_exch_t *exch = async_exchange_begin(dev_sess);
    10571057       
    1058         int rc = async_req_3_2(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
     1058        errno_t rc = async_req_3_2(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
    10591059            NIC_WOL_VIRTUE_PROBE, (sysarg_t) id, max_length,
    10601060            &_type, &_length);
     
    10951095 *
    10961096 */
    1097 int nic_wol_virtue_list(async_sess_t *dev_sess, nic_wv_type_t type,
     1097errno_t nic_wol_virtue_list(async_sess_t *dev_sess, nic_wv_type_t type,
    10981098    size_t max_count, nic_wv_id_t *id_list, size_t *id_count)
    10991099{
     
    11041104       
    11051105        sysarg_t count;
    1106         int rc = async_req_3_1(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
     1106        errno_t rc = async_req_3_1(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
    11071107            NIC_WOL_VIRTUE_LIST, (sysarg_t) type, max_count, &count);
    11081108       
     
    11351135 *
    11361136 */
    1137 int nic_wol_virtue_get_caps(async_sess_t *dev_sess, nic_wv_type_t type,
     1137errno_t nic_wol_virtue_get_caps(async_sess_t *dev_sess, nic_wv_type_t type,
    11381138    int *count)
    11391139{
     
    11431143       
    11441144        async_exch_t *exch = async_exchange_begin(dev_sess);
    1145         int rc = async_req_2_1(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
     1145        errno_t rc = async_req_2_1(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
    11461146            NIC_WOL_VIRTUE_GET_CAPS, (sysarg_t) type, &_count);
    11471147        async_exchange_end(exch);
     
    11731173 *
    11741174 */
    1175 int nic_wol_load_info(async_sess_t *dev_sess, nic_wv_type_t *matched_type,
     1175errno_t nic_wol_load_info(async_sess_t *dev_sess, nic_wv_type_t *matched_type,
    11761176    size_t max_length, uint8_t *frame, size_t *frame_length)
    11771177{
     
    11861186        async_exch_t *exch = async_exchange_begin(dev_sess);
    11871187       
    1188         int rc = async_req_2_2(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
     1188        errno_t rc = async_req_2_2(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
    11891189            NIC_WOL_LOAD_INFO, max_length, &_matched_type, &_frame_length);
    11901190        if (rc != EOK) {
     
    12131213 *
    12141214 */
    1215 int nic_offload_probe(async_sess_t *dev_sess, uint32_t *supported,
     1215errno_t nic_offload_probe(async_sess_t *dev_sess, uint32_t *supported,
    12161216    uint32_t *active)
    12171217{
     
    12231223       
    12241224        async_exch_t *exch = async_exchange_begin(dev_sess);
    1225         int rc = async_req_1_2(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
     1225        errno_t rc = async_req_1_2(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
    12261226            NIC_OFFLOAD_PROBE, &_supported, &_active);
    12271227        async_exchange_end(exch);
     
    12411241 *
    12421242 */
    1243 int nic_offload_set(async_sess_t *dev_sess, uint32_t mask, uint32_t active)
    1244 {
    1245         async_exch_t *exch = async_exchange_begin(dev_sess);
    1246         int rc = async_req_3_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
     1243errno_t nic_offload_set(async_sess_t *dev_sess, uint32_t mask, uint32_t active)
     1244{
     1245        async_exch_t *exch = async_exchange_begin(dev_sess);
     1246        errno_t rc = async_req_3_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
    12471247            NIC_AUTONEG_RESTART, (sysarg_t) mask, (sysarg_t) active);
    12481248        async_exchange_end(exch);
     
    12611261 *
    12621262 */
    1263 int nic_poll_get_mode(async_sess_t *dev_sess, nic_poll_mode_t *mode,
     1263errno_t nic_poll_get_mode(async_sess_t *dev_sess, nic_poll_mode_t *mode,
    12641264    struct timeval *period)
    12651265{
     
    12701270        async_exch_t *exch = async_exchange_begin(dev_sess);
    12711271       
    1272         int rc = async_req_2_1(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
     1272        errno_t rc = async_req_2_1(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
    12731273            NIC_POLL_GET_MODE, period != NULL, &_mode);
    12741274        if (rc != EOK) {
     
    12951295 *
    12961296 */
    1297 int nic_poll_set_mode(async_sess_t *dev_sess, nic_poll_mode_t mode,
     1297errno_t nic_poll_set_mode(async_sess_t *dev_sess, nic_poll_mode_t mode,
    12981298    const struct timeval *period)
    12991299{
     
    13031303            NIC_POLL_SET_MODE, (sysarg_t) mode, period != NULL, NULL);
    13041304       
    1305         int rc;
     1305        errno_t rc;
    13061306        if (period)
    13071307                rc = async_data_write_start(exch, period, sizeof(struct timeval));
     
    13111311        async_exchange_end(exch);
    13121312       
    1313         int res;
     1313        errno_t res;
    13141314        async_wait_for(message_id, &res);
    13151315       
     
    13271327 *
    13281328 */
    1329 int nic_poll_now(async_sess_t *dev_sess)
    1330 {
    1331         async_exch_t *exch = async_exchange_begin(dev_sess);
    1332         int rc = async_req_1_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE), NIC_POLL_NOW);
     1329errno_t nic_poll_now(async_sess_t *dev_sess)
     1330{
     1331        async_exch_t *exch = async_exchange_begin(dev_sess);
     1332        errno_t rc = async_req_1_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE), NIC_POLL_NOW);
    13331333        async_exchange_end(exch);
    13341334       
     
    13441344        void *data;
    13451345        size_t size;
    1346         int rc;
     1346        errno_t rc;
    13471347       
    13481348        rc = async_data_write_accept(&data, false, 0, 0, 0, &size);
     
    13631363        assert(nic_iface->callback_create);
    13641364       
    1365         int rc = nic_iface->callback_create(dev);
     1365        errno_t rc = nic_iface->callback_create(dev);
    13661366        async_answer_0(callid, rc);
    13671367}
     
    13751375        nic_device_state_t state = NIC_STATE_MAX;
    13761376       
    1377         int rc = nic_iface->get_state(dev, &state);
     1377        errno_t rc = nic_iface->get_state(dev, &state);
    13781378        async_answer_1(callid, rc, state);
    13791379}
     
    13871387        nic_device_state_t state = (nic_device_state_t) IPC_GET_ARG2(*call);
    13881388       
    1389         int rc = nic_iface->set_state(dev, state);
     1389        errno_t rc = nic_iface->set_state(dev, state);
    13901390        async_answer_0(callid, rc);
    13911391}
     
    14001400        memset(&address, 0, sizeof(nic_address_t));
    14011401       
    1402         int rc = nic_iface->get_address(dev, &address);
     1402        errno_t rc = nic_iface->get_address(dev, &address);
    14031403        if (rc == EOK) {
    14041404                size_t max_len;
     
    14511451       
    14521452        if (nic_iface->set_address != NULL) {
    1453                 int rc = nic_iface->set_address(dev, &address);
     1453                errno_t rc = nic_iface->set_address(dev, &address);
    14541454                async_answer_0(callid, rc);
    14551455        } else
     
    14691469        memset(&stats, 0, sizeof(nic_device_stats_t));
    14701470       
    1471         int rc = nic_iface->get_stats(dev, &stats);
     1471        errno_t rc = nic_iface->get_stats(dev, &stats);
    14721472        if (rc == EOK) {
    14731473                ipc_callid_t data_callid;
     
    15041504        memset(&info, 0, sizeof(nic_device_info_t));
    15051505       
    1506         int rc = nic_iface->get_device_info(dev, &info);
     1506        errno_t rc = nic_iface->get_device_info(dev, &info);
    15071507        if (rc == EOK) {
    15081508                ipc_callid_t data_callid;
     
    15381538        nic_cable_state_t cs = NIC_CS_UNKNOWN;
    15391539       
    1540         int rc = nic_iface->get_cable_state(dev, &cs);
     1540        errno_t rc = nic_iface->get_cable_state(dev, &cs);
    15411541        async_answer_1(callid, rc, (sysarg_t) cs);
    15421542}
     
    15551555        nic_role_t role = NIC_ROLE_UNKNOWN;
    15561556       
    1557         int rc = nic_iface->get_operation_mode(dev, &speed, &duplex, &role);
     1557        errno_t rc = nic_iface->get_operation_mode(dev, &speed, &duplex, &role);
    15581558        async_answer_3(callid, rc, (sysarg_t) speed, (sysarg_t) duplex,
    15591559            (sysarg_t) role);
     
    15731573        nic_role_t role = (nic_role_t) IPC_GET_ARG4(*call);
    15741574       
    1575         int rc = nic_iface->set_operation_mode(dev, speed, duplex, role);
     1575        errno_t rc = nic_iface->set_operation_mode(dev, speed, duplex, role);
    15761576        async_answer_0(callid, rc);
    15771577}
     
    15881588        uint32_t advertisement = (uint32_t) IPC_GET_ARG2(*call);
    15891589       
    1590         int rc = nic_iface->autoneg_enable(dev, advertisement);
     1590        errno_t rc = nic_iface->autoneg_enable(dev, advertisement);
    15911591        async_answer_0(callid, rc);
    15921592}
     
    16011601        }
    16021602       
    1603         int rc = nic_iface->autoneg_disable(dev);
     1603        errno_t rc = nic_iface->autoneg_disable(dev);
    16041604        async_answer_0(callid, rc);
    16051605}
     
    16191619        nic_result_t their_result = NIC_RESULT_NOT_AVAILABLE;
    16201620       
    1621         int rc = nic_iface->autoneg_probe(dev, &our_adv, &their_adv, &result,
     1621        errno_t rc = nic_iface->autoneg_probe(dev, &our_adv, &their_adv, &result,
    16221622            &their_result);
    16231623        async_answer_4(callid, rc, our_adv, their_adv, (sysarg_t) result,
     
    16341634        }
    16351635       
    1636         int rc = nic_iface->autoneg_restart(dev);
     1636        errno_t rc = nic_iface->autoneg_restart(dev);
    16371637        async_answer_0(callid, rc);
    16381638}
     
    16511651        uint16_t pause;
    16521652       
    1653         int rc = nic_iface->get_pause(dev, &we_send, &we_receive, &pause);
     1653        errno_t rc = nic_iface->get_pause(dev, &we_send, &we_receive, &pause);
    16541654        async_answer_3(callid, rc, we_send, we_receive, pause);
    16551655}
     
    16681668        uint16_t pause = (uint16_t) IPC_GET_ARG4(*call);
    16691669       
    1670         int rc = nic_iface->set_pause(dev, allow_send, allow_receive,
     1670        errno_t rc = nic_iface->set_pause(dev, allow_send, allow_receive,
    16711671            pause);
    16721672        async_answer_0(callid, rc);
     
    16971697        size_t address_count = 0;
    16981698       
    1699         int rc = nic_iface->unicast_get_mode(dev, &mode, max_count, address_list,
     1699        errno_t rc = nic_iface->unicast_get_mode(dev, &mode, max_count, address_list,
    17001700            &address_count);
    17011701       
     
    17681768       
    17691769        if (nic_iface->unicast_set_mode != NULL) {
    1770                 int rc = nic_iface->unicast_set_mode(dev, mode, address_list,
     1770                errno_t rc = nic_iface->unicast_set_mode(dev, mode, address_list,
    17711771                    address_count);
    17721772                async_answer_0(callid, rc);
     
    18011801        size_t address_count = 0;
    18021802       
    1803         int rc = nic_iface->multicast_get_mode(dev, &mode, max_count, address_list,
     1803        errno_t rc = nic_iface->multicast_get_mode(dev, &mode, max_count, address_list,
    18041804            &address_count);
    18051805       
     
    18721872       
    18731873        if (nic_iface->multicast_set_mode != NULL) {
    1874                 int rc = nic_iface->multicast_set_mode(dev, mode, address_list,
     1874                errno_t rc = nic_iface->multicast_set_mode(dev, mode, address_list,
    18751875                    address_count);
    18761876                async_answer_0(callid, rc);
     
    18921892        nic_broadcast_mode_t mode = NIC_BROADCAST_ACCEPTED;
    18931893       
    1894         int rc = nic_iface->broadcast_get_mode(dev, &mode);
     1894        errno_t rc = nic_iface->broadcast_get_mode(dev, &mode);
    18951895        async_answer_1(callid, rc, mode);
    18961896}
     
    19071907        nic_broadcast_mode_t mode = IPC_GET_ARG2(*call);
    19081908       
    1909         int rc = nic_iface->broadcast_set_mode(dev, mode);
     1909        errno_t rc = nic_iface->broadcast_set_mode(dev, mode);
    19101910        async_answer_0(callid, rc);
    19111911}
     
    19221922        uint32_t mode = 0;
    19231923       
    1924         int rc = nic_iface->defective_get_mode(dev, &mode);
     1924        errno_t rc = nic_iface->defective_get_mode(dev, &mode);
    19251925        async_answer_1(callid, rc, mode);
    19261926}
     
    19371937        uint32_t mode = IPC_GET_ARG2(*call);
    19381938       
    1939         int rc = nic_iface->defective_set_mode(dev, mode);
     1939        errno_t rc = nic_iface->defective_set_mode(dev, mode);
    19401940        async_answer_0(callid, rc);
    19411941}
     
    19641964        size_t address_count = 0;
    19651965       
    1966         int rc = nic_iface->blocked_sources_get(dev, max_count, address_list,
     1966        errno_t rc = nic_iface->blocked_sources_get(dev, max_count, address_list,
    19671967            &address_count);
    19681968       
     
    20342034       
    20352035        if (nic_iface->blocked_sources_set != NULL) {
    2036                 int rc = nic_iface->blocked_sources_set(dev, address_list,
     2036                errno_t rc = nic_iface->blocked_sources_set(dev, address_list,
    20372037                    address_count);
    20382038                async_answer_0(callid, rc);
     
    20552055        memset(&vlan_mask, 0, sizeof(nic_vlan_mask_t));
    20562056       
    2057         int rc = nic_iface->vlan_get_mask(dev, &vlan_mask);
     2057        errno_t rc = nic_iface->vlan_get_mask(dev, &vlan_mask);
    20582058        if (rc == EOK) {
    20592059                ipc_callid_t data_callid;
     
    21112111       
    21122112        if (nic_iface->vlan_set_mask != NULL) {
    2113                 int rc = nic_iface->vlan_set_mask(dev, vlan_mask_pointer);
     2113                errno_t rc = nic_iface->vlan_set_mask(dev, vlan_mask_pointer);
    21142114                async_answer_0(callid, rc);
    21152115        } else
     
    21312131        bool strip = (int) IPC_GET_ARG4(*call);
    21322132       
    2133         int rc = nic_iface->vlan_set_tag(dev, tag, add, strip);
     2133        errno_t rc = nic_iface->vlan_set_tag(dev, tag, add, strip);
    21342134        async_answer_0(callid, rc);
    21352135}
     
    21802180        nic_wv_type_t type = (nic_wv_type_t) IPC_GET_ARG2(*call);
    21812181       
    2182         int rc = nic_iface->wol_virtue_add(dev, type, data, length, &id);
     2182        errno_t rc = nic_iface->wol_virtue_add(dev, type, data, length, &id);
    21832183        async_answer_1(callid, rc, (sysarg_t) id);
    21842184        free(data);
     
    21972197        nic_wv_id_t id = (nic_wv_id_t) IPC_GET_ARG2(*call);
    21982198       
    2199         int rc = nic_iface->wol_virtue_remove(dev, id);
     2199        errno_t rc = nic_iface->wol_virtue_remove(dev, id);
    22002200        async_answer_0(callid, rc);
    22012201}
     
    22282228        memset(data, 0, max_length);
    22292229       
    2230         int rc = nic_iface->wol_virtue_probe(dev, id, &type, max_length,
     2230        errno_t rc = nic_iface->wol_virtue_probe(dev, id, &type, max_length,
    22312231            data, &length);
    22322232       
     
    22782278        memset(id_list, 0, max_count * sizeof (nic_wv_id_t));
    22792279       
    2280         int rc = nic_iface->wol_virtue_list(dev, type, max_count, id_list,
     2280        errno_t rc = nic_iface->wol_virtue_list(dev, type, max_count, id_list,
    22812281            &count);
    22822282       
     
    23152315        nic_wv_type_t type = (nic_wv_type_t) IPC_GET_ARG2(*call);
    23162316       
    2317         int rc = nic_iface->wol_virtue_get_caps(dev, type, &count);
     2317        errno_t rc = nic_iface->wol_virtue_get_caps(dev, type, &count);
    23182318        async_answer_1(callid, rc, (sysarg_t) count);
    23192319}
     
    23432343        memset(data, 0, max_length);
    23442344       
    2345         int rc = nic_iface->wol_load_info(dev, &type, max_length, data,
     2345        errno_t rc = nic_iface->wol_load_info(dev, &type, max_length, data,
    23462346            &frame_length);
    23472347        if (rc == EOK) {
     
    23762376        uint32_t active = 0;
    23772377       
    2378         int rc = nic_iface->offload_probe(dev, &supported, &active);
     2378        errno_t rc = nic_iface->offload_probe(dev, &supported, &active);
    23792379        async_answer_2(callid, rc, supported, active);
    23802380}
     
    23922392        uint32_t active = (uint32_t) IPC_GET_ARG3(*call);
    23932393       
    2394         int rc = nic_iface->offload_set(dev, mask, active);
     2394        errno_t rc = nic_iface->offload_set(dev, mask, active);
    23952395        async_answer_0(callid, rc);
    23962396}
     
    24122412        };
    24132413       
    2414         int rc = nic_iface->poll_get_mode(dev, &mode, &period);
     2414        errno_t rc = nic_iface->poll_get_mode(dev, &mode, &period);
    24152415        if ((rc == EOK) && (request_data)) {
    24162416                size_t max_len;
     
    24702470       
    24712471        if (nic_iface->poll_set_mode != NULL) {
    2472                 int rc = nic_iface->poll_set_mode(dev, mode, period);
     2472                errno_t rc = nic_iface->poll_set_mode(dev, mode, period);
    24732473                async_answer_0(callid, rc);
    24742474        } else
     
    24852485        }
    24862486       
    2487         int rc = nic_iface->poll_now(dev);
     2487        errno_t rc = nic_iface->poll_now(dev);
    24882488        async_answer_0(callid, rc);
    24892489}
Note: See TracChangeset for help on using the changeset viewer.