The following commit has been merged in the merge/master branch: commit 06818470d4b84f6b6fa82d44795665fde393240e Merge: 0a5c1a8f7b619cfe3bf0a0480dd05ba8341e4acb 144c829015fdb7c8847e15d7c4efaf5562562058 Author: Marek Lindner mareklindner@neomailbox.ch Date: Mon Jun 6 23:57:21 2016 +0800
Merge branch 'next'
diff --combined Makefile index 365a7cc,2568fb2..725c70b --- a/Makefile +++ b/Makefile @@@ -43,9 -43,8 +43,9 @@@ RM ?= rm - REVISION= $(shell if [ -d "$(PWD)/.git" ]; then \ echo $$(git --git-dir="$(PWD)/.git" describe --always --dirty --match "v*" |sed 's/^v//' 2> /dev/null || echo "[unknown]"); \ fi) - export NOSTDINC_FLAGS := \ + NOSTDINC_FLAGS += \ -I$(PWD)/compat-include/ \ + -I$(PWD)/include/ \ -include $(PWD)/compat.h \ $(CFLAGS)
@@@ -53,12 -52,12 +53,17 @@@ ifneq ($(REVISION), NOSTDINC_FLAGS += -DBATADV_SOURCE_VERSION="$(REVISION)" endif
+include $(PWD)/compat-sources/Makefile + + obj-y += net/batman-adv/ + +export batman-adv-y + ++ BUILD_FLAGS := \ - M=$(PWD)/net/batman-adv \ + M=$(PWD) \ + PWD=$(PWD) \ + REVISION=$(REVISION) \ CONFIG_BATMAN_ADV=m \ CONFIG_BATMAN_ADV_DEBUG=$(CONFIG_BATMAN_ADV_DEBUG) \ CONFIG_BATMAN_ADV_BLA=$(CONFIG_BATMAN_ADV_BLA) \ @@@ -66,7 -65,7 +71,7 @@@ CONFIG_BATMAN_ADV_NC=$(CONFIG_BATMAN_ADV_NC) \ CONFIG_BATMAN_ADV_MCAST=$(CONFIG_BATMAN_ADV_MCAST) \ CONFIG_BATMAN_ADV_BATMAN_V=$(CONFIG_BATMAN_ADV_BATMAN_V) \ - INSTALL_MOD_DIR=updates/net/batman-adv/ + INSTALL_MOD_DIR=updates/
all: config $(MAKE) -C $(KERNELPATH) $(BUILD_FLAGS) modules diff --combined net/batman-adv/soft-interface.c index 18b6d07,287a387..7527c06 --- a/net/batman-adv/soft-interface.c +++ b/net/batman-adv/soft-interface.c @@@ -48,7 -48,6 +48,7 @@@ #include <linux/types.h> #include <linux/workqueue.h>
+#include "bat_algo.h" #include "bridge_loop_avoidance.h" #include "debugfs.h" #include "distributed-arp-table.h" @@@ -256,7 -255,7 +256,7 @@@ static int batadv_interface_tx(struct s if (batadv_compare_eth(ethhdr->h_dest, ectp_addr)) goto dropped;
- gw_mode = atomic_read(&bat_priv->gw_mode); + gw_mode = atomic_read(&bat_priv->gw.mode); if (is_multicast_ether_addr(ethhdr->h_dest)) { /* if gw mode is off, broadcast every packet */ if (gw_mode == BATADV_GW_MODE_OFF) { @@@ -809,10 -808,6 +809,10 @@@ static int batadv_softif_init_late(stru atomic_set(&bat_priv->distributed_arp_table, 1); #endif #ifdef CONFIG_BATMAN_ADV_MCAST + bat_priv->mcast.querier_ipv4.exists = false; + bat_priv->mcast.querier_ipv4.shadowing = false; + bat_priv->mcast.querier_ipv6.exists = false; + bat_priv->mcast.querier_ipv6.shadowing = false; bat_priv->mcast.flags = BATADV_NO_FLAGS; atomic_set(&bat_priv->multicast_mode, 1); atomic_set(&bat_priv->mcast.num_disabled, 0); @@@ -820,8 -815,8 +820,8 @@@ atomic_set(&bat_priv->mcast.num_want_all_ipv4, 0); atomic_set(&bat_priv->mcast.num_want_all_ipv6, 0); #endif - atomic_set(&bat_priv->gw_mode, BATADV_GW_MODE_OFF); - atomic_set(&bat_priv->gw_sel_class, 20); + atomic_set(&bat_priv->gw.mode, BATADV_GW_MODE_OFF); + atomic_set(&bat_priv->gw.sel_class, 20); atomic_set(&bat_priv->gw.bandwidth_down, 100); atomic_set(&bat_priv->gw.bandwidth_up, 20); atomic_set(&bat_priv->orig_interval, 1000); @@@ -842,8 -837,6 +842,8 @@@ #ifdef CONFIG_BATMAN_ADV_BLA atomic_set(&bat_priv->bla.num_requests, 0); #endif + atomic_set(&bat_priv->tp_num, 0); + bat_priv->tt.last_changeset = NULL; bat_priv->tt.last_changeset_len = 0; bat_priv->isolation_mark = 0; @@@ -1040,7 -1033,9 +1040,9 @@@ void batadv_softif_destroy_sysfs(struc static void batadv_softif_destroy_netlink(struct net_device *soft_iface, struct list_head *head) { + struct batadv_priv *bat_priv = netdev_priv(soft_iface); struct batadv_hard_iface *hard_iface; + struct batadv_softif_vlan *vlan;
list_for_each_entry(hard_iface, &batadv_hardif_list, list) { if (hard_iface->soft_iface == soft_iface) @@@ -1048,6 -1043,13 +1050,13 @@@ BATADV_IF_CLEANUP_KEEP); }
+ /* destroy the "untagged" VLAN */ + vlan = batadv_softif_vlan_get(bat_priv, BATADV_NO_FLAGS); + if (vlan) { + batadv_softif_destroy_vlan(bat_priv, vlan); + batadv_softif_vlan_put(vlan); + } + batadv_sysfs_del_meshif(soft_iface); unregister_netdevice_queue(soft_iface, head); }