From patchwork Thu Jan 21 15:16:48 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 5014 Return-Path: Received-SPF: Neutral (access neither permitted nor denied) identity=mailfrom; client-ip=74.125.82.43; helo=mail-wm0-f43.google.com; envelope-from=sven@open-mesh.com; receiver=b.a.t.m.a.n@lists.open-mesh.org Authentication-Results: open-mesh.org; dmarc=none header.from=open-mesh.com Authentication-Results: open-mesh.org; dkim=pass reason="2048-bit key; unprotected key" header.d=open-mesh-com.20150623.gappssmtp.com header.i=@open-mesh-com.20150623.gappssmtp.com header.b=r1ROyf1b; dkim-adsp=none (unprotected policy); dkim-atps=neutral Received: from mail-wm0-f43.google.com (mail-wm0-f43.google.com [74.125.82.43]) by open-mesh.org (Postfix) with ESMTPS id 7192C80F0F for ; Thu, 21 Jan 2016 16:16:50 +0100 (CET) Received: by mail-wm0-f43.google.com with SMTP id 123so178443356wmz.0 for ; Thu, 21 Jan 2016 07:16:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=open-mesh-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:user-agent:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=Yuilh18LTd6gXS30WDkDnU9AxXmITvr7Hp0KJL4/T24=; b=r1ROyf1bZPKlHkmBemFVdehrbGX5p5j8+t8pMTCEMrM0gCuHPrc26O+LlsqM9PkI2C Mo1x0jVI72nqxvbWZDqLTOubGV6sF9cBN3MSFc9sbTzBAtST3IikTgYct6VNGjuVOinT s5+fWkRiyoATAWdJyhrL94vTPI1wpobWKq2PBgqwB7eQYxqqf5DfEe+0SireD1a3FY9m 6/LX1tBLoF7Cshxlw32wmkWHX9BkKGUxjYsqnNgpoxSJXjgot+Zv4iWBnt1QuBf3ttf7 CoqAxmrCO/pHbe45OkPyPLpbe+zaUBGx3Xl3AeaBumttM4x4ZAmPENrBtzkLvZbE2o4h duZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :in-reply-to:references:mime-version:content-type :content-transfer-encoding; bh=Yuilh18LTd6gXS30WDkDnU9AxXmITvr7Hp0KJL4/T24=; b=Qy3xt+d+XEIlHTbQcem0N1vzU1MQMlpXQdkW8Yc702dc+nZswPmp/+mVegoSEx0+vZ gB4cl5erXw7DCBlCsxbY+jHdTMDC0yZlJ7tR9k/jWtmLgZPZAlpmNzv8hbxlMO8U+qq+ fviqF3UIJtv4Jz035Uf0Ss4NGHt/sPCFTDua+Smh5AA85kvv4tG2HwmY++PsIMF1K+H6 W0Ik8MAFsiDNno/5rrys7FERpWHz3hBQ+u8l39RCPOYEyRfhq1C+Y0p92r3RZtcIrNsW 7Ztpn6MQirpvsBrfrkEf0rIqeWveYDPjnm5KMnuTAgbXmXVAxETktytjR+OvZuUszd8F bWyg== X-Gm-Message-State: AG10YOQaxQczNY0lvZh5uEy/l16G4lWKR4t/227V1p7RQLbr6t+HljWh1dVxz/P0gmiQH8kJ X-Received: by 10.28.148.140 with SMTP id w134mr11463857wmd.66.1453389410116; Thu, 21 Jan 2016 07:16:50 -0800 (PST) Received: from bentobox.localnet (x4d05afc7.dyn.telefonica.de. [77.5.175.199]) by smtp.gmail.com with ESMTPSA id r4sm1879178wjy.39.2016.01.21.07.16.49 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 21 Jan 2016 07:16:49 -0800 (PST) From: Sven Eckelmann To: Felix Fietkau Date: Thu, 21 Jan 2016 16:16:48 +0100 Message-ID: <1755169.cZlx8PuODy@bentobox> User-Agent: KMail/4.14.10 (Linux/4.3.0-1-amd64; KDE/4.14.14; x86_64; ; ) In-Reply-To: <56A0EF66.9090003@openwrt.org> References: <8047297.0qIFjkW2bL@voltaire> <132128022.hJazYISVSs@bentobox> <56A0EF66.9090003@openwrt.org> MIME-Version: 1.0 Cc: openwrt-devel@lists.openwrt.org, b.a.t.m.a.n@lists.open-mesh.org, Marek Lindner Subject: Re: [B.A.T.M.A.N.] OpenWrt cfg80211.h station_info incompatibility with kernel+mac80211 [was: B.A.T.M.A.N. V leaves the nest v2] X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jan 2016 15:16:53 -0000 On Thursday 21 January 2016 15:47:02 Felix Fietkau wrote: [...] > > Hm, didn't work out so well. It basically explodes right away because > > possible_net_t, possible_read_pnet, possible_write_pnet is not defined on > > v3.18 when not using the mac80211 backporting headers. And when usign the > > backporting headers then it will explode because it conflicts with batman- > > adv's own backporting stuff. And without the batman-adv's backporting headers > > it will also not compile due to missing backporting hacks. > I think in the short term it would be a good idea to identify what's > missing in the mac80211 backport support and make patches for it. > You should also rebase those on top of backports.git and submit them > upstream. Yes, this was already started after/during the linux plumbers conf 2014 [1]. But it died the horrible death of being ignored and neglected - especially after the multicast optimization was integrated. Someone who want to use the mac80211 stuff with the batman-adv package can use the attached patch as starting point. Kind regards, Sven [1] https://github.com/ordex/batman-adv-backport/commits/TODO-compat From: Sven Eckelmann Date: Thu, 21 Jan 2016 16:04:20 +0100 Subject: [PATCH] batman-adv: Use the mac80211 compat layer --- batman-adv/Makefile | 41 +++++++++++++++++++++++++++-------------- 1 file changed, 27 insertions(+), 14 deletions(-) diff --git a/batman-adv/Makefile b/batman-adv/Makefile index 1eb6bbe..0b2637d 100644 --- a/batman-adv/Makefile +++ b/batman-adv/Makefile @@ -27,7 +27,7 @@ define KernelPackage/batman-adv URL:=https://www.open-mesh.org/ MAINTAINER:=Marek Lindner SUBMENU:=Network Support - DEPENDS:=+KMOD_BATMAN_ADV_BLA:kmod-lib-crc16 +kmod-crypto-core +kmod-crypto-crc32c +kmod-lib-crc32c + DEPENDS:=+KMOD_BATMAN_ADV_BLA:kmod-lib-crc16 +kmod-crypto-core +kmod-crypto-crc32c +kmod-lib-crc32c +kmod-cfg80211 TITLE:=B.A.T.M.A.N. Adv FILES:=$(PKG_BUILD_DIR)/net/batman-adv/batman-adv.$(LINUX_KMOD_SUFFIX) AUTOLOAD:=$(call AutoLoad,50,batman-adv) @@ -47,20 +47,37 @@ define Package/kmod-batman-adv/conffiles /etc/config/batman-adv endef -MAKE_BATMAN_ADV_ARGS += \ - CROSS_COMPILE="$(TARGET_CROSS)" \ - KERNELPATH="$(LINUX_DIR)" \ - ARCH="$(LINUX_KARCH)" \ - PATH="$(TARGET_PATH)" \ - SUBDIRS="$(PKG_BUILD_DIR)" \ - PWD="$(PKG_BUILD_DIR)" \ - LINUX_VERSION="$(LINUX_VERSION)" \ +PKG_EXTRA_KCONFIG:= \ + CONFIG_BATMAN_ADV=m \ CONFIG_BATMAN_ADV_DEBUG=$(if $(CONFIG_KMOD_BATMAN_ADV_DEBUG_LOG),y,n) \ CONFIG_BATMAN_ADV_BLA=$(if $(CONFIG_KMOD_BATMAN_ADV_BLA),y,n) \ CONFIG_BATMAN_ADV_DAT=$(if $(CONFIG_KMOD_BATMAN_ADV_DAT),y,n) \ CONFIG_BATMAN_ADV_MCAST=$(if $(CONFIG_KMOD_BATMAN_ADV_MCAST),y,n) \ CONFIG_BATMAN_ADV_NC=$(if $(CONFIG_KMOD_BATMAN_ADV_NC),y,n) \ - REVISION="" all + CONFIG_BATMAN_ADV_BATMAN_V=$(if $(CONFIG_KMOD_BATMAN_ADV_BATMAN_V),y,n) \ + +PKG_EXTRA_CFLAGS:= \ + $(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=m,%,$(filter %=m,$(PKG_EXTRA_KCONFIG)))) \ + $(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=y,%,$(filter %=y,$(PKG_EXTRA_KCONFIG)))) \ + +NOSTDINC_FLAGS = \ + -I$(PKG_BUILD_DIR)/net/batman-adv \ + -I$(STAGING_DIR)/usr/include/mac80211-backport/uapi \ + -I$(STAGING_DIR)/usr/include/mac80211-backport \ + -I$(STAGING_DIR)/usr/include/mac80211/uapi \ + -I$(STAGING_DIR)/usr/include/mac80211 \ + -include backport/backport.h + +define Build/Compile + +$(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" \ + ARCH="$(LINUX_KARCH)" \ + CROSS_COMPILE="$(TARGET_CROSS)" \ + SUBDIRS="$(PKG_BUILD_DIR)/net/batman-adv" \ + $(PKG_EXTRA_KCONFIG) \ + EXTRA_CFLAGS="$(PKG_EXTRA_CFLAGS)" \ + NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \ + modules +endef define Build/Prepare $(call Build/Prepare/Default) @@ -68,10 +85,6 @@ define Build/Prepare $(PKG_BUILD_DIR)/net/batman-adv/main.h endef -define Build/Compile - $(MAKE) -C "$(PKG_BUILD_DIR)" $(MAKE_BATMAN_ADV_ARGS) -endef - define Build/Clean rm -rf $(BUILD_DIR)/$(PKG_NAME)/ endef