diff options
author | Sven Eckelmann <sven@narfation.org> | 2019-03-03 19:25:26 +0100 |
---|---|---|
committer | Simon Wunderlich <sw@simonwunderlich.de> | 2019-03-25 09:31:19 +0100 |
commit | 438b3d3fae4346a49fe12fa7cc1dc9327f006a91 (patch) | |
tree | 54eb7f7a5b14b3c97fd00a493f85ec4a13675dd8 /net | |
parent | ca8c3b922e7032aff6cc3fd05548f4df1f3df90e (diff) | |
download | linux-438b3d3fae4346a49fe12fa7cc1dc9327f006a91.tar.bz2 |
batman-adv: Fix genl notification for throughput_override
The throughput_override sysfs file is not below the meshif but below a
hardif. The kobj has therefore not a pointer which can be used to find the
batadv_priv data. The pointer stored in the hardif object must be used
instead to find the correct meshif private data.
Fixes: 7e6f461efe25 ("batman-adv: Trigger genl notification on sysfs config change")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
Diffstat (limited to 'net')
-rw-r--r-- | net/batman-adv/sysfs.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/net/batman-adv/sysfs.c b/net/batman-adv/sysfs.c index 0b4b3fb778a6..208655cf6717 100644 --- a/net/batman-adv/sysfs.c +++ b/net/batman-adv/sysfs.c @@ -1116,9 +1116,9 @@ static ssize_t batadv_store_throughput_override(struct kobject *kobj, struct attribute *attr, char *buff, size_t count) { - struct batadv_priv *bat_priv = batadv_kobj_to_batpriv(kobj); struct net_device *net_dev = batadv_kobj_to_netdev(kobj); struct batadv_hard_iface *hard_iface; + struct batadv_priv *bat_priv; u32 tp_override; u32 old_tp_override; bool ret; @@ -1147,7 +1147,10 @@ static ssize_t batadv_store_throughput_override(struct kobject *kobj, atomic_set(&hard_iface->bat_v.throughput_override, tp_override); - batadv_netlink_notify_hardif(bat_priv, hard_iface); + if (hard_iface->soft_iface) { + bat_priv = netdev_priv(hard_iface->soft_iface); + batadv_netlink_notify_hardif(bat_priv, hard_iface); + } out: batadv_hardif_put(hard_iface); |