Index: uspace/lib/nic/src/nic_addr_db.c
===================================================================
--- uspace/lib/nic/src/nic_addr_db.c	(revision 1433ecda9b732f3f185f902feb26826ec2496e03)
+++ uspace/lib/nic/src/nic_addr_db.c	(revision 3cf22f98e8b62fe3239495266885864a48c85a80)
@@ -66,5 +66,5 @@
 static bool nic_addr_key_equal(void *key_arg, const ht_link_t *item)
 {
-	addr_key_t *key = (addr_key_t*)key_arg;
+	addr_key_t *key = (addr_key_t *)key_arg;
 	nic_addr_entry_t *entry = member_to_inst(item, nic_addr_entry_t, link);
 
@@ -85,5 +85,5 @@
 static size_t nic_addr_key_hash(void *k)
 {
-	addr_key_t *key = (addr_key_t*)k;
+	addr_key_t *key = (addr_key_t *)k;
 	return addr_hash(key->len, key->addr);
 }
@@ -263,8 +263,8 @@
  */
 void nic_addr_db_foreach(const nic_addr_db_t *db,
-	void (*func)(const uint8_t *, void *), void *arg)
+    void (*func)(const uint8_t *, void *), void *arg)
 {
 	nic_addr_db_fe_arg_t hs = { .func = func, .arg = arg };
-	hash_table_apply((hash_table_t*)&db->set, nic_addr_db_fe_helper, &hs);
+	hash_table_apply((hash_table_t *)&db->set, nic_addr_db_fe_helper, &hs);
 }
 
Index: uspace/lib/nic/src/nic_impl.c
===================================================================
--- uspace/lib/nic/src/nic_impl.c	(revision 1433ecda9b732f3f185f902feb26826ec2496e03)
+++ uspace/lib/nic/src/nic_impl.c	(revision 3cf22f98e8b62fe3239495266885864a48c85a80)
@@ -118,8 +118,8 @@
 		/* Notify upper layers that we are reseting the MAC */
 		errno_t rc = nic_ev_addr_changed(nic_data->client_session,
-			&nic_data->default_mac);
+		    &nic_data->default_mac);
 		nic_data->poll_mode = nic_data->default_poll_mode;
 		memcpy(&nic_data->poll_period, &nic_data->default_poll_period,
-			sizeof (struct timeval));
+		    sizeof(struct timeval));
 		if (rc != EOK) {
 			/* We have already ran the on stopped handler, even if we
@@ -136,5 +136,5 @@
 		/* Reinsert device's default MAC */
 		nic_rxc_set_addr(&nic_data->rx_control, NULL,
-			&nic_data->default_mac);
+		    &nic_data->default_mac);
 		fibril_rwlock_write_unlock(&nic_data->rxc_lock);
 		memcpy(&nic_data->mac, &nic_data->default_mac, sizeof (nic_address_t));
@@ -258,10 +258,10 @@
  */
 errno_t nic_unicast_get_mode_impl(ddf_fun_t *fun, nic_unicast_mode_t *mode,
-	size_t max_count, nic_address_t *addr_list, size_t *addr_count)
+    size_t max_count, nic_address_t *addr_list, size_t *addr_count)
 {
 	nic_t *nic_data = nic_get_from_ddf_fun(fun);
 	fibril_rwlock_read_lock(&nic_data->rxc_lock);
 	nic_rxc_unicast_get_mode(&nic_data->rx_control, mode, max_count,
-		addr_list, addr_count);
+	    addr_list, addr_count);
 	fibril_rwlock_read_unlock(&nic_data->rxc_lock);
 	return EOK;
