summaryrefslogtreecommitdiff
path: root/net/mac802154/iface.c
diff options
context:
space:
mode:
authorAlexander Aring <alex.aring@gmail.com>2015-06-21 17:45:20 +0300
committerMarcel Holtmann <marcel@holtmann.org>2015-07-23 18:10:48 +0300
commitd77b4852b4d3698a90eef219acf9cddc964b1f3a (patch)
treee6f399f7f906a271dbfeb0533280ab78da8ee36c /net/mac802154/iface.c
parentfac5e5b912bd1b42bad292e0b03956967229b45b (diff)
downloadlinux-d77b4852b4d3698a90eef219acf9cddc964b1f3a.tar.xz
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 <simon.vincent@xsilon.com> Suggested-by: Phoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de> 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.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/net/mac802154/iface.c b/net/mac802154/iface.c
index 8b698246a51b..4760368a3493 100644
--- a/net/mac802154/iface.c
+++ b/net/mac802154/iface.c
@@ -30,7 +30,7 @@
#include "ieee802154_i.h"
#include "driver-ops.h"
-static int mac802154_wpan_update_llsec(struct net_device *dev)
+int mac802154_wpan_update_llsec(struct net_device *dev)
{
struct ieee802154_sub_if_data *sdata = IEEE802154_DEV_TO_SUB_IF(dev);
struct ieee802154_mlme_ops *ops = ieee802154_mlme_ops(dev);
@@ -471,6 +471,7 @@ ieee802154_setup_sdata(struct ieee802154_sub_if_data *sdata,
enum nl802154_iftype type)
{
struct wpan_dev *wpan_dev = &sdata->wpan_dev;
+ int ret;
u8 tmp;
/* set some type-dependent values */
@@ -505,6 +506,10 @@ ieee802154_setup_sdata(struct ieee802154_sub_if_data *sdata,
mutex_init(&sdata->sec_mtx);
mac802154_llsec_init(&sdata->sec);
+ ret = mac802154_wpan_update_llsec(sdata->dev);
+ if (ret < 0)
+ return ret;
+
break;
case NL802154_IFTYPE_MONITOR:
sdata->dev->destructor = free_netdev;