summaryrefslogtreecommitdiff
path: root/net/mac802154/mac_cmd.c
diff options
context:
space:
mode:
authorAlexander Aring <alex.aring@gmail.com>2014-10-28 20:21:30 +0300
committerMarcel Holtmann <marcel@holtmann.org>2014-10-29 01:19:08 +0300
commitc7420c367d63a7e1414e010afb52c3837fd9134e (patch)
tree2af7e991d21480b7fde78719294a1fbfb356d1e5 /net/mac802154/mac_cmd.c
parent12439a53560097bc8e42cf14967717d14588dddd (diff)
downloadlinux-c7420c367d63a7e1414e010afb52c3837fd9134e.tar.xz
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/mac802154/mac_cmd.c')
-rw-r--r--net/mac802154/mac_cmd.c22
1 files changed, 22 insertions, 0 deletions
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)
return to_phy(get_device(&sdata->local->phy->dev));
}
+static int mac802154_set_mac_params(struct net_device *dev,
+ const struct ieee802154_mac_params *params)
+{
+ struct ieee802154_sub_if_data *sdata = IEEE802154_DEV_TO_SUB_IF(dev);
+
+ mutex_lock(&sdata->local->iflist_mtx);
+ sdata->mac_params = *params;
+ mutex_unlock(&sdata->local->iflist_mtx);
+
+ return 0;
+}
+
+static void mac802154_get_mac_params(struct net_device *dev,
+ struct ieee802154_mac_params *params)
+{
+ struct ieee802154_sub_if_data *sdata = IEEE802154_DEV_TO_SUB_IF(dev);
+
+ mutex_lock(&sdata->local->iflist_mtx);
+ *params = sdata->mac_params;
+ mutex_unlock(&sdata->local->iflist_mtx);
+}
+
static struct ieee802154_llsec_ops mac802154_llsec_ops = {
.get_params = mac802154_get_params,
.set_params = mac802154_set_params,