From d77b4852b4d3698a90eef219acf9cddc964b1f3a Mon Sep 17 00:00:00 2001 From: Alexander Aring Date: Sun, 21 Jun 2015 16:45:20 +0200 Subject: mac802154: add llsec address update workaround This patch adds a workaround for using the new nl802154 netlink interface with the old ieee802154 netlink interface togehter. The nl802154 currently supports no access for llsec layer, currently there are users outside which are using both interfaces at the same time. This patch adds a necessary call when addresses are updated. Reported-by: Simon Vincent Suggested-by: Phoebe Buckheister Signed-off-by: Alexander Aring Signed-off-by: Marcel Holtmann --- net/mac802154/cfg.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'net/mac802154/cfg.c') diff --git a/net/mac802154/cfg.c b/net/mac802154/cfg.c index 317c4662e544..44db8613812e 100644 --- a/net/mac802154/cfg.c +++ b/net/mac802154/cfg.c @@ -145,13 +145,18 @@ static int ieee802154_set_pan_id(struct wpan_phy *wpan_phy, struct wpan_dev *wpan_dev, __le16 pan_id) { + int ret; + ASSERT_RTNL(); if (wpan_dev->pan_id == pan_id) return 0; - wpan_dev->pan_id = pan_id; - return 0; + ret = mac802154_wpan_update_llsec(wpan_dev->netdev); + if (!ret) + wpan_dev->pan_id = pan_id; + + return ret; } static int -- cgit v1.2.3