@@ -282,8 +282,8 @@
  */
 errno_t nic_unicast_set_mode_impl(ddf_fun_t *fun,
-	nic_unicast_mode_t mode, const nic_address_t *addr_list, size_t addr_count)
-{
-	assert((addr_count == 0 && addr_list == NULL)
-		|| (addr_count != 0 && addr_list != NULL));
+    nic_unicast_mode_t mode, const nic_address_t *addr_list, size_t addr_count)
+{
+	assert((addr_count == 0 && addr_list == NULL) ||
+	    (addr_count != 0 && addr_list != NULL));
 	size_t i;
 	for (i = 0; i < addr_count; ++i) {
@@ -297,9 +297,9 @@
 	if (nic_data->on_unicast_mode_change) {
 		rc = nic_data->on_unicast_mode_change(nic_data,
-			mode, addr_list, addr_count);
+		    mode, addr_list, addr_count);
 	}
 	if (rc == EOK) {
 		rc = nic_rxc_unicast_set_mode(&nic_data->rx_control, mode,
-			addr_list, addr_count);
+		    addr_list, addr_count);
 		/* After changing the mode the addr db gets cleared, therefore we have
 		 * to reinsert also the physical address of NIC.
@@ -325,10 +325,10 @@
  */
 errno_t nic_multicast_get_mode_impl(ddf_fun_t *fun, nic_multicast_mode_t *mode,
-	size_t max_count, nic_address_t *addr_list, size_t *addr_count)
+    size_t max_count, nic_address_t *addr_list, size_t *addr_count)
 {
 	nic_t *nic_data = nic_get_from_ddf_fun(fun);
 	fibril_rwlock_read_lock(&nic_data->rxc_lock);
 	nic_rxc_multicast_get_mode(&nic_data->rx_control, mode, max_count,
-		addr_list, addr_count);
+	    addr_list, addr_count);
 	fibril_rwlock_read_unlock(&nic_data->rxc_lock);
 	return EOK;
@@ -349,8 +349,8 @@
  */
 errno_t nic_multicast_set_mode_impl(ddf_fun_t *fun,	nic_multicast_mode_t mode,
-	const nic_address_t *addr_list, size_t addr_count)
-{
-	assert((addr_count == 0 && addr_list == NULL)
-		|| (addr_count != 0 && addr_list != NULL));
+    const nic_address_t *addr_list, size_t addr_count)
+{
+	assert((addr_count == 0 && addr_list == NULL) ||
+	    (addr_count != 0 && addr_list != NULL));
 	size_t i;
 	for (i = 0; i < addr_count; ++i) {
@@ -367,5 +367,5 @@
 	if (rc == EOK) {
 		rc = nic_rxc_multicast_set_mode(&nic_data->rx_control, mode,
-			addr_list, addr_count);
+		    addr_list, addr_count);
 	}
 	fibril_rwlock_write_unlock(&nic_data->rxc_lock);
@@ -428,10 +428,10 @@
  */
 errno_t nic_blocked_sources_get_impl(ddf_fun_t *fun,
-	size_t max_count, nic_address_t *addr_list, size_t *addr_count)
+    size_t max_count, nic_address_t *addr_list, size_t *addr_count)
 {
 	nic_t *nic_data = nic_get_from_ddf_fun(fun);
 	fibril_rwlock_read_lock(&nic_data->rxc_lock);
 	nic_rxc_blocked_sources_get(&nic_data->rx_control,
-		max_count, addr_list, addr_count);
+	    max_count, addr_list, addr_count);
 	fibril_rwlock_read_unlock(&nic_data->rxc_lock);
 	return EOK;
@@ -451,5 +451,5 @@
  */
 errno_t nic_blocked_sources_set_impl(ddf_fun_t *fun,
-	const nic_address_t *addr_list, size_t addr_count)
+    const nic_address_t *addr_list, size_t addr_count)
 {
 	nic_t *nic_data = nic_get_from_ddf_fun(fun);
@@ -459,5 +459,5 @@
 	}
 	errno_t rc = nic_rxc_blocked_sources_set(&nic_data->rx_control,
-		addr_list, addr_count);
+	    addr_list, addr_count);
 	fibril_rwlock_write_unlock(&nic_data->rxc_lock);
 	return rc;
