Skip to contentSkip to conversation

Realtek-patched hostapd

Buildroot New Alexander Mukhin 6 participants 18 messages Sep 4, 2017 – Nov 25, 2017

lore
Share & tools
lore
#0 lore raw

Dear colleagues,

let me ask for your advice.

I'll start with an overview.

Linux drivers for Realtek wireless chips do not fully implement the netlink interface. Because of that, hostapd cannot control them with its default netlink driver. There's a patch to hostapd, written originally by Realtek, which adds support for their chips. To build a patched hostapd in Buildroot, one can add the Realtek patch to the custom patches, and build the package in the usual way. This works fine, but the resulting binary will still include support for the netlink driver and will depend on the netlink library, which is superfluous in our circumstances.

To get rid of this dependency and build a specifically-targeted hostapd binary which supports Realtek chips only, I have to "clone" hostapd package and, by editing its Config.in and .mk files, drop netlink dependency.

The question is, should I contribute this Realtek-only version of the hostapd package, or dropping the netlink dependency is not a good reason for creating one more package?

Signature · 2 lines
Best regards,
Alexander.
#1 lore raw
Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Alexander" == Alexander Mukhin <[email protected]> writes:

Dear colleagues,
let me ask for your advice.

I'll start with an overview.

Quoted 9 lines

Linux drivers for Realtek wireless chips do not fully implement the netlink interface. Because of that, hostapd cannot control them with its default netlink driver. There's a patch to hostapd, written originally by Realtek, which adds support for their chips. To build a patched hostapd in Buildroot, one can add the Realtek patch to the custom patches, and build the package in the usual way. This works fine, but the resulting binary will still include support for the netlink driver and will depend on the netlink library, which is superfluous in our circumstances.

What a mess :/ I take it that this is for non-mainlined drivers?

Quoted 8 lines

To get rid of this dependency and build a specifically-targeted hostapd binary which supports Realtek chips only, I have to "clone" hostapd package and, by editing its Config.in and .mk files, drop netlink dependency.

The question is, should I contribute this Realtek-only version of the hostapd package, or dropping the netlink dependency is not a good reason for creating one more package?

I would not like to have two hostapd packages in Buildroot.

What is the plan going forward? Is this only a temporary issue and these drivers are getting mainlined / extended or is it more of a permanent issue? Are realtek actively maintaining this hostapd patch or do we risk it getting bitrotten whenever we bump hostapd?

Signature · 1 line
Bye, Peter Korsgaard
#2 lore raw

Hi Peter,

Quoted 17 lines · Peter Korsgaard
Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Alexander" == Alexander Mukhin <[email protected]> writes:

Dear colleagues,
let me ask for your advice.

I'll start with an overview.

Quoted 9 lines

Linux drivers for Realtek wireless chips do not fully implement the netlink interface. Because of that, hostapd cannot control them with its default netlink driver. There's a patch to hostapd, written originally by Realtek, which adds support for their chips. To build a patched hostapd in Buildroot, one can add the Realtek patch to the custom patches, and build the package in the usual way. This works fine, but the resulting binary will still include support for the netlink driver and will depend on the netlink library, which is superfluous in our circumstances.

Quoted 1 line

What a mess :/ I take it that this is for non-mainlined drivers?

Not exactly, the drivers are in the staging tree of the mainline kernel.

Quoted 9 lines
Quoted 8 lines

To get rid of this dependency and build a specifically-targeted hostapd binary which supports Realtek chips only, I have to "clone" hostapd package and, by editing its Config.in and .mk files, drop netlink dependency.

The question is, should I contribute this Realtek-only version of the hostapd package, or dropping the netlink dependency is not a good reason for creating one more package?

Quoted 6 lines

I would not like to have two hostapd packages in Buildroot.

What is the plan going forward? Is this only a temporary issue and these drivers are getting mainlined / extended or is it more of a permanent issue? Are realtek actively maintaining this hostapd patch or do we risk it getting bitrotten whenever we bump hostapd?

Realtek doesn't maintain neither the kernel drivers, nor the patch for hostapd. They occasionally release stand-alone drivers, but always stubbornly ignore the current Linux practice of using the netlink interface, relying instead on proprietary mechanisms. Also they once issued a patched hostapd, but didn't update it since.

