diff options
Diffstat (limited to 'net/mac802154')
-rw-r--r-- | net/mac802154/mac802154.h | 1 | ||||
-rw-r--r-- | net/mac802154/mac_cmd.c | 2 | ||||
-rw-r--r-- | net/mac802154/mib.c | 14 |
3 files changed, 17 insertions, 0 deletions
diff --git a/net/mac802154/mac802154.h b/net/mac802154/mac802154.h index 69678644a5c2..a4dcaf1dd4b6 100644 --- a/net/mac802154/mac802154.h +++ b/net/mac802154/mac802154.h | |||
@@ -109,6 +109,7 @@ netdev_tx_t mac802154_tx(struct mac802154_priv *priv, struct sk_buff *skb, | |||
109 | 109 | ||
110 | /* MIB callbacks */ | 110 | /* MIB callbacks */ |
111 | void mac802154_dev_set_short_addr(struct net_device *dev, u16 val); | 111 | void mac802154_dev_set_short_addr(struct net_device *dev, u16 val); |
112 | u16 mac802154_dev_get_short_addr(const struct net_device *dev); | ||
112 | void mac802154_dev_set_ieee_addr(struct net_device *dev); | 113 | void mac802154_dev_set_ieee_addr(struct net_device *dev); |
113 | u16 mac802154_dev_get_pan_id(const struct net_device *dev); | 114 | u16 mac802154_dev_get_pan_id(const struct net_device *dev); |
114 | void mac802154_dev_set_pan_id(struct net_device *dev, u16 val); | 115 | void mac802154_dev_set_pan_id(struct net_device *dev, u16 val); |
diff --git a/net/mac802154/mac_cmd.c b/net/mac802154/mac_cmd.c index 7f5403e5ea91..5d9a47b27938 100644 --- a/net/mac802154/mac_cmd.c +++ b/net/mac802154/mac_cmd.c | |||
@@ -71,4 +71,6 @@ struct ieee802154_reduced_mlme_ops mac802154_mlme_reduced = { | |||
71 | struct ieee802154_mlme_ops mac802154_mlme_wpan = { | 71 | struct ieee802154_mlme_ops mac802154_mlme_wpan = { |
72 | .get_phy = mac802154_get_phy, | 72 | .get_phy = mac802154_get_phy, |
73 | .start_req = mac802154_mlme_start_req, | 73 | .start_req = mac802154_mlme_start_req, |
74 | .get_pan_id = mac802154_dev_get_pan_id, | ||
75 | .get_short_addr = mac802154_dev_get_short_addr, | ||
74 | }; | 76 | }; |
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 | ||
103 | u16 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 | |||
103 | void mac802154_dev_set_ieee_addr(struct net_device *dev) | 117 | void 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); |