Commit c7420c36 authored by Alexander Aring's avatar Alexander Aring Committed by Marcel Holtmann

mac802154: move mac_params functions into mac_cmd

These functions can be static in mac_cmd file.
Signed-off-by: default avatarAlexander Aring <alex.aring@gmail.com>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent 12439a53
...@@ -140,11 +140,6 @@ void mac802154_dev_set_pan_id(struct net_device *dev, __le16 val); ...@@ -140,11 +140,6 @@ void mac802154_dev_set_pan_id(struct net_device *dev, __le16 val);
void mac802154_dev_set_page_channel(struct net_device *dev, u8 page, u8 chan); void mac802154_dev_set_page_channel(struct net_device *dev, u8 page, u8 chan);
u8 mac802154_dev_get_dsn(const struct net_device *dev); u8 mac802154_dev_get_dsn(const struct net_device *dev);
int mac802154_set_mac_params(struct net_device *dev,
const struct ieee802154_mac_params *params);
void mac802154_get_mac_params(struct net_device *dev,
struct ieee802154_mac_params *params);
int mac802154_get_params(struct net_device *dev, int mac802154_get_params(struct net_device *dev,
struct ieee802154_llsec_params *params); struct ieee802154_llsec_params *params);
int mac802154_set_params(struct net_device *dev, int mac802154_set_params(struct net_device *dev,
......
...@@ -82,6 +82,28 @@ static struct wpan_phy *mac802154_get_phy(const struct net_device *dev) ...@@ -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)); 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 = { static struct ieee802154_llsec_ops mac802154_llsec_ops = {
.get_params = mac802154_get_params, .get_params = mac802154_get_params,
.set_params = mac802154_set_params, .set_params = mac802154_set_params,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment