aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac802154/mib.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac802154/mib.c')
-rw-r--r--net/mac802154/mib.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/net/mac802154/mib.c b/net/mac802154/mib.c
index 380829d84600..5c66b8f73f02 100644
--- a/net/mac802154/mib.c
+++ b/net/mac802154/mib.c
@@ -100,6 +100,20 @@ void mac802154_dev_set_short_addr(struct net_device *dev, u16 val)
100 } 100 }
101} 101}
102 102
103u16 mac802154_dev_get_short_addr(const struct net_device *dev)
104{
105 struct mac802154_sub_if_data *priv = netdev_priv(dev);
106 u16 ret;
107
108 BUG_ON(dev->type != ARPHRD_IEEE802154);
109
110 spin_lock_bh(&priv->mib_lock);
111 ret = priv->short_addr;
112 spin_unlock_bh(&priv->mib_lock);
113
114 return ret;
115}
116
103void mac802154_dev_set_ieee_addr(struct net_device *dev) 117void mac802154_dev_set_ieee_addr(struct net_device *dev)
104{ 118{
105 struct mac802154_sub_if_data *priv = netdev_priv(dev); 119 struct mac802154_sub_if_data *priv = netdev_priv(dev);