diff options
author | Alexander Aring <alex.aring@gmail.com> | 2014-10-28 13:21:30 -0400 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2014-10-28 18:19:08 -0400 |
commit | c7420c367d63a7e1414e010afb52c3837fd9134e (patch) | |
tree | 2af7e991d21480b7fde78719294a1fbfb356d1e5 /net | |
parent | 12439a53560097bc8e42cf14967717d14588dddd (diff) |
mac802154: move mac_params functions into mac_cmd
These functions can be static in mac_cmd file.
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net')
-rw-r--r-- | net/mac802154/ieee802154_i.h | 5 | ||||
-rw-r--r-- | net/mac802154/mac_cmd.c | 22 |
2 files changed, 22 insertions, 5 deletions
diff --git a/net/mac802154/ieee802154_i.h b/net/mac802154/ieee802154_i.h index 46c9fe7ba2b2..7cebc9844c00 100644 --- a/net/mac802154/ieee802154_i.h +++ b/net/mac802154/ieee802154_i.h | |||
@@ -140,11 +140,6 @@ void mac802154_dev_set_pan_id(struct net_device *dev, __le16 val); | |||
140 | void mac802154_dev_set_page_channel(struct net_device *dev, u8 page, u8 chan); | 140 | void mac802154_dev_set_page_channel(struct net_device *dev, u8 page, u8 chan); |
141 | u8 mac802154_dev_get_dsn(const struct net_device *dev); | 141 | u8 mac802154_dev_get_dsn(const struct net_device *dev); |
142 | 142 | ||
143 | int mac802154_set_mac_params(struct net_device *dev, | ||
144 | const struct ieee802154_mac_params *params); | ||
145 | void mac802154_get_mac_params(struct net_device *dev, | ||
146 | struct ieee802154_mac_params *params); | ||
147 | |||
148 | int mac802154_get_params(struct net_device *dev, | 143 | int mac802154_get_params(struct net_device *dev, |
149 | struct ieee802154_llsec_params *params); | 144 | struct ieee802154_llsec_params *params); |
150 | int mac802154_set_params(struct net_device *dev, | 145 | int mac802154_set_params(struct net_device *dev, |
diff --git a/net/mac802154/mac_cmd.c b/net/mac802154/mac_cmd.c index ed767f590ef9..fc261ab33347 100644 --- a/net/mac802154/mac_cmd.c +++ b/net/mac802154/mac_cmd.c | |||
@@ -82,6 +82,28 @@ static struct wpan_phy *mac802154_get_phy(const struct net_device *dev) | |||
82 | return to_phy(get_device(&sdata->local->phy->dev)); | 82 | return to_phy(get_device(&sdata->local->phy->dev)); |
83 | } | 83 | } |
84 | 84 | ||
85 | static int mac802154_set_mac_params(struct net_device *dev, | ||
86 | const struct ieee802154_mac_params *params) | ||
87 | { | ||
88 | struct ieee802154_sub_if_data *sdata = IEEE802154_DEV_TO_SUB_IF(dev); | ||
89 | |||
90 | mutex_lock(&sdata->local->iflist_mtx); | ||
91 | sdata->mac_params = *params; | ||
92 | mutex_unlock(&sdata->local->iflist_mtx); | ||
93 | |||
94 | return 0; | ||
95 | } | ||
96 | |||
97 | static void mac802154_get_mac_params(struct net_device *dev, | ||
98 | struct ieee802154_mac_params *params) | ||
99 | { | ||
100 | struct ieee802154_sub_if_data *sdata = IEEE802154_DEV_TO_SUB_IF(dev); | ||
101 | |||
102 | mutex_lock(&sdata->local->iflist_mtx); | ||
103 | *params = sdata->mac_params; | ||
104 | mutex_unlock(&sdata->local->iflist_mtx); | ||
105 | } | ||
106 | |||
85 | static struct ieee802154_llsec_ops mac802154_llsec_ops = { | 107 | static struct ieee802154_llsec_ops mac802154_llsec_ops = { |
86 | .get_params = mac802154_get_params, | 108 | .get_params = mac802154_get_params, |
87 | .set_params = mac802154_set_params, | 109 | .set_params = mac802154_set_params, |