mac802154: rename sdata slaves and slaves_mtx

This patch renamens the slaves attribute in sdata to interfaces and
slaves_mtx to iflist_mtx. This is similar like the mac80211 stack naming
convention.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
diff --git a/net/mac802154/ieee802154_i.h b/net/mac802154/ieee802154_i.h
index c5b1ab7..b7cf41c 100644
--- a/net/mac802154/ieee802154_i.h
+++ b/net/mac802154/ieee802154_i.h
@@ -42,8 +42,8 @@
 	 *
 	 * So atomic readers can use any of this protection methods.
 	 */
-	struct list_head	slaves;
-	struct mutex		slaves_mtx;
+	struct list_head	interfaces;
+	struct mutex		iflist_mtx;
 
 	/* This one is used for scanning and other jobs not to be interfered
 	 * with serial driver.
diff --git a/net/mac802154/iface.c b/net/mac802154/iface.c
index 6eace90..c0dbb40 100644
--- a/net/mac802154/iface.c
+++ b/net/mac802154/iface.c
@@ -125,9 +125,9 @@
 {
 	struct ieee802154_sub_if_data *sdata = netdev_priv(dev);
 
-	mutex_lock(&sdata->local->slaves_mtx);
+	mutex_lock(&sdata->local->iflist_mtx);
 	sdata->mac_params = *params;
-	mutex_unlock(&sdata->local->slaves_mtx);
+	mutex_unlock(&sdata->local->iflist_mtx);
 
 	return 0;
 }
@@ -137,9 +137,9 @@
 {
 	struct ieee802154_sub_if_data *sdata = netdev_priv(dev);
 
-	mutex_lock(&sdata->local->slaves_mtx);
+	mutex_lock(&sdata->local->iflist_mtx);
 	*params = sdata->mac_params;
-	mutex_unlock(&sdata->local->slaves_mtx);
+	mutex_unlock(&sdata->local->iflist_mtx);
 }
 
 static int mac802154_wpan_open(struct net_device *dev)
@@ -580,7 +580,7 @@
 	}
 
 	rcu_read_lock();
-	list_for_each_entry_rcu(sdata, &local->slaves, list) {
+	list_for_each_entry_rcu(sdata, &local->interfaces, list) {
 		if (sdata->type != IEEE802154_DEV_WPAN ||
 		    !netif_running(sdata->dev))
 			continue;
diff --git a/net/mac802154/main.c b/net/mac802154/main.c
index 9b2644f..34e7e61 100644
--- a/net/mac802154/main.c
+++ b/net/mac802154/main.c
@@ -39,20 +39,20 @@
 	ASSERT_RTNL();
 
 	if (sdata->type == IEEE802154_DEV_WPAN) {
-		mutex_lock(&sdata->local->slaves_mtx);
-		list_for_each_entry(subif, &sdata->local->slaves, list) {
+		mutex_lock(&sdata->local->iflist_mtx);
+		list_for_each_entry(subif, &sdata->local->interfaces, list) {
 			if (subif != sdata && subif->type == sdata->type &&
 			    subif->running) {
-				mutex_unlock(&sdata->local->slaves_mtx);
+				mutex_unlock(&sdata->local->iflist_mtx);
 				return -EBUSY;
 			}
 		}
-		mutex_unlock(&sdata->local->slaves_mtx);
+		mutex_unlock(&sdata->local->iflist_mtx);
 	}
 
-	mutex_lock(&sdata->local->slaves_mtx);
+	mutex_lock(&sdata->local->iflist_mtx);
 	sdata->running = true;
-	mutex_unlock(&sdata->local->slaves_mtx);
+	mutex_unlock(&sdata->local->iflist_mtx);
 
 	if (local->open_count++ == 0) {
 		res = local->ops->start(&local->hw);
@@ -88,9 +88,9 @@
 
 	netif_stop_queue(dev);
 
-	mutex_lock(&sdata->local->slaves_mtx);
+	mutex_lock(&sdata->local->iflist_mtx);
 	sdata->running = false;
-	mutex_unlock(&sdata->local->slaves_mtx);
+	mutex_unlock(&sdata->local->iflist_mtx);
 
 	if (!--local->open_count)
 		local->ops->stop(&local->hw);
@@ -115,21 +115,21 @@
 
 	SET_NETDEV_DEV(dev, &local->phy->dev);
 
-	mutex_lock(&local->slaves_mtx);
+	mutex_lock(&local->iflist_mtx);
 	if (!local->running) {
-		mutex_unlock(&local->slaves_mtx);
+		mutex_unlock(&local->iflist_mtx);
 		return -ENODEV;
 	}
-	mutex_unlock(&local->slaves_mtx);
+	mutex_unlock(&local->iflist_mtx);
 
 	err = register_netdev(dev);
 	if (err < 0)
 		return err;
 
 	rtnl_lock();
-	mutex_lock(&local->slaves_mtx);
-	list_add_tail_rcu(&sdata->list, &local->slaves);
-	mutex_unlock(&local->slaves_mtx);
+	mutex_lock(&local->iflist_mtx);
+	list_add_tail_rcu(&sdata->list, &local->interfaces);
+	mutex_unlock(&local->iflist_mtx);
 	rtnl_unlock();
 
 	return 0;
@@ -146,9 +146,9 @@
 
 	BUG_ON(sdata->local->phy != phy);
 
-	mutex_lock(&sdata->local->slaves_mtx);
+	mutex_lock(&sdata->local->iflist_mtx);
 	list_del_rcu(&sdata->list);
-	mutex_unlock(&sdata->local->slaves_mtx);
+	mutex_unlock(&sdata->local->iflist_mtx);
 
 	synchronize_rcu();
 	unregister_netdevice(sdata->dev);
@@ -280,8 +280,8 @@
 	local->hw.priv = (char *)local + ALIGN(sizeof(*local), NETDEV_ALIGN);
 	local->ops = ops;
 
-	INIT_LIST_HEAD(&local->slaves);
-	mutex_init(&local->slaves_mtx);
+	INIT_LIST_HEAD(&local->interfaces);
+	mutex_init(&local->iflist_mtx);
 
 	return &local->hw;
 }
@@ -291,9 +291,9 @@
 {
 	struct ieee802154_local *local = mac802154_to_priv(hw);
 
-	BUG_ON(!list_empty(&local->slaves));
+	BUG_ON(!list_empty(&local->interfaces));
 
-	mutex_destroy(&local->slaves_mtx);
+	mutex_destroy(&local->iflist_mtx);
 
 	wpan_phy_free(local->phy);
 }
@@ -364,9 +364,9 @@
 
 	rtnl_lock();
 
-	mutex_lock(&local->slaves_mtx);
+	mutex_lock(&local->iflist_mtx);
 	local->running = MAC802154_DEVICE_RUN;
-	mutex_unlock(&local->slaves_mtx);
+	mutex_unlock(&local->iflist_mtx);
 
 	rtnl_unlock();
 
@@ -389,14 +389,14 @@
 
 	rtnl_lock();
 
-	mutex_lock(&local->slaves_mtx);
+	mutex_lock(&local->iflist_mtx);
 	local->running = MAC802154_DEVICE_STOPPED;
-	mutex_unlock(&local->slaves_mtx);
+	mutex_unlock(&local->iflist_mtx);
 
-	list_for_each_entry_safe(sdata, next, &local->slaves, list) {
-		mutex_lock(&sdata->local->slaves_mtx);
+	list_for_each_entry_safe(sdata, next, &local->interfaces, list) {
+		mutex_lock(&sdata->local->iflist_mtx);
 		list_del(&sdata->list);
-		mutex_unlock(&sdata->local->slaves_mtx);
+		mutex_unlock(&sdata->local->iflist_mtx);
 
 		unregister_netdevice(sdata->dev);
 	}
diff --git a/net/mac802154/monitor.c b/net/mac802154/monitor.c
index 79bce52..9d2ac5e 100644
--- a/net/mac802154/monitor.c
+++ b/net/mac802154/monitor.c
@@ -65,7 +65,7 @@
 	u8 *data;
 
 	rcu_read_lock();
-	list_for_each_entry_rcu(sdata, &local->slaves, list) {
+	list_for_each_entry_rcu(sdata, &local->interfaces, list) {
 		if (sdata->type != IEEE802154_DEV_MONITOR ||
 		    !netif_running(sdata->dev))
 			continue;
diff --git a/net/mac802154/tx.c b/net/mac802154/tx.c
index d20dadd..b6039c7 100644
--- a/net/mac802154/tx.c
+++ b/net/mac802154/tx.c
@@ -68,7 +68,7 @@
 
 	/* Restart the netif queue on each sub_if_data object. */
 	rcu_read_lock();
-	list_for_each_entry_rcu(sdata, &xw->local->slaves, list)
+	list_for_each_entry_rcu(sdata, &xw->local->interfaces, list)
 		netif_wake_queue(sdata->dev);
 	rcu_read_unlock();
 
@@ -109,7 +109,7 @@
 
 	/* Stop the netif queue on each sub_if_data object. */
 	rcu_read_lock();
-	list_for_each_entry_rcu(sdata, &local->slaves, list)
+	list_for_each_entry_rcu(sdata, &local->interfaces, list)
 		netif_stop_queue(sdata->dev);
 	rcu_read_unlock();