From patchwork Thu Sep 14 09:00:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Mukhin X-Patchwork-Id: 813750 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Kmv1nWX/"; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xtCF54yJZz9s0Z for ; Thu, 14 Sep 2017 19:01:13 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 9219C8986F; Thu, 14 Sep 2017 09:01:10 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 80dY36FigcOs; Thu, 14 Sep 2017 09:01:09 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id D01DB8985A; Thu, 14 Sep 2017 09:01:08 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 1871D1C1734 for ; Thu, 14 Sep 2017 09:01:08 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 10F458985A for ; Thu, 14 Sep 2017 09:01:08 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KXfiwNq5Y0Xv for ; Thu, 14 Sep 2017 09:01:07 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-lf0-f68.google.com (mail-lf0-f68.google.com [209.85.215.68]) by whitealder.osuosl.org (Postfix) with ESMTPS id AC9C08984C for ; Thu, 14 Sep 2017 09:01:06 +0000 (UTC) Received: by mail-lf0-f68.google.com with SMTP id h80so1260446lfe.1 for ; Thu, 14 Sep 2017 02:01:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ZEBNrAh4xIybD4y/3tjbDGNIP9NHBQyuR9CFn1dlr6c=; b=Kmv1nWX/jCsXEL2Hi0AFdhYjFSl+wWHVUICXxQLjO3oKAMSAZl/sK1nK6HwTZHK3Y9 9WzJYGkOvm6GziHTjYOgEySIeKXLV3PeA7WlCKPvjIsHeabtR1s31rdugcw5uc3Ksi0p eoYneHHSTucvskKbFsU04FzwUPKj/QPWFLrltSZvr653w54DcANzcEFKDKn8RI+MGEmh EZsRAHPD6x6mICfZRL6S74G2CGRu+NZVkNRyt4qke57TV4GkwOtRzzNxeJwzlxTuESBo sPYukkPMxlYrt7yD9iVMgu7dKun0lE47ocpqFO/97EYUkm97Sx+QZg7WCXdc4fWKUjx7 iG0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ZEBNrAh4xIybD4y/3tjbDGNIP9NHBQyuR9CFn1dlr6c=; b=T5LYbfBPuD7SIndOkNv85LqInqMhicqIFD2PmTD8g5FSnmGZNfrhm32DvaJdDnFzAe oGeo3s8FmGPqiRFd85g/L93/bq1Vhz04sqF4Z4yP3nw3XLGfSTsoSkJlAi5mqM9fxNeT mDDUIW2yujGa/H6V+5dV6YVRUwLhVOgY3XInVLwI9H6d1NnqRpENKwAZQfqlBL3UOI90 LgFvjFyfgrQH0Z8ysx3vLnEhL9jt+sdfDolVQ3h9EYH9/perODNQ2mpBHLJW4pLHrTyr YgAcmLYMAcI8cv/kZQCfy8Ki3Nbi8aV8UCEbNchtyG97zsVzJzOeU4Gln2tIrnFOhdXL x5Og== X-Gm-Message-State: AHPjjUiGr2vBR9829mwo+hSNHMbVNrObz/k36GxusRVWFT89fTAZo4DO Qye4gvc98D6z6WW10r0= X-Google-Smtp-Source: AOwi7QDcQIEQdyVwIr+JH+X4EtA5WREw9MFpgtjf624YbEgHuGxl1UCtncbO+1z+rDPN+X1KOGeUXw== X-Received: by 10.25.142.215 with SMTP id a84mr9125150lfl.25.1505379664395; Thu, 14 Sep 2017 02:01:04 -0700 (PDT) Received: from localhost.localdomain ([2a00:1838:30:a00:626d:c7ff:fecc:a711]) by smtp.gmail.com with ESMTPSA id o132sm2895110lfe.96.2017.09.14.02.01.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Sep 2017 02:01:03 -0700 (PDT) From: Alexander Mukhin To: buildroot@busybox.net Date: Thu, 14 Sep 2017 12:00:43 +0300 Message-Id: <20170914090043.1240-1-alexander.i.mukhin@gmail.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <874C29DC-F92F-46E8-9323-EF25658D8834@gmail.com> References: <874C29DC-F92F-46E8-9323-EF25658D8834@gmail.com> Cc: Alexander Mukhin Subject: [Buildroot] [PATCH] hostapd: add support for Realtek driver X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Since kernel drivers for Realtek wireless chips use non-standard interfaces, upstream hostapd does not support them. One have to apply an external patch for hostapd to work with these chips. See: https://github.com/pritambaral/hostapd-rtl871xdrv A configuration option is added to enable support for Realtek chips, and it's turned off by default. Signed-off-by: Alexander Mukhin --- DEVELOPERS | 3 +++ .../0001-add-realtek-driver-to-defconfig.patch | 29 ++++++++++++++++++++++ .../0002-add-rtl871xdrv-to-sample-config.patch | 28 +++++++++++++++++++++ package/hostapd/Config.in | 5 ++++ package/hostapd/hostapd.hash | 1 + package/hostapd/hostapd.mk | 5 ++++ 6 files changed, 71 insertions(+) create mode 100644 package/hostapd/0001-add-realtek-driver-to-defconfig.patch create mode 100644 package/hostapd/0002-add-rtl871xdrv-to-sample-config.patch diff --git a/DEVELOPERS b/DEVELOPERS index 21eafc9d2..57fc74c25 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -68,6 +68,9 @@ F: package/putty/ N: Alexander Lukichev F: package/openpgm/ +N: Alexander Mukhin +F: package/hostapd/ + N: Alexander Varnin F: package/liblog4c-localtime/ diff --git a/package/hostapd/0001-add-realtek-driver-to-defconfig.patch b/package/hostapd/0001-add-realtek-driver-to-defconfig.patch new file mode 100644 index 000000000..3cc5f624f --- /dev/null +++ b/package/hostapd/0001-add-realtek-driver-to-defconfig.patch @@ -0,0 +1,29 @@ +From 8ae1094c52e462071cd98c994f463af9bdb6ac08 Mon Sep 17 00:00:00 2001 +From: Alexander Mukhin +Date: Wed, 13 Sep 2017 11:28:50 +0300 +Subject: [PATCH 1/2] add realtek driver to defconfig + +Add configuration variable for rtl871xdrv driver. + +Signed-off-by: Alexander Mukhin +--- + hostapd/defconfig | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/hostapd/defconfig b/hostapd/defconfig +index 4659dd1..7e4667b 100644 +--- a/hostapd/defconfig ++++ b/hostapd/defconfig +@@ -41,6 +41,9 @@ CONFIG_DRIVER_NL80211=y + #LIBS_p += -L/usr/local/lib + #LIBS_c += -L/usr/local/lib + ++# Driver interface for Realtek chips (rtl871xdrv) ++#CONFIG_DRIVER_RTW=y ++ + # Driver interface for no driver (e.g., RADIUS server only) + #CONFIG_DRIVER_NONE=y + +-- +2.11.0 + diff --git a/package/hostapd/0002-add-rtl871xdrv-to-sample-config.patch b/package/hostapd/0002-add-rtl871xdrv-to-sample-config.patch new file mode 100644 index 000000000..c4907fdf0 --- /dev/null +++ b/package/hostapd/0002-add-rtl871xdrv-to-sample-config.patch @@ -0,0 +1,28 @@ +From 79de732e82439953e1de82208cf48ae9ae55a816 Mon Sep 17 00:00:00 2001 +From: Alexander Mukhin +Date: Wed, 13 Sep 2017 11:29:49 +0300 +Subject: [PATCH 2/2] add rtl871xdrv to sample config + +Add rtl871xdrv to the list of possible drivers. + +Signed-off-by: Alexander Mukhin +--- + hostapd/hostapd.conf | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/hostapd/hostapd.conf b/hostapd/hostapd.conf +index fa9a855..ef4d7ee 100644 +--- a/hostapd/hostapd.conf ++++ b/hostapd/hostapd.conf +@@ -20,7 +20,7 @@ interface=wlan0 + # interface is also created. + #bridge=br0 + +-# Driver interface type (hostap/wired/none/nl80211/bsd); ++# Driver interface type (hostap/wired/none/nl80211/bsd/rtl871xdrv); + # default: hostap). nl80211 is used with all Linux mac80211 drivers. + # Use driver=none if building hostapd as a standalone RADIUS server that does + # not control any wireless/wired driver. +-- +2.11.0 + diff --git a/package/hostapd/Config.in b/package/hostapd/Config.in index 62fbb66d6..18b9665ec 100644 --- a/package/hostapd/Config.in +++ b/package/hostapd/Config.in @@ -14,6 +14,11 @@ config BR2_PACKAGE_HOSTAPD if BR2_PACKAGE_HOSTAPD +config BR2_PACKAGE_HOSTAPD_DRIVER_RTW + bool "Enable rtl871x driver" + help + Enable support for Realtek wireless chips. + config BR2_PACKAGE_HOSTAPD_ACS bool "Enable ACS" default y diff --git a/package/hostapd/hostapd.hash b/package/hostapd/hostapd.hash index fb891476b..83bfd0e7e 100644 --- a/package/hostapd/hostapd.hash +++ b/package/hostapd/hostapd.hash @@ -1,2 +1,3 @@ # Locally calculated sha256 01526b90c1d23bec4b0f052039cc4456c2fd19347b4d830d1d58a0a6aea7117d hostapd-2.6.tar.gz +sha256 e204da659d0583c71af23cb9b55536fe99598ee26a44104344f456e4d17350c6 rtlxdrv.patch diff --git a/package/hostapd/hostapd.mk b/package/hostapd/hostapd.mk index dc28d1323..27240bbbb 100644 --- a/package/hostapd/hostapd.mk +++ b/package/hostapd/hostapd.mk @@ -44,6 +44,11 @@ HOSTAPD_CONFIG_DISABLE += CONFIG_EAP_PWD HOSTAPD_CONFIG_EDITS += 's/\#\(CONFIG_TLS=\).*/\1internal/' endif +ifeq ($(BR2_PACKAGE_HOSTAPD_DRIVER_RTW),y) +HOSTAPD_PATCH = https://github.com/pritambaral/hostapd-rtl871xdrv/raw/master/rtlxdrv.patch +HOSTAPD_CONFIG_ENABLE += CONFIG_DRIVER_RTW +endif + ifeq ($(BR2_PACKAGE_HOSTAPD_ACS),y) HOSTAPD_CONFIG_ENABLE += CONFIG_ACS endif