@@ -519,9 +519,9 @@
  */
 errno_t nic_wol_virtue_add_impl(ddf_fun_t *fun, nic_wv_type_t type,
-	const void *data, size_t length, nic_wv_id_t *new_id)
-{
-	nic_t *nic_data = nic_get_from_ddf_fun(fun);
-	if (nic_data->on_wol_virtue_add == NULL
-		|| nic_data->on_wol_virtue_remove == NULL) {
+    const void *data, size_t length, nic_wv_id_t *new_id)
+{
+	nic_t *nic_data = nic_get_from_ddf_fun(fun);
+	if (nic_data->on_wol_virtue_add == NULL ||
+	    nic_data->on_wol_virtue_remove == NULL) {
 		return ENOTSUP;
 	}
@@ -555,5 +555,5 @@
 	}
 	if ((int) nic_data->wol_virtues.lists_sizes[type] >=
-		nic_data->wol_virtues.caps_max[type]) {
+	    nic_data->wol_virtues.caps_max[type]) {
 		fibril_rwlock_write_unlock(&nic_data->wv_lock);
 		return ELIMIT;
@@ -596,11 +596,11 @@
 {
 	nic_t *nic_data = nic_get_from_ddf_fun(fun);
-	if (nic_data->on_wol_virtue_add == NULL
-		|| nic_data->on_wol_virtue_remove == NULL) {
+	if (nic_data->on_wol_virtue_add == NULL ||
+	    nic_data->on_wol_virtue_remove == NULL) {
 		return ENOTSUP;
 	}
 	fibril_rwlock_write_lock(&nic_data->wv_lock);
 	nic_wol_virtue_t *virtue =
-		nic_wol_virtues_remove(&nic_data->wol_virtues, id);
+	    nic_wol_virtues_remove(&nic_data->wol_virtues, id);
 	if (virtue == NULL) {
 		fibril_rwlock_write_unlock(&nic_data->wv_lock);
@@ -630,10 +630,10 @@
  */
 errno_t nic_wol_virtue_probe_impl(ddf_fun_t *fun, nic_wv_id_t id,
-	nic_wv_type_t *type, size_t max_length, void *data, size_t *length)
+    nic_wv_type_t *type, size_t max_length, void *data, size_t *length)
 {
 	nic_t *nic_data = nic_get_from_ddf_fun(fun);
 	fibril_rwlock_read_lock(&nic_data->wv_lock);
 	const nic_wol_virtue_t *virtue =
-			nic_wol_virtues_find(&nic_data->wol_virtues, id);
+	    nic_wol_virtues_find(&nic_data->wol_virtues, id);
 	if (virtue == NULL) {
 		*type = NIC_WV_NONE;
@@ -668,10 +668,10 @@
  */
 errno_t nic_wol_virtue_list_impl(ddf_fun_t *fun, nic_wv_type_t type,
-	size_t max_count, nic_wv_id_t *id_list, size_t *id_count)
+    size_t max_count, nic_wv_id_t *id_list, size_t *id_count)
 {
 	nic_t *nic_data = nic_get_from_ddf_fun(fun);
 	fibril_rwlock_read_lock(&nic_data->wv_lock);
 	errno_t rc = nic_wol_virtues_list(&nic_data->wol_virtues, type,
-		max_count, id_list, id_count);
+	    max_count, id_list, id_count);
 	fibril_rwlock_read_unlock(&nic_data->wv_lock);
 	return rc;
@@ -692,6 +692,6 @@
 	nic_t *nic_data = nic_get_from_ddf_fun(fun);
 	fibril_rwlock_read_lock(&nic_data->wv_lock);
-	*count = nic_data->wol_virtues.caps_max[type]
-	    - (int) nic_data->wol_virtues.lists_sizes[type];
+	*count = nic_data->wol_virtues.caps_max[type] -
+	    (int) nic_data->wol_virtues.lists_sizes[type];
 	fibril_rwlock_read_unlock(&nic_data->wv_lock);
 	return EOK;
@@ -711,10 +711,10 @@
  */
 errno_t nic_poll_get_mode_impl(ddf_fun_t *fun,
-	nic_poll_mode_t *mode, struct timeval *period)
+    nic_poll_mode_t *mode, struct timeval *period)
 {
 	nic_t *nic_data = nic_get_from_ddf_fun(fun);
 	fibril_rwlock_read_lock(&nic_data->main_lock);
 	*mode = nic_data->poll_mode;
-	memcpy(period, &nic_data->poll_period, sizeof (struct timeval));
+	memcpy(period, &nic_data->poll_period, sizeof(struct timeval));
 	fibril_rwlock_read_unlock(&nic_data->main_lock);
 	return EOK;
@@ -734,5 +734,5 @@
  */
 errno_t nic_poll_set_mode_impl(ddf_fun_t *fun,
-	nic_poll_mode_t mode, const struct timeval *period)
+    nic_poll_mode_t mode, const struct timeval *period)
 {
 	nic_t *nic_data = nic_get_from_ddf_fun(fun);
@@ -757,5 +757,5 @@
 	assert(rc == EOK || rc == ENOTSUP || rc == EINVAL);
 	if (rc == ENOTSUP && (nic_data->on_poll_request != NULL) &&
-	    (mode == NIC_POLL_PERIODIC || mode == NIC_POLL_SOFTWARE_PERIODIC) ) {
+	    (mode == NIC_POLL_PERIODIC || mode == NIC_POLL_SOFTWARE_PERIODIC)) {
 
 		rc = nic_data->on_poll_mode_change(nic_data, NIC_POLL_ON_DEMAND, NULL);
Index: uspace/lib/nic/src/nic_rx_control.c
===================================================================
--- uspace/lib/nic/src/nic_rx_control.c	(revision 1433ecda9b732f3f185f902feb26826ec2496e03)
+++ uspace/lib/nic/src/nic_rx_control.c	(revision 3cf22f98e8b62fe3239495266885864a48c85a80)
@@ -145,5 +145,5 @@
  */
 void nic_rxc_unicast_get_mode(const nic_rxc_t *rxc, nic_unicast_mode_t *mode,
-	size_t max_count, nic_address_t *address_list, size_t *address_count)
+    size_t max_count, nic_address_t *address_list, size_t *address_count)
 {
 	*mode = rxc->unicast_mode;
@@ -174,5 +174,5 @@
  */
 errno_t nic_rxc_unicast_set_mode(nic_rxc_t *rxc, nic_unicast_mode_t mode,
-	const nic_address_t *address_list, size_t address_count)
+    const nic_address_t *address_list, size_t address_count)
 {
 	if (mode == NIC_UNICAST_LIST && address_list == NULL) {
@@ -189,5 +189,5 @@
 	for (i = 0; i < address_count; ++i) {
 		errno_t rc = nic_addr_db_insert(&rxc->unicast_addrs,
-			(const uint8_t *) &address_list[i].address);
+		    (const uint8_t *) &address_list[i].address);
 		if (rc == ENOMEM) {
 			return ENOMEM;
@@ -208,6 +208,6 @@
  */
 void nic_rxc_multicast_get_mode(const nic_rxc_t *rxc,
-	nic_multicast_mode_t *mode, size_t max_count, nic_address_t *address_list,
-	size_t *address_count)
+    nic_multicast_mode_t *mode, size_t max_count, nic_address_t *address_list,
+    size_t *address_count)
 {
 	*mode = rxc->multicast_mode;
@@ -238,5 +238,5 @@
  */
 errno_t nic_rxc_multicast_set_mode(nic_rxc_t *rxc, nic_multicast_mode_t mode,
-	const nic_address_t *address_list, size_t address_count)
+    const nic_address_t *address_list, size_t address_count)
 {
 	if (mode == NIC_MULTICAST_LIST && address_list == NULL)
@@ -252,5 +252,5 @@
 	for (i = 0; i < address_count; ++i) {
 		errno_t rc = nic_addr_db_insert(&rxc->multicast_addrs,
-			(const uint8_t *)&address_list[i].address);
+		    (const uint8_t *)&address_list[i].address);
 		if (rc == ENOMEM) {
 			return ENOMEM;
@@ -295,5 +295,5 @@
  */
 void nic_rxc_blocked_sources_get(const nic_rxc_t *rxc,
-	size_t max_count, nic_address_t *address_list, size_t *address_count)
+    size_t max_count, nic_address_t *address_list, size_t *address_count)
 {
 	nic_rxc_add_addr_t hs = {
@@ -321,8 +321,8 @@
  */
 errno_t nic_rxc_blocked_sources_set(nic_rxc_t *rxc,
-	const nic_address_t *address_list, size_t address_count)
-{
-	assert((address_count == 0 && address_list == NULL)
-		|| (address_count != 0 && address_list != NULL));
+    const nic_address_t *address_list, size_t address_count)
+{
+	assert((address_count == 0 && address_list == NULL) ||
+	    (address_count != 0 && address_list != NULL));
 
 	nic_addr_db_clear(&rxc->blocked_sources);
@@ -331,5 +331,5 @@
 	for (i = 0; i < address_count; ++i) {
 		errno_t rc = nic_addr_db_insert(&rxc->blocked_sources,
-			(const uint8_t *) &address_list[i].address);
+		    (const uint8_t *) &address_list[i].address);
 		if (rc == ENOMEM) {
 			return ENOMEM;
@@ -395,5 +395,5 @@
  */
 bool nic_rxc_check(const nic_rxc_t *rxc, const void *data, size_t size,
-	nic_frame_type_t *frame_type)
+    nic_frame_type_t *frame_type)
 {
 	assert(frame_type != NULL);
@@ -449,7 +449,7 @@
 	if (!rxc->vlan_exact && rxc->vlan_mask != NULL) {
 		vlan_header_t *vlan_header = (vlan_header_t *)
-			((uint8_t *) data + 2 * ETH_ADDR);
+		    ((uint8_t *) data + 2 * ETH_ADDR);
 		if (vlan_header->tpid_upper == VLAN_TPID_UPPER &&
-			vlan_header->tpid_lower == VLAN_TPID_LOWER) {
+		    vlan_header->tpid_lower == VLAN_TPID_LOWER) {
 			int index = ((int) (vlan_header->vid_upper & 0xF) << 5) |
 			    (vlan_header->vid_lower >> 3);
@@ -476,5 +476,5 @@
  */
 void nic_rxc_hw_filtering(nic_rxc_t *rxc,
-	int unicast_exact, int multicast_exact, int vlan_exact)
+    int unicast_exact, int multicast_exact, int vlan_exact)
 {
 	if (unicast_exact >= 0)
@@ -505,21 +505,21 @@
 {
 	uint32_t crc;
-    int carry, i, j;
-    uint8_t b;
-
-    crc = 0xffffffff;
-    for (i = 0; i < 6; i++) {
-        b = addr[i];
-        for (j = 0; j < 8; j++) {
-            carry = ((crc & 0x80000000L) ? 1 : 0) ^ (b & 0x01);
-            crc <<= 1;
-            b >>= 1;
-            if (carry)
-                crc = ((crc ^ CRC_MCAST_POLYNOMIAL) | carry);
-        }
-    }
-
-    uint64_t one64 = 1;
-    return one64 << (crc >> 26);
+	int carry, i, j;
+	uint8_t b;
+
+	crc = 0xffffffff;
+	for (i = 0; i < 6; i++) {
+		b = addr[i];
+		for (j = 0; j < 8; j++) {
+			carry = ((crc & 0x80000000L) ? 1 : 0) ^ (b & 0x01);
+			crc <<= 1;
+			b >>= 1;
+			if (carry)
+				crc = ((crc ^ CRC_MCAST_POLYNOMIAL) | carry);
+		}
+	}
+
+	uint64_t one64 = 1;
+	return one64 << (crc >> 26);
 }
 
@@ -571,5 +571,5 @@
 		break;
 	case NIC_MULTICAST_PROMISC:
-		return ~ (uint64_t) 0;
+		return ~(uint64_t) 0;
 	}
 	uint64_t hash;
