summaryrefslogtreecommitdiff
path: root/net/mac802154/main.c
diff options
context:
space:
mode:
authorAlexander Aring <alex.aring@gmail.com>2014-10-25 17:16:37 +0200
committerMarcel Holtmann <marcel@holtmann.org>2014-10-25 21:55:38 +0200
commit04e850fe06312a9f570fcc7dbd0f141c012df404 (patch)
tree7c29fb73c597fec7fde431faf412532cd1c9cae1 /net/mac802154/main.c
parent036562f9c4d942f2fbc77ae3215309bde340546f (diff)
mac802154: rename hw subif_data variable to local
This patch renames the hw attribute in struct ieee802154_sub_if_data to local. This avoid confusing with the struct ieee802154_hw hw; inside of local struct. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/mac802154/main.c')
-rw-r--r--net/mac802154/main.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/net/mac802154/main.c b/net/mac802154/main.c
index 6f630d4990fa..9b2644ff6de5 100644
--- a/net/mac802154/main.c
+++ b/net/mac802154/main.c
@@ -33,26 +33,26 @@ int mac802154_slave_open(struct net_device *dev)
{
struct ieee802154_sub_if_data *sdata = netdev_priv(dev);
struct ieee802154_sub_if_data *subif;
- struct ieee802154_local *local = sdata->hw;
+ struct ieee802154_local *local = sdata->local;
int res = 0;
ASSERT_RTNL();
if (sdata->type == IEEE802154_DEV_WPAN) {
- mutex_lock(&sdata->hw->slaves_mtx);
- list_for_each_entry(subif, &sdata->hw->slaves, list) {
+ mutex_lock(&sdata->local->slaves_mtx);
+ list_for_each_entry(subif, &sdata->local->slaves, list) {
if (subif != sdata && subif->type == sdata->type &&
subif->running) {
- mutex_unlock(&sdata->hw->slaves_mtx);
+ mutex_unlock(&sdata->local->slaves_mtx);
return -EBUSY;
}
}
- mutex_unlock(&sdata->hw->slaves_mtx);
+ mutex_unlock(&sdata->local->slaves_mtx);
}
- mutex_lock(&sdata->hw->slaves_mtx);
+ mutex_lock(&sdata->local->slaves_mtx);
sdata->running = true;
- mutex_unlock(&sdata->hw->slaves_mtx);
+ mutex_unlock(&sdata->local->slaves_mtx);
if (local->open_count++ == 0) {
res = local->ops->start(&local->hw);
@@ -74,7 +74,7 @@ int mac802154_slave_open(struct net_device *dev)
netif_start_queue(dev);
return 0;
err:
- sdata->hw->open_count--;
+ sdata->local->open_count--;
return res;
}
@@ -82,15 +82,15 @@ err:
int mac802154_slave_close(struct net_device *dev)
{
struct ieee802154_sub_if_data *sdata = netdev_priv(dev);
- struct ieee802154_local *local = sdata->hw;
+ struct ieee802154_local *local = sdata->local;
ASSERT_RTNL();
netif_stop_queue(dev);
- mutex_lock(&sdata->hw->slaves_mtx);
+ mutex_lock(&sdata->local->slaves_mtx);
sdata->running = false;
- mutex_unlock(&sdata->hw->slaves_mtx);
+ mutex_unlock(&sdata->local->slaves_mtx);
if (!--local->open_count)
local->ops->stop(&local->hw);
@@ -109,7 +109,7 @@ mac802154_netdev_register(struct wpan_phy *phy, struct net_device *dev)
sdata = netdev_priv(dev);
sdata->dev = dev;
- sdata->hw = local;
+ sdata->local = local;
dev->needed_headroom = local->hw.extra_tx_headroom;
@@ -144,11 +144,11 @@ mac802154_del_iface(struct wpan_phy *phy, struct net_device *dev)
sdata = netdev_priv(dev);
- BUG_ON(sdata->hw->phy != phy);
+ BUG_ON(sdata->local->phy != phy);
- mutex_lock(&sdata->hw->slaves_mtx);
+ mutex_lock(&sdata->local->slaves_mtx);
list_del_rcu(&sdata->list);
- mutex_unlock(&sdata->hw->slaves_mtx);
+ mutex_unlock(&sdata->local->slaves_mtx);
synchronize_rcu();
unregister_netdevice(sdata->dev);
@@ -394,9 +394,9 @@ void ieee802154_unregister_hw(struct ieee802154_hw *hw)
mutex_unlock(&local->slaves_mtx);
list_for_each_entry_safe(sdata, next, &local->slaves, list) {
- mutex_lock(&sdata->hw->slaves_mtx);
+ mutex_lock(&sdata->local->slaves_mtx);
list_del(&sdata->list);
- mutex_unlock(&sdata->hw->slaves_mtx);
+ mutex_unlock(&sdata->local->slaves_mtx);
unregister_netdevice(sdata->dev);
}