diff options
author | Alexander Aring <alex.aring@gmail.com> | 2014-11-09 10:36:46 +0300 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2014-11-09 21:50:28 +0300 |
commit | 5fb3f026ae15827fe32e34adafce0d0f63ad0366 (patch) | |
tree | 35b5e05e5ff8c2dd6fc72568645c66641aa8daa9 /net/mac802154/iface.c | |
parent | 863e88f255dac0657e57d5f1a1f95ee8733f8c13 (diff) | |
download | linux-5fb3f026ae15827fe32e34adafce0d0f63ad0366.tar.xz |
mac802154: remove mac_params in sdata
This patch removes the mac_params from subif data struct. Instead we
manipulate the wpan attributes directly.
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/mac802154/iface.c')
-rw-r--r-- | net/mac802154/iface.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/net/mac802154/iface.c b/net/mac802154/iface.c index 6669da7446f2..c0b96cf525d6 100644 --- a/net/mac802154/iface.c +++ b/net/mac802154/iface.c @@ -205,22 +205,21 @@ static int mac802154_wpan_open(struct net_device *dev) } if (local->hw.flags & IEEE802154_HW_LBT) { - rc = drv_set_lbt_mode(local, sdata->mac_params.lbt); + rc = drv_set_lbt_mode(local, wpan_dev->lbt); if (rc < 0) goto out; } if (local->hw.flags & IEEE802154_HW_CSMA_PARAMS) { - rc = drv_set_csma_params(local, sdata->mac_params.min_be, - sdata->mac_params.max_be, - sdata->mac_params.csma_retries); + rc = drv_set_csma_params(local, wpan_dev->min_be, + wpan_dev->max_be, + wpan_dev->csma_retries); if (rc < 0) goto out; } if (local->hw.flags & IEEE802154_HW_FRAME_RETRIES) { - rc = drv_set_max_frame_retries(local, - sdata->mac_params.frame_retries); + rc = drv_set_max_frame_retries(local, wpan_dev->frame_retries); if (rc < 0) goto out; } @@ -410,11 +409,11 @@ ieee802154_setup_sdata(struct ieee802154_sub_if_data *sdata, int type) get_random_bytes(&wpan_dev->dsn, 1); /* defaults per 802.15.4-2011 */ - sdata->mac_params.min_be = 3; - sdata->mac_params.max_be = 5; - sdata->mac_params.csma_retries = 4; + wpan_dev->min_be = 3; + wpan_dev->max_be = 5; + wpan_dev->csma_retries = 4; /* for compatibility, actual default is 3 */ - sdata->mac_params.frame_retries = -1; + wpan_dev->frame_retries = -1; ieee802154_be64_to_le64(&wpan_dev->extended_addr, sdata->dev->dev_addr); wpan_dev->pan_id = cpu_to_le16(IEEE802154_PANID_BROADCAST); |