Changeset 96e368a in mainline for uspace/drv/nic/rtl8169/driver.c
- Timestamp:
- 2014-07-21T17:15:31Z (10 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- cbfece7
- Parents:
- 278fede
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/nic/rtl8169/driver.c
r278fede r96e368a 79 79 static inline int rtl8169_register_int_handler(nic_t *nic_data); 80 80 static inline void rtl8169_get_hwaddr(rtl8169_t *rtl8169, nic_address_t *addr); 81 static inline void rtl8169_set_hwaddr(rtl8169_t *rtl8169, nic_address_t *addr);81 static inline void rtl8169_set_hwaddr(rtl8169_t *rtl8169, const nic_address_t *addr); 82 82 83 83 static void rtl8169_reset(rtl8169_t *rtl8169); … … 469 469 static int rtl8169_set_addr(ddf_fun_t *fun, const nic_address_t *addr) 470 470 { 471 nic_t *nic_data = nic_get_from_ddf_fun(fun); 472 rtl8169_t *rtl8169 = nic_get_specific(nic_data); 473 int rc; 474 475 rtl8169_set_hwaddr(rtl8169, addr); 476 477 rc = nic_report_address(nic_data, addr); 478 if (rc != EOK) 479 return rc; 480 471 481 return EOK; 472 482 } … … 476 486 477 487 str_cpy(info->vendor_name, NIC_VENDOR_MAX_LENGTH, "Realtek"); 488 str_cpy(info->model_name, NIC_MODEL_MAX_LENGTH, "RTL8169"); 478 489 479 490 return EOK; … … 967 978 } 968 979 969 static inline void rtl8169_set_hwaddr(rtl8169_t *rtl8169, nic_address_t *addr)980 static inline void rtl8169_set_hwaddr(rtl8169_t *rtl8169, const nic_address_t *addr) 970 981 { 971 982 int i; … … 975 986 976 987 for (i = 0; i < 6; i++) 977 addr->address[i] = pio_read_8(rtl8169->regs + MAC0 + i);988 pio_write_8(rtl8169->regs + MAC0 + i, addr->address[i]); 978 989 } 979 990
Note:
See TracChangeset
for help on using the changeset viewer.