Keeping hostapd patch in sync with the current hostapd is the work done by an enthusiast (see https://github.com/pritambaral/hostapd-rtl871xdrv). As for now, he updates his patch in due time. This patch will be required as long as the kernel drivers do not support the netlink interface. And, in my opinion, it is unlikely that someone will add netlink support to the drivers in the nearest future.

Quoted 2 lines
Signature · 1 line
Bye, Peter Korsgaard
Signature · 2 lines
Best regards,
Alexander. 
#3 lore raw
Quoted 35 lines · Alexander Mukhin

Hi Peter,

Quoted 17 lines · Peter Korsgaard
Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Alexander" == Alexander Mukhin <[email protected]> writes:

Dear colleagues,
let me ask for your advice.

I'll start with an overview.

Quoted 9 lines

Linux drivers for Realtek wireless chips do not fully implement the netlink interface. Because of that, hostapd cannot control them with its default netlink driver. There's a patch to hostapd, written originally by Realtek, which adds support for their chips. To build a patched hostapd in Buildroot, one can add the Realtek patch to the custom patches, and build the package in the usual way. This works fine, but the resulting binary will still include support for the netlink driver and will depend on the netlink library, which is superfluous in our circumstances.

Quoted 1 line

What a mess :/ I take it that this is for non-mainlined drivers?

Not exactly, the drivers are in the staging tree of the mainline kernel.

Quoted 9 lines
Quoted 8 lines

To get rid of this dependency and build a specifically-targeted hostapd binary which supports Realtek chips only, I have to "clone" hostapd package and, by editing its Config.in and .mk files, drop netlink dependency.

The question is, should I contribute this Realtek-only version of the hostapd package, or dropping the netlink dependency is not a good reason for creating one more package?

Quoted 8 lines
Quoted 6 lines

I would not like to have two hostapd packages in Buildroot.

What is the plan going forward? Is this only a temporary issue and these drivers are getting mainlined / extended or is it more of a permanent issue? Are realtek actively maintaining this hostapd patch or do we risk it getting bitrotten whenever we bump hostapd?

Realtek doesn't maintain neither the kernel drivers, nor the patch for hostapd. They occasionally release stand-alone drivers, but always stubbornly ignore the current Linux practice of using the netlink interface, relying instead on proprietary mechanisms. Also they once issued a patched hostapd, but didn't update it since.

My intuition is: people should simply refuse to use Realtek chips in their
designs and avoid this issue altogether. However, Buildroot is not about making user's life difficult :-) So perhaps we should include a realtek-patched hostapd.

Quoted 2 lines

Keeping hostapd patch in sync with the current hostapd is the work done by an enthusiast (see https://github.com/pritambaral/hostapd-rtl871xdrv). As for now, he updates his patch in due time. This patch will be required as long as the kernel drivers do not support the netlink interface. And, in my opinion, it is unlikely that someone will add netlink support to the drivers in the nearest future.

As long as pritambaral does a good job keeping the patch up to date, could we
perhaps just patch the main hostapd package instead of having two packages? Perhaps the patch should be made optional, to be sure we don't break things for people who don't care about this Realtek crap.

Regards,
Arnout

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#4 lore raw

?Hi Arnout,

Quoted 1 line · Arnout Vandecappelle

As long as pritambaral does a good job keeping the patch up to date,

could we

Quoted 1 line

perhaps just patch the main hostapd package instead of having two

packages?

Quoted 1 line

Perhaps the patch should be made optional, to be sure we don't break

things for

Quoted 1 line

people who don't care about this Realtek crap.

?Completely agree with you. I'll send a patch for that.

Signature · 5 lines
Regards,
Alexander.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20170914/a1dddec9/attachment.html>
#5 lore raw

PATCH 1/1 hostapd: add support for Realtek driver

In reply to Alexander Mukhin

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.

---
 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
DEVELOPERS +3 -0
index 21eafc9d2..57fc74c25 100644
@@ -68,6 +68,9 @@ F:	package/putty/
 N:	Alexander Lukichev <[email protected]>
 F:	package/openpgm/
 
+N:	Alexander Mukhin <[email protected]>
+F:	package/hostapd/
+
 N:	Alexander Varnin <[email protected]>
 F:	package/liblog4c-localtime/
 
package/hostapd/0001-add-realtek-driver-to-defconfig.patch new file +29 -0
new file mode 100644
index 000000000..3cc5f624f
@@ -0,0 +1,29 @@
+From 8ae1094c52e462071cd98c994f463af9bdb6ac08 Mon Sep 17 00:00:00 2001
+From: Alexander Mukhin <[email protected]>
+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 <[email protected]>
+---
+ 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
+
package/hostapd/0002-add-rtl871xdrv-to-sample-config.patch new file +28 -0
new file mode 100644
index 000000000..c4907fdf0
@@ -0,0 +1,28 @@
+From 79de732e82439953e1de82208cf48ae9ae55a816 Mon Sep 17 00:00:00 2001
+From: Alexander Mukhin <[email protected]>
+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 <[email protected]>
+---
+ 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
+
package/hostapd/Config.in +5 -0
index 62fbb66d6..18b9665ec 100644
@@ -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
package/hostapd/hostapd.hash +1 -0
index fb891476b..83bfd0e7e 100644
@@ -1,2 +1,3 @@
 # Locally calculated
 sha256  01526b90c1d23bec4b0f052039cc4456c2fd19347b4d830d1d58a0a6aea7117d  hostapd-2.6.tar.gz
+sha256  e204da659d0583c71af23cb9b55536fe99598ee26a44104344f456e4d17350c6  rtlxdrv.patch
package/hostapd/hostapd.mk +5 -0
index dc28d1323..27240bbbb 100644
@@ -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
Signature · 1 line
2.11.0
#6 lore raw

PATCH 1/1 hostapd: add support for Realtek driver

Hi Alexander,

Quoted 5 lines · Alexander Mukhin

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

Quoted 8 lines

A configuration option is added to enable support for Realtek chips, and it's turned off by default.

---
 DEVELOPERS                                         |  3 +++
 .../0001-add-realtek-driver-to-defconfig.patch     | 29 ++++++++++++++++++++++
 .../0002-add-rtl871xdrv-to-sample-config.patch     | 28 +++++++++++++++++++++

I don't think these patches are needed. Just use HOSTAPD_CONFIG_SET instead of HOSTAPD_CONFIG_ENABLE. Actually, I think we don't need HOSTAPD_CONFIG_ENABLE at all, only HOSTAPD_CONFIG_SET. But that's for another patch.

baruch

Quoted 130 lines
 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
DEVELOPERS +3 -0
index 21eafc9d2..57fc74c25 100644
@@ -68,6 +68,9 @@ F:	package/putty/
 N:	Alexander Lukichev <[email protected]>
 F:	package/openpgm/
 
+N:	Alexander Mukhin <[email protected]>
+F:	package/hostapd/
+
 N:	Alexander Varnin <[email protected]>
 F:	package/liblog4c-localtime/
 
package/hostapd/0001-add-realtek-driver-to-defconfig.patch new file +29 -0
new file mode 100644
index 000000000..3cc5f624f
@@ -0,0 +1,29 @@
+From 8ae1094c52e462071cd98c994f463af9bdb6ac08 Mon Sep 17 00:00:00 2001
+From: Alexander Mukhin <[email protected]>
+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 <[email protected]>
+---
+ 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
+
package/hostapd/0002-add-rtl871xdrv-to-sample-config.patch new file +28 -0
new file mode 100644
index 000000000..c4907fdf0
@@ -0,0 +1,28 @@
+From 79de732e82439953e1de82208cf48ae9ae55a816 Mon Sep 17 00:00:00 2001
+From: Alexander Mukhin <[email protected]>
+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 <[email protected]>
+---
+ 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
+
package/hostapd/Config.in +5 -0
index 62fbb66d6..18b9665ec 100644
@@ -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
package/hostapd/hostapd.hash +1 -0
index fb891476b..83bfd0e7e 100644
@@ -1,2 +1,3 @@
 # Locally calculated
 sha256  01526b90c1d23bec4b0f052039cc4456c2fd19347b4d830d1d58a0a6aea7117d  hostapd-2.6.tar.gz
+sha256  e204da659d0583c71af23cb9b55536fe99598ee26a44104344f456e4d17350c6  rtlxdrv.patch
package/hostapd/hostapd.mk +5 -0
index dc28d1323..27240bbbb 100644
@@ -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
Signature · 3 lines
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
#7 lore raw

PATCH 1/1 hostapd: add support for Realtek driver

Hi Baruch,

Quoted 3 lines · Baruch Siach

I don't think these patches are needed. Just use HOSTAPD_CONFIG_SET instead of HOSTAPD_CONFIG_ENABLE. Actually, I think we don't need HOSTAPD_CONFIG_ENABLE at all, only HOSTAPD_CONFIG_SET. But that's for another patch.

Completely agree, the first patch isn't necessary, it just gives a more pretty-looking defconfig, with all the driver options in the right order. But yes, we can live without it.
The second patch isn't necessary too, I just wanted a user to have a complete list of possible drivers in their sample hostapd.conf. So I'd suggest to keep the second patch.

The updated patch follows.

Signature · 2 lines
Best regards,
Alexander.
#8 lore raw

PATCH 1/1 hostapd: add support for Realtek driver

Hi Alexander,

Quoted 11 lines · Alexander Mukhin
Quoted 3 lines · Baruch Siach

I don't think these patches are needed. Just use HOSTAPD_CONFIG_SET instead of HOSTAPD_CONFIG_ENABLE. Actually, I think we don't need HOSTAPD_CONFIG_ENABLE at all, only HOSTAPD_CONFIG_SET. But that's for another patch.

Completely agree, the first patch isn't necessary, it just gives a more pretty-looking defconfig, with all the driver options in the right order. But yes, we can live without it.
The second patch isn't necessary too, I just wanted a user to have a complete list of possible drivers in their sample hostapd.conf. So I'd suggest to keep the second patch.

I don't believe anyone looks at the code under (by default) output/build/ for options. I think that the Config.in entry is enough. The patch is just a maintenance burden, IMO.

baruch

Signature · 3 lines
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
#9 lore raw

PATCH 1/1 hostapd: add support for Realtek driver

Hi Baruch,

On Thu, Sep 14, 2017 at 01:24:13PM +0300, Baruch Siach wrote

Quoted 3 lines

I don't believe anyone looks at the code under (by default) output/build/ for options. I think that the Config.in entry is enough. The patch is just a maintenance burden, IMO.

Agree on defconfig patch. But the second patch modifies hostapd.conf which is installed to the target and may be consulted by the user on the available configuration options.

Anyway, if you think it's not necessary too, then the fewer patches, the better :)

Signature · 1 line
Alexander.
#10 lore raw

PATCH 1/1 hostapd: add support for Realtek driver

In reply to Alexander Mukhin

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.

---
 DEVELOPERS                   | 3 +++
 package/hostapd/Config.in    | 5 +++++
 package/hostapd/hostapd.hash | 1 +
 package/hostapd/hostapd.mk   | 5 +++++
 4 files changed, 14 insertions(+)
DEVELOPERS +3 -0
index 21eafc9d2..57fc74c25 100644
@@ -68,6 +68,9 @@ F:	package/putty/
 N:	Alexander Lukichev <[email protected]>
 F:	package/openpgm/
 
+N:	Alexander Mukhin <[email protected]>
+F:	package/hostapd/
+
 N:	Alexander Varnin <[email protected]>
 F:	package/liblog4c-localtime/
 
package/hostapd/Config.in +5 -0
index 62fbb66d6..cec2a123e 100644
@@ -14,6 +14,11 @@ config BR2_PACKAGE_HOSTAPD
 
 if BR2_PACKAGE_HOSTAPD
 
+config BR2_PACKAGE_HOSTAPD_DRIVER_RTW
+	bool "Enable rtl871xdrv driver"
+	help
+	  Enable support for Realtek wireless chips.
+
 config BR2_PACKAGE_HOSTAPD_ACS
 	bool "Enable ACS"
 	default y
package/hostapd/hostapd.hash +1 -0
index fb891476b..83bfd0e7e 100644
@@ -1,2 +1,3 @@
 # Locally calculated
 sha256  01526b90c1d23bec4b0f052039cc4456c2fd19347b4d830d1d58a0a6aea7117d  hostapd-2.6.tar.gz
+sha256  e204da659d0583c71af23cb9b55536fe99598ee26a44104344f456e4d17350c6  rtlxdrv.patch
package/hostapd/hostapd.mk +5 -0
index dc28d1323..40e28ee67 100644
@@ -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_SET += CONFIG_DRIVER_RTW
+endif
+
 ifeq ($(BR2_PACKAGE_HOSTAPD_ACS),y)
 HOSTAPD_CONFIG_ENABLE += CONFIG_ACS
 endif
Signature · 1 line
2.11.0
#11 lore raw

PATCH 1/1 hostapd: add support for Realtek driver

2017-09-14 13:08 GMT+02:00 Alexander Mukhin <[email protected]>:

Quoted 71 lines

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.

---
 DEVELOPERS                   | 3 +++
 package/hostapd/Config.in    | 5 +++++
 package/hostapd/hostapd.hash | 1 +
 package/hostapd/hostapd.mk   | 5 +++++
 4 files changed, 14 insertions(+)
DEVELOPERS +3 -0
index 21eafc9d2..57fc74c25 100644
@@ -68,6 +68,9 @@ F:    package/putty/
 N:     Alexander Lukichev <[email protected]>
 F:     package/openpgm/
 
+N:     Alexander Mukhin <[email protected]>
+F:     package/hostapd/
+
 N:     Alexander Varnin <[email protected]>
 F:     package/liblog4c-localtime/
 
package/hostapd/Config.in +5 -0
index 62fbb66d6..cec2a123e 100644
@@ -14,6 +14,11 @@ config BR2_PACKAGE_HOSTAPD
 
 if BR2_PACKAGE_HOSTAPD
 
+config BR2_PACKAGE_HOSTAPD_DRIVER_RTW
+       bool "Enable rtl871xdrv driver"
+       help
+         Enable support for Realtek wireless chips.
+
 config BR2_PACKAGE_HOSTAPD_ACS
        bool "Enable ACS"
        default y
package/hostapd/hostapd.hash +1 -0
index fb891476b..83bfd0e7e 100644
@@ -1,2 +1,3 @@
 # Locally calculated
 sha256  01526b90c1d23bec4b0f052039cc4456c2fd19347b4d830d1d58a0a6aea7117d  hostapd-2.6.tar.gz
+sha256  e204da659d0583c71af23cb9b55536fe99598ee26a44104344f456e4d17350c6  rtlxdrv.patch
package/hostapd/hostapd.mk +5 -1
index dc28d1323..40e28ee67 100644
@@ -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_SET += CONFIG_DRIVER_RTW
+endif
+
 ifeq ($(BR2_PACKAGE_HOSTAPD_ACS),y)
 HOSTAPD_CONFIG_ENABLE += CONFIG_ACS
 endif
--
Quoted 1 line

2.11.0

Quoted 5 lines

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

Signature · 1 line
Profile: http://it.linkedin.com/in/compagnucciangelo
#12 lore raw

PATCH 1/1 hostapd: add support for Realtek driver

In reply to Alexander Mukhin

Hello,

Quoted 8 lines · Alexander Mukhin

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.

Quoted 7 lines
---
 DEVELOPERS                   | 3 +++
 package/hostapd/Config.in    | 5 +++++
 package/hostapd/hostapd.hash | 1 +
 package/hostapd/hostapd.mk   | 5 +++++
 4 files changed, 14 insertions(+)

To be honest, I was about to reject your patch: it's basically adding a feature patch to a package, which we normally don't do, and the patch is very likely to break when we update to newer versions of hostapd.

But I saw that both Peter and Arnout had a look at the problem, and the overall feeling is that there really isn't a better solution.

So, I've applied to next. We'll see how often it breaks hostapd (or not).

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#13 lore raw

PATCH 1/1 hostapd: add support for Realtek driver

Hello,

Quoted 9 lines · Thomas Petazzoni

To be honest, I was about to reject your patch: it's basically adding a feature patch to a package, which we normally don't do, and the patch is very likely to break when we update to newer versions of hostapd.

But I saw that both Peter and Arnout had a look at the problem, and the overall feeling is that there really isn't a better solution.

So, I've applied to next. We'll see how often it breaks hostapd (or not).

My patch as it was submitted two months ago will not apply to the current buildroot tree because of the other patches applied to hostapd since then. I'll send the updated version.

There's no problem in rejecting the patch. One can easily get by without it by adding local changes to external.mk:

HOSTAPD_PATCH += https://github.com/pritambaral/hostapd-rtl871xdrv/raw/master/rtlxdrv.patch
BR_NO_CHECK_HASH_FOR += rtlxdrv.patch
HOSTAPD_CONFIG_SET += CONFIG_DRIVER_RTW

Signature · 2 lines
Best regards,
Alexander.
#14 lore raw

PATCH 1/1 hostapd: add support for Realtek driver

Hello,

Quoted 6 lines · Alexander Mukhin
Quoted 2 lines

So, I've applied to next. We'll see how often it breaks hostapd (or not).

My patch as it was submitted two months ago will not apply to the current buildroot tree because of the other patches applied to hostapd since then. I'll send the updated version.

I have already applied your patch. So if any fix is needed, please base your new patch on top of the "next" branch.

But I did test the build of hostapd with the realtek driver support applied, and it built fine for me. So I'm not sure why you say it doesn't apply.

Quoted 6 lines

There's no problem in rejecting the patch. One can easily get by without it by adding local changes to external.mk:

HOSTAPD_PATCH += https://github.com/pritambaral/hostapd-rtl871xdrv/raw/master/rtlxdrv.patch
BR_NO_CHECK_HASH_FOR += rtlxdrv.patch
HOSTAPD_CONFIG_SET += CONFIG_DRIVER_RTW

If things turn out to be too annoying because it breaks too often, we might end up doing that. But it's obviously nicer for users if the feature is integrated in Buildroot itself.

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#15 lore raw

PATCH 1/1 hostapd: keep previous patches when DRIVER_RTW set

Changed HOSTAPD_PATCH= to HOSTAPD_PATCH+= to keep previously added patches.

---
 package/hostapd/hostapd.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/hostapd/hostapd.mk +1 -1
index bb3919e988..0ed1631421 100644
@@ -48,7 +48,7 @@ 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_PATCH += https://github.com/pritambaral/hostapd-rtl871xdrv/raw/master/rtlxdrv.patch
 HOSTAPD_CONFIG_SET += CONFIG_DRIVER_RTW
 endif
 
Signature · 1 line
2.11.0
#16 lore raw

PATCH 1/1 hostapd: add support for Realtek driver

In reply to Thomas Petazzoni

Hello,

Quoted 2 lines · Thomas Petazzoni

I have already applied your patch. So if any fix is needed, please base your new patch on top of the "next" branch.

When the original patch was submitted, it was the only patch applied to hostapd. But the recent security fixes added two more patches. So we need to replace HOSTAPD_PATCH= with HOSTAPD_PATCH+=.

I've just sent a correction patch based on the top of the 'next' branch.

Signature · 2 lines
Best regards,
Alexander.
#17 lore raw

PATCH 1/1 hostapd: add support for Realtek driver

In reply to Thomas Petazzoni

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.

---
 DEVELOPERS                   | 3 +++
 package/hostapd/Config.in    | 5 +++++
 package/hostapd/hostapd.hash | 1 +
 package/hostapd/hostapd.mk   | 5 +++++
 4 files changed, 14 insertions(+)
DEVELOPERS +3 -0
index 7621f969a0..407641449f 100644
@@ -79,6 +79,9 @@ F:	package/putty/
 N:	Alexander Lukichev <[email protected]>
 F:	package/openpgm/
 
+N:	Alexander Mukhin <[email protected]>
+F:	package/hostapd/
+
 N:	Alexander Varnin <[email protected]>
 F:	package/liblog4c-localtime/
 
package/hostapd/Config.in +5 -0
index 1609d0df5d..40c7015e73 100644
@@ -14,6 +14,11 @@ config BR2_PACKAGE_HOSTAPD
 
 if BR2_PACKAGE_HOSTAPD
 
+config BR2_PACKAGE_HOSTAPD_DRIVER_RTW
+	bool "Enable rtl871xdrv driver"
+	help
+	  Enable support for Realtek wireless chips.
+
 config BR2_PACKAGE_HOSTAPD_ACS
 	bool "Enable ACS"
 	default y
package/hostapd/hostapd.hash +1 -0
index b20c89b184..84647a9c47 100644
@@ -2,3 +2,4 @@
 sha256  01526b90c1d23bec4b0f052039cc4456c2fd19347b4d830d1d58a0a6aea7117d  hostapd-2.6.tar.gz
 sha256  529113cc81256c6178f3c1cf25dd8d3f33e6d770e4a180bd31c6ab7e4917f40b  rebased-v2.6-0001-hostapd-Avoid-key-reinstallation-in-FT-handshake.patch
 sha256  147c8abe07606905d16404fb2d2c8849796ca7c85ed8673c09bb50038bcdeb9e  rebased-v2.6-0005-Fix-PTK-rekeying-to-generate-a-new-ANonce.patch
+sha256  e204da659d0583c71af23cb9b55536fe99598ee26a44104344f456e4d17350c6  rtlxdrv.patch
package/hostapd/hostapd.mk +5 -0
index 3f94c8c4b7..0ed1631421 100644
@@ -47,6 +47,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_SET += CONFIG_DRIVER_RTW
+endif
+
 ifeq ($(BR2_PACKAGE_HOSTAPD_ACS),y)
 HOSTAPD_CONFIG_ENABLE += CONFIG_ACS
 endif
Signature · 1 line
2.11.0