Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 315145
b: refs/heads/master
c: e885a47
h: refs/heads/master
i:
  315143: 37e8edb
v: v3
  • Loading branch information
alex.bluesman.smirnov@gmail.com authored and David S. Miller committed Jul 12, 2012
1 parent a693031 commit 7bfbfed
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5b00f2eef3a3b085f702675e8158b8eaf0fb663d
refs/heads/master: e885a47a474fe53ed7d952af4b6e9a5cf86d9a07
1 change: 1 addition & 0 deletions trunk/net/mac802154/mac802154.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ netdev_tx_t mac802154_tx(struct mac802154_priv *priv, struct sk_buff *skb,

/* MIB callbacks */
void mac802154_dev_set_short_addr(struct net_device *dev, u16 val);
u16 mac802154_dev_get_short_addr(const struct net_device *dev);
void mac802154_dev_set_ieee_addr(struct net_device *dev);
u16 mac802154_dev_get_pan_id(const struct net_device *dev);
void mac802154_dev_set_pan_id(struct net_device *dev, u16 val);
Expand Down
2 changes: 2 additions & 0 deletions trunk/net/mac802154/mac_cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,6 @@ struct ieee802154_reduced_mlme_ops mac802154_mlme_reduced = {
struct ieee802154_mlme_ops mac802154_mlme_wpan = {
.get_phy = mac802154_get_phy,
.start_req = mac802154_mlme_start_req,
.get_pan_id = mac802154_dev_get_pan_id,
.get_short_addr = mac802154_dev_get_short_addr,
};
14 changes: 14 additions & 0 deletions trunk/net/mac802154/mib.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,20 @@ void mac802154_dev_set_short_addr(struct net_device *dev, u16 val)
}
}

u16 mac802154_dev_get_short_addr(const struct net_device *dev)
{
struct mac802154_sub_if_data *priv = netdev_priv(dev);
u16 ret;

BUG_ON(dev->type != ARPHRD_IEEE802154);

spin_lock_bh(&priv->mib_lock);
ret = priv->short_addr;
spin_unlock_bh(&priv->mib_lock);

return ret;
}

void mac802154_dev_set_ieee_addr(struct net_device *dev)
{
struct mac802154_sub_if_data *priv = netdev_priv(dev);
Expand Down

0 comments on commit 7bfbfed

Please sign in to comment.