Index: uspace/Makefile
===================================================================
--- uspace/Makefile	(revision 6d5da743e8cc9688379b40af5c365b35719f5c63)
+++ uspace/Makefile	(revision fef725d8052254677081e5d39dec1e6d409accb3)
@@ -153,5 +153,6 @@
 	drv/nic/ne2k \
 	drv/nic/e1k \
-	drv/nic/rtl8139
+	drv/nic/rtl8139 \
+	drv/nic/rtl8169
 
 ifeq ($(CONFIG_PCC),y)
Index: uspace/drv/nic/rtl8169/Makefile
===================================================================
--- uspace/drv/nic/rtl8169/Makefile	(revision fef725d8052254677081e5d39dec1e6d409accb3)
+++ uspace/drv/nic/rtl8169/Makefile	(revision fef725d8052254677081e5d39dec1e6d409accb3)
@@ -0,0 +1,40 @@
+#
+# Copyright (c) 2011 Radim Vansa
+# Copyright (c) 2014 Agnieszka Tabaka
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# - Redistributions of source code must retain the above copyright
+#   notice, this list of conditions and the following disclaimer.
+# - Redistributions in binary form must reproduce the above copyright
+#   notice, this list of conditions and the following disclaimer in the
+#   documentation and/or other materials provided with the distribution.
+# - The name of the author may not be used to endorse or promote products
+#   derived from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+USPACE_PREFIX = ../../..
+LIBS = $(LIBDRV_PREFIX)/libdrv.a $(LIBNIC_PREFIX)/libnic.a
+EXTRA_CFLAGS += -I$(LIBDRV_PREFIX)/include -I$(LIBNIC_PREFIX)/include
+BINARY = rtl8169
+
+SOURCES = \
+	driver.c \
+	general.c \
+	defs.c
+
+include $(USPACE_PREFIX)/Makefile.common
Index: uspace/drv/nic/rtl8169/defs.h
===================================================================
--- uspace/drv/nic/rtl8169/defs.h	(revision fef725d8052254677081e5d39dec1e6d409accb3)
+++ uspace/drv/nic/rtl8169/defs.h	(revision fef725d8052254677081e5d39dec1e6d409accb3)
@@ -0,0 +1,252 @@
+/*
+ * Copyright (c) 2014 Agnieszka Tabaka
+ * Copyright (c) 2011 Jiri Michalec
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @file rtl8169_defs.h
+ *
+ * Registers, bit positions and masks definition
+ * of the RTL8169 network family cards
+ */
+
+#ifndef RTL8169_DEFS_H_
+#define RTL8169_DEFS_H_
+
+#include <sys/types.h>
+#include <ddi.h>
+
+/** Size of RTL8169 registers address space */
+#define RTL8169_IO_SIZE  256
+
+/** Registers of RTL8169 family card offsets from the memory address base */
+enum rtl8169_registers {
+	IDR0 = 0x00, /**< First MAC address bit, 6 1b registres sequence */
+	MAC0 = IDR0, /**< Alias for IDR0 */
+	/* 0x06 - 0x07 reserved */
+	MAR0 = 0x08, /**< Multicast mask registers 8 1b registers sequence */
+	DTCCR = 0x10, /**< Dump Tally Counter Command Register */
+	TNPDS = 0x20, /**< Transmit Normal Priority Descriptors */
+	THPDS = 0x28, /**< Transmit High Priority Descriptors */
+	FLASH = 0x30, /**< Flash memory read/write register */
+	ERBCR = 0x34, /**< Early Receive Byte Count Register */
+	ERSR = 0x36, /**< Early Rx Status Register */
+	CR = 0x37, /**< Command register, 1b */
+	TPPOLL = 0x38, /**< Transmit Priority Polling Register */
+	CBA = 0x3a, /**< Current buffer address, 2b */
+	IMR = 0x3c, /**< Interrupt mask register, 2b */
+	ISR = 0x3e, /**< Interrupt status register, 2b */
+	TCR = 0x40, /**< Transmit (Tx) configuration register, 4b */
+	RCR = 0x44, /**< Receive (Rx) configuration register, 4b */
+	TCTR = 0x48, /**< Timer count register */
+	MPC = 0x4c, /**< Missed packet count */
+	CR9346 = 0x50, /**< 93C46 command register (locking of registers) */
+	CONFIG0 = 0x51,	/**< Configuration register 0, 1b */
+	CONFIG1 = 0x52,	/**< Configuration register 1, 1b */
+	CONFIG2 = 0x53, /**< Configuration register 2, 1b */
+	CONFIG3 = 0x54,	/**< Configuration register 3, 1b */
+	CONFIG4 = 0x55, /**< Configuration register 4, 1b */
+	CONFIG5 = 0x56,	/**< Configuration register 5, 1b */
+	/* 0x57 reserved */
+	TIMINT = 0x58, /**< Timer interrupt register, 4b */
+	MULINT = 0x58, /**< Multiple interrupt select, 4b */
+	/* 0x5e-0x5f reserved */
+	PHYAR = 0x60, /**< PHY Access Register, 4b */
+	TBICSR0 = 0x64,	/**< TBI Control and Status Register, 4b */
+	TBI_ANAR = 0x58, /**< TBI Auto-Negotiation Advertisement Register, 2b */
+	TBI_LPAR = 0x6a, /**< TBI Auto-Negotiation Link Partner Ability Register, 2b */
+	PHYSTATUS = 0x6c, /**< PHY Status Register */
+	/* 0x6d-0x83 reserved */
+	WAKEUP0	 = 0x84, /**< Power Management Wakeup frame0, 8b */
+	WAKEUP1	 = 0x8c, /**< Power Management Wakeup frame1, 8b */
+	WAKEUP2LD = 0x94, /**< Power Management Wakeup frame2 low dword, 8b */
+	WAKEUP2HD = 0x9c, /**< Power Management Wakeup frame2 high dword, 8b */
+	WAKEUP3LD = 0xa4, /**< Power Management Wakeup frame3 low dword, 8b */
+	WAKEUP3HD = 0xac, /**< Power Management Wakeup frame3 high dword, 8b */
+	WAKEUP2LD = 0xb4, /**< Power Management Wakeup frame4 low dword, 8b */
+	WAKEUP2HD = 0xbc, /**< Power Management Wakeup frame4 high dword, 8b */
+	CRC0 = 0xc4, /**< 16-bit CRC of wakeup frame 0, 2b */
+	CRC1 = 0xc6, /**< 16-bit CRC of wakeup frame 1, 2b */
+	CRC2 = 0xc8, /**< 16-bit CRC of wakeup frame 2, 2b */
+	CRC3 = 0xca, /**< 16-bit CRC of wakeup frame 3, 2b */
+	CRC4 = 0xcc, /**< 16-bit CRC of wakeup frame 4, 2b */
+	/* 0xce - 0xd9 reserved */
+	RMS = 0xda, /**< Rx packet Maximum Size, 2b */
+	/* 0xdc - 0xdf reserved */
+	CCR = 0xe0, /**< C+ Command Register */
+	/* 0xe2 - 0xe3 reserved */
+	RDSAR = 0xe4, /**< Receive Descriptor Start Address Register, 8b */
+	ETTHR = 0xec, /**< Early Transmit Threshold Register, 1b */
+	/* 0xed - 0xef reserved */
+	FER = 0xf0, /**< Function Event Register, 4b */
+	FEMR = 0xf4, /**< Function Event Mask Register, 4b */
+	FPSR = 0xf8, /**< Function Preset State Register, 4b */
+	FFER = 0xfc, /**< Function Force Event Register, 4b */
+};
+
+/** Command register bits */
+enum rtl8169_cr {
+	CR_TE = (1 << 2), /**< Transmitter enable bit */
+	CR_RE = (1 << 3), /**< Receiver enable bit */
+	CR_RST = (1 << 4), /**< Reset -  set to 1 to force software reset */
+};
+
+/** Config1 register bits */
+enum rtl8169_config1 {
+	CONFIG1_LEDS_SHIFT = 6, /**< Shift of CONFIG1_LEDS bits */
+	CONFIG1_LEDS_SIZE = 2, /**< Size of CONFIG1_LEDS bits */
+	CONFIG1_DVRLOAD = (1 << 5), /**< Driver load */
+	CONFIG1_LWACT = (1 << 4), /**< LWAKE active mode */
+	CONFIG1_MEMMAP = (1 << 3), /**< Memory mapping  */
+	CONFIG1_IOMAP = (1 << 2), /**< I/O space mapping */
+	CONFIG1_VPD = (1 << 1), /**< Set to enable Vital Product Data */
+	CONFIG1_PMEn = (1 << 0) /**< Power management enabled */
+};
+
+enum rtl8169_config2 {
+	CONFIG2_AUXSTATUS = (1 << 4), /**< Auxiliary Power Present Status */
+	CONFIG2_PCIBUSWIDTH = (1 << 3), /**< PCI Bus Width */
+	CONFIG2_PCICLKF_SHIFT = 0,
+	CONFIG2_PCICLKF_SIZE = 2
+}'
+
+enum rtl8169_config3 {
+	CONFIG3_GNT_SELECT = (1 << 7), /**< Gnt select */
+	CONFIG3_PARM_EN = (1 << 6), /**< Parameter enabled (100MBit mode) */
+	CONFIG3_MAGIC = (1 << 5), /**< WoL Magic frame enable */
+	CONFIG3_LINK_UP = (1 << 4), /**< Wakeup if link is reestablished */
+	CONFIG3_CLKRUN_EN = (1 << 2), /**< CLKRUN enabled */ /* TODO: check what does it mean */
+	CONFIG3_FBTBEN = (1 << 0), /**< Fast back to back enabled */
+};
+
+enum rtl8169_config4 {
+	CONFIG4_RxFIFOAutoClr = (1 << 7), /**< Automatic RxFIFO owerflow clear */
+	CONFIG4_AnaOff = (1 << 6), /**< Analog poweroff */
+	CONFIG4_LongWF = (1 << 5), /**< Long wakeup frame */
+	CONFIG4_LWPME = (1 << 4), /**< LWAKE and PMEB assertion  */
+	CONFIG4_LWPTN = (1 << 2), /**< LWake pattern */
+	CONFIG4_PBWakeup = (1 << 0), /**< Preboot wakeup */
+};
+
+enum rtl8169_config5 {
+	CONFIG5_BROADCAST_WAKEUP = (1 << 6), /**< Broadcast wakeup frame enable */
+	CONFIG5_MULTICAST_WAKEUP = (1 << 5), /**< Multicast wakeup frame enable */
+	CONFIG5_UNICAST_WAKEUP = (1 << 4), /**< Unicast wakeup frame enable */
+	/* Bits 3-2 reserved */
+	CONFIG5_LAN_WAKE = (1 << 1), /**< LANWake signal enabled */
+	CONFIG5_PME_STATUS = (1 << 0), /**< PMEn change: 0 = SW, 1 = SW+PCI */
+};
+
+/** Interrupt_masks
+ *
+ *  The masks are the same for both IMR and ISR
+ */
+enum rtl8169_interrupts {
+	INT_SERR = (1 << 15), /**< System error interrupt */
+	INT_TIME_OUT = (1 << 14), /**< Time out interrupt */
+	/* Bits 9 - 13 reserved */
+	INT_SW = (1 << 8), /**< Software Interrupt */
+	INT_TDU = (1 << 7), /**< Tx Descriptor Unvailable */
+	INT_FIFOOVW = (1 << 6), /**< Receiver FIFO overflow interrupt */
+	INT_PUN = (1 << 5), /**< Packet Underrun/Link Change Interrupt  */
+	INT_RXOVW = (1 << 4), /**< Receiver buffer overflow */
+	INT_TER = (1 << 3), /**< Transmit error interrupt */
+	INT_TOK = (1 << 2), /**< Transmit OK interrupt */
+	INT_RER = (1 << 1), /**< Receive error interrupt */
+	INT_ROK = (1 << 0), /**< Receive OK interrupt */
+};
+
+/** Transmit status descriptor registers bits */
+enum rtl8169_tsd {
+	TSD_CRS = (1 << 31), /**< Carrier Sense Lost */
+	TSD_TABT = (1 << 30), /**< Transmit Abort */
+	TSD_OWC = (1 << 29), /**< Out of Window Collision */
+	TSD_CDH = (1 << 28), /**< CD Heart Beat */
+	TSD_NCC_SHIFT = 24, /**< Collision Count - bit shift */
+	TSD_NCC_SIZE = 4, /**< Collision Count - bit size */
+	TSD_NCC_MASK = (1 << 4)-1, /**< Collision Count - bit size */
+	TSD_ERTXTH_SHIFT = 16, /**< Early Tx Threshold - bit shift */
+	TSD_ERTXTH_SIZE = 6, /**< Early Tx  Treshold - bit size */
+	TSD_TOK = (1 << 15), /**< Transmit OK */
+	TSD_TUN = (1 << 14), /**< Transmit FIFO Underrun */
+	TSD_OWN = (1 << 13), /**< OWN */
+	TSD_SIZE_SHIFT = 0, /**< Size - bit shift */
+	TSD_SIZE_SIZE = 13, /**< Size - bit size */
+	TSD_SIZE_MASK = 0x1fff, /**< Size - bit mask */
+};
+
+/** Receiver control register values */
+enum rtl8169_rcr {
+	RCR_MulERINT = 1 << 24,    /**< Multiple early interrupt select */
+	/* Bits 23-17 reserved */
+	RCR_RER8 = 1 << 16,
+	RCR_RXFTH_SHIFT = 13, /**< Rx FIFO treshold part shitf */
+	RCR_RXFTH_SIZE = 3, /**< Rx FIFO treshold part size */
+	/* Bits 12-11 reserved */
+	RCR_MXDMA_SHIFT = 8, /**< Max DMA Burst Size part shift */
+	RCR_MXDMA_SIZE  = 3, /**< Max DMA Burst Size part size */
+	/* Bit 7 reserved */
+	RCR_ACCEPT_ERROR = 1 << 5, /**< Accept error frame */
+	RCR_ACCEPT_RUNT = 1 << 4, /**< Accept Runt (8-64 bytes) frames */
+	RCR_ACCEPT_BROADCAST = 1 << 3, /**< Accept broadcast */
+	RCR_ACCEPT_MULTICAST = 1 << 2, /**< Accept multicast */
+	RCR_ACCEPT_PHYS_MATCH = 1 << 1, /**< Accept device MAC address match */
+	RCR_ACCEPT_ALL_PHYS = 1 << 0, /**< Accept all frames with phys. desticnation */
+	RCR_ACCEPT_MASK = (1 << 6) - 1   /**< Mask of accept part */
+};
+
+enum rtl8169_cr9346 {
+	CR9346EEM1_SHIFT = 6, /**< RTL8169 operating mode shift */
+	CR9346EEM1_SIZE = 2, /**< RTL8169 operating mode mask */
+	/* Bits 5-4 reserved */
+	EECS = (1 << 3), /**< EECS pin of 93C46 */
+	EESK = (1 << 2), /**< EESK pin of 93C46 */
+	EEDI = (1 << 1), /**< EEDI pin of 93C46 */
+	EEDO = (1 << 0), /**< EEDO pin of 93C46 */
+};
+
+/** Auto-negotiation advertisement register */
+enum rtl8169_anar {
+	ANAR_NEXT_PAGE = (1 << 15), /**< Next page bit, 0 - primary capability */
+	ANAR_ACK = (1 << 14), /**< Capability reception acknowledge */
+	ANAR_REMOTE_FAULT = (1 << 13), /**< Remote fault detection capability */
+	ANAR_PAUSE = (1 << 10), /**< Symetric pause frame capability */
+	ANAR_100T4 = (1 << 9), /**< T4, not supported by the device */
+	ANAR_100TX_FD = (1 << 8), /**< 100BASE_TX full duplex */
+	ANAR_100TX_HD = (1 << 7), /**< 100BASE_TX half duplex */
+	ANAR_10_FD = (1 << 6), /**< 10BASE_T full duplex */
+	ANAR_10_HD = (1 << 5), /**< 10BASE_T half duplex */
+	ANAR_SELECTOR = 0x1. /**< Selector */
+};
+
+struct rtl8169_descr {
+	uint32_t	control;
+	uint32_t	vlan;
+	uint32_t	buf_low;
+	uint32_t	buf_high;
+};
+
+#endif
Index: uspace/drv/nic/rtl8169/driver.c
===================================================================
--- uspace/drv/nic/rtl8169/driver.c	(revision fef725d8052254677081e5d39dec1e6d409accb3)
+++ uspace/drv/nic/rtl8169/driver.c	(revision fef725d8052254677081e5d39dec1e6d409accb3)
@@ -0,0 +1,201 @@
+/*
+ * Copyright (c) 2014 Agnieszka Tabaka
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/* XXX Fix this */
+#define _DDF_DATA_IMPLANT
+
+#include <assert.h>
+#include <errno.h>
+#include <align.h>
+#include <byteorder.h>
+#include <libarch/barrier.h>
+
+#include <as.h>
+#include <ddf/log.h>
+#include <ddf/interrupt.h>
+#include <io/log.h>
+#include <nic.h>
+#include <pci_dev_iface.h>
+
+#include <ipc/irc.h>
+#include <sysinfo.h>
+#include <ipc/ns.h>
+
+#include <str.h>
+
+#include "defs.h"
+#include "driver.h"
+
+/** Global mutex for work with shared irq structure */
+FIBRIL_MUTEX_INITIALIZE(irq_reg_lock);
+
+/** Network interface options for RTL8169 card driver */
+static nic_iface_t rtl8169_nic_iface = {
+	.set_address = &rtl8169_set_addr,
+	.get_device_info = &rtl8169_get_device_info,
+	.get_cable_state = &rtl8169_get_cable_state,
+	.get_operation_mode = &rtl8169_get_operation_mode,
+	.set_operation_mode = &rtl8169_set_operation_mode,
+
+	.get_pause = &rtl8169_pause_get,
+	.set_pause = &rtl8169_pause_set,
+
+	.autoneg_enable = &rtl8169_autoneg_enable,
+	.autoneg_disable = &rtl8169_autoneg_disable,
+	.autoneg_probe = &rtl8169_autoneg_probe,
+	.autoneg_restart = &rtl8169_autoneg_restart,
+
+	.defective_get_mode = &rtl8169_defective_get_mode,
+	.defective_set_mode = &rtl8169_defective_set_mode,
+};
+
+/** Basic device operations for RTL8169 driver */
+static ddf_dev_ops_t rtl8169_dev_ops;
+
+static int rtl8169_dev_add(ddf_dev_t *dev);
+
+/** Basic driver operations for RTL8169 driver */
+static driver_ops_t rtl8169_driver_ops = {
+	.dev_add = &rtl8169_dev_add,
+};
+
+/** Driver structure for RTL8169 driver */
+static driver_t rtl8169_driver = {
+	.name = NAME,
+	.driver_ops = &rtl8169_driver_ops
+};
+
+static int rtl8169_dev_add(ddf_dev_t *dev)
+{
+	ddf_fun_t *fun;
+	int rc;
+
+	assert(dev);
+	ddf_msg(LVL_NOTE, "RTL8169_dev_add %s (handle = %zu)",
+	    ddf_dev_get_name(dev), ddf_dev_get_handle(dev));
+
+	/* Init structures */
+	rc = rtl8169_dev_initialize(dev);
+	if (rc != EOK)
+		return rc;
+
+	return EOK;
+}
+
+static int rtl8169_set_addr(ddf_fun_t *fun, const nic_address_t *addr)
+{
+	return EOK;
+}
+
+static int rtl8169_get_device_info(ddf_fun_t *fun, nic_device_info_t *info)
+{
+	return EOK;
+}
+
+static int rtl8169_get_cable_state(ddf_fun_t *fun, nic_cable_state_t *state)
+{
+	return EOK;
+}
+
+static int rtl8169_get_operation_mode(ddf_fun_t *fun, int *speed,
+    nic_channel_mode_t *duplex, nic_role_t *role)
+{
+	return EOK;
+}
+
+static int rtl8169_set_operation_mode(ddf_fun_t *fun, int speed,
+    nic_channel_mode_t duplex, nic_role_t role)
+{
+	return EOK;
+}
+
+static int rtl8169_pause_get(ddf_fun_t *fun, nic_result_t *we_send, 
+    nic_result_t *we_receive, uint16_t *time)
+{
+	return EOK;
+{
+
+static int rtl8169_pause_set(ddf_fun_t *fun, int allow_send, int allow_receive, 
+    uint16_t time)
+{
+	return EOK;
+}
+
+static int rtl8169_autoneg_enable(ddf_fun_t *fun, uint32_t advertisement)
+{
+	return EOK;
+}
+
+static int rtl8169_autoneg_disable(ddf_fun_t *fun)
+{
+	return EOK;
+}
+
+static int rtl8169_autoneg_probe(ddf_fun_t *fun, uint32_t *advertisement,
+    uint32_t *their_adv, nic_result_t *result, nic_result_t *their_result)
+{
+	return EOK;
+}
+
+static int rtl8169_autoneg_restart(ddf_fun_t *fun)
+{
+	return EOK;
+}
+
+static int rtl8169_defective_get_mode(ddf_fun_t *fun, uint32_t *mode)
+{
+	return EOK;
+}
+
+static int rtl8169_defective_set_mode(ddf_fun_t *fun, uint32_t mode)
+{
+	return EOK;
+}
+
+static void rtl8169_send_frame(nic_t *nic_data, void *data, size_t size)
+{
+
+}
+
+/** Main function of RTL8169 driver
+*
+ *  Just initialize the driver structures and
+ *  put it into the device drivers interface
+ */
+int main(void)
+{
+	int rc = nic_driver_init(NAME);
+	if (rc != EOK)
+		return rc;
+	nic_driver_implement(
+		&rtl8169_driver_ops, &rtl8169_dev_ops, &rtl8169_nic_iface);
+
+	ddf_log_init(NAME);
+	ddf_msg(LVL_NOTE, "HelenOS RTL8169 driver started");
+	return ddf_driver_main(&rtl8169_driver);
+}
Index: uspace/drv/nic/rtl8169/driver.h
===================================================================
--- uspace/drv/nic/rtl8169/driver.h	(revision fef725d8052254677081e5d39dec1e6d409accb3)
+++ uspace/drv/nic/rtl8169/driver.h	(revision fef725d8052254677081e5d39dec1e6d409accb3)
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2011 Jiri Michalec
+ * Copyright (c) 2014 Agnieszka Tabaka
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef RTL8169_DRIVER_H_
+#define RTL8169_DRIVER_H_
+
+#include <sys/types.h>
+#include <stdint.h>
+#include "defs.h"
+
+/** The driver name */
+#define NAME  "rtl8169"
+
+#endif
Index: uspace/drv/nic/rtl8169/rtl8169.ma
===================================================================
--- uspace/drv/nic/rtl8169/rtl8169.ma	(revision fef725d8052254677081e5d39dec1e6d409accb3)
+++ uspace/drv/nic/rtl8169/rtl8169.ma	(revision fef725d8052254677081e5d39dec1e6d409accb3)
@@ -0,0 +1,1 @@
+10 pci/ven=10ec&dev=8169
