Hi cmsv, Bruno's patch seems to have had its tab spacing munged in transit, which is why the patch failed. I'm attaching a Gzipped version of that same patch, against AA r38347, which should apply cleanly to your build tree.
As for leaving beacon_int unspecified, that would tell the driver to use whatever default interval it has defined, which is likely driver-specific (and probably rather small, i.e. 10ms or 50ms). Note that Bruno and I have both also submitted this as a patch against current trunk, meaning hopefully this will eventually get ported into AA. On Thu, Oct 10, 2013 at 6:07 AM, Bruno Randolf <[email protected]> wrote: > On 10/10/2013 11:28 AM, cmsv wrote: > >> I have encountered the following error while trying to patch the file: >> >> patching file attitude_adjustment/package/**hostapd/files/wpa_supplicant. >> **sh >> Hunk #1 FAILED at 119. >> Hunk #2 FAILED at 163. >> 2 out of 2 hunks FAILED -- saving rejects to file >> attitude_adjustment/package/**hostapd/files/wpa_supplicant.**sh.rej >> >> AA revision 38351 >> > > Hi, > > Check the patch I just posted which is against current AA 12.09. If it > does not apply to your revision, the patch is simple enough so you can make > the same changes by hand. > > bruno > > > > >> On 10/10/2013 03:22 AM, Bruno Randolf wrote: >> >>> Hi, This is a patch against AA which fixes it for us: >>> >>> wpa_supplicant: fix beacon_int configuration option >>> >>> wpa_supplicant expects beacon_int instead of beacon_interval in its >>> config file. >>> >>> diff --git a/package/hostapd/files/wpa_**supplicant.sh >>> b/package/hostapd/files/wpa_**supplicant.sh >>> index 0b5e1d3..bd86801 100644 >>> --- a/package/hostapd/files/wpa_**supplicant.sh >>> +++ b/package/hostapd/files/wpa_**supplicant.sh >>> @@ -119,13 +119,13 @@ wpa_supplicant_setup_vif() { >>> ;; >>> esac >>> >>> - local fixed_freq bssid1 beacon_interval brates mrate >>> + local fixed_freq bssid1 beacon_int brates mrate >>> config_get ifname "$vif" ifname >>> config_get bridge "$vif" bridge >>> config_get ssid "$vif" ssid >>> config_get bssid "$vif" bssid >>> bssid1=${bssid:+"bssid=$bssid"**} >>> - beacon_interval=${beacon_int:+**"beacon_interval=$beacon_int"} >>> + beacon_int=${beacon_int:+"**beacon_int=$beacon_int"} >>> >>> local br brval brsub brstr >>> [ -n "$basic_rate_list" ] && { >>> @@ -163,7 +163,7 @@ network={ >>> $proto >>> $freq >>> ${fixed:+"fixed_freq=1"} >>> - $beacon_interval >>> + $beacon_int >>> $brates >>> $mrate >>> $ht_str >>> >>> On 10/10/2013 12:17 AM, Ben West wrote: >>> >>>> I believe this problem appeared on or about r36682, which coincides with >>>> a hostapd update to AA. This suggests a regression in hostapd w/r/t/ to >>>> beacon interval code. >>>> >>>> I can confirm the same problem happens when attempting to specify >>>> beacon_int on a single psk2-encrypted adhoc interface, not just with >>>> multi-VAPs as with the original poster. My test was on an Engenius >>>> EOC-1650, atheros platform, running Attitude Adjustment r38347 that I >>>> compiled. >>>> >>>> The error quoted below goes away when I comment out the "beacon_int" >>>> line in /etc/config/wireless. Likewise, this wireless config, with the >>>> beacon_int line, works just fine under Attitude Adjustment r36669, >>>> before the hostapd update. >>>> >>>> root@OpenWRT:~# wifi restart >>>> command failed: Device or resource busy (-16) >>>> Successfully initialized wpa_supplicant >>>> Line 12: unknown network field 'beacon_interval'. >>>> Line 33: failed to parse network block. >>>> Failed to read or parse configuration >>>> '/var/run/wpa_supplicant-**wlan0.conf'. >>>> enable_mac80211(radio0): Failed to set up wpa_supplicant for interface >>>> wlan0 >>>> >>>> root@OpenWRT:~# cat /etc/config/wireless >>>> config wifi-device radio0 >>>> option type mac80211 >>>> option channel 4 >>>> option hwmode 11g >>>> option macaddr 00:02:6F:XX:XX:XX >>>> option beacon_int 337 >>>> option diversity 0 >>>> option disabled 0 >>>> >>>> config wifi-iface >>>> option network 'mesh' >>>> option mode 'adhoc' >>>> option device 'radio0' >>>> option ssid 'MyMesh' >>>> option bssid '02:CA:FF:EE:BA:BF' >>>> option hidden '0' >>>> option encryption 'psk2' >>>> option key 'blahblahblahblahblah' >>>> >>>> root@OpenWRT:~# cat /var/run/wpa_supplicant-wlan0.**conf >>>> ctrl_interface=/var/run/wpa_**supplicant-wlan0 >>>> ap_scan=2 >>>> network={ >>>> mode=1 >>>> scan_ssid=0 >>>> ssid="MyMesh" >>>> bssid=02:CA:FF:EE:BA:BF >>>> key_mgmt=WPA-PSK >>>> proto=RSN >>>> frequency=2427 >>>> fixed_freq=1 >>>> beacon_interval=337 >>>> >>>> psk="blahblahblahblahblah" >>>> >>>> } >>>> >>>> root@OpenWRT:~# cat /etc/openwrt_release >>>> DISTRIB_ID="MyCustomWRT" >>>> DISTRIB_RELEASE="CustomV2.1" >>>> DISTRIB_REVISION="r38347" >>>> DISTRIB_CODENAME="pre-release" >>>> DISTRIB_TARGET="atheros/**generic" >>>> DISTRIB_DESCRIPTION="My Custom Release" >>>> >>>> On Fri, Jun 28, 2013 at 9:07 PM, cmsv <[email protected] >>>> <mailto:[email protected]>> wrote: >>>> >>>> Info: >>>> http://wiki.openwrt.org/doc/**uci/wireless#wpa.enterprise.** >>>> access.point<http://wiki.openwrt.org/doc/uci/wireless#wpa.enterprise.access.point> >>>> >>>> >>>> configuration: >>>> >>>> /etc/config# cat wireless >>>> >>>> config wifi-device 'radio0' >>>> option type 'mac80211' >>>> option phy 'phy0' >>>> option hwmode '11ng' >>>> option noscan '1' >>>> option disabled '0' >>>> option diversity '0' >>>> option rxantenna '2' >>>> option txantenna '2' >>>> option txpower '20' >>>> option beacon_int '1000' >>>> option distance '2000' >>>> list ht_capab 'RX-HT40-SGI' >>>> list ht_capab 'TX-STBC' >>>> list ht_capab 'RX-STBC1' >>>> list ht_capab 'DSSS_CCK-40' >>>> option channel '1' >>>> option country 'PT' >>>> option htmode 'HT20' >>>> option beacon_int '1000' >>>> >>>> config wifi-iface >>>> option device 'radio0' >>>> option ifname 'wlan0' >>>> option network 'lan' >>>> option mode 'ap' >>>> option ssid 'test.net <http://test.net>' >>>> option hidden '0' >>>> option encryption 'none' >>>> >>>> >>>> config wifi-iface >>>> option device 'radio0' >>>> option ifname 'adhoc0' >>>> option network 'mesh' >>>> option mode 'adhoc' >>>> option bssid '02:16:e8:6a:0b:1e' >>>> option ssid 'mesh.test' >>>> option hidden '0' >>>> option macfilter 'allow' >>>> option encryption 'psk2' >>>> option key '1234567890' >>>> >>>> Problem: >>>> >>>> wifi down >>>> wifi up >>>> command failed: Device or resource busy (-16) >>>> Configuration file: /var/run/hostapd-phy0.conf >>>> Using interface wlan0 with hwaddr 5f:e9:98:5c:3e:36 and ssid >>>> "test.net <http://test.net>" >>>> >>>> Successfully initialized wpa_supplicant >>>> Line 12: unknown network field 'beacon_interval'. >>>> Line 33: failed to parse network block. >>>> >>>> Failed to read or parse configuration >>>> '/var/run/wpa_supplicant-**adhoc0.conf'. >>>> enable_mac80211(radio0): Failed to set up wpa_supplicant for >>>> interface >>>> adhoc0 >>>> >>>> >>>> Details: >>>> >>>> # cat /var/run/wpa_supplicant-**adhoc0.conf >>>> ctrl_interface=/var/run/wpa_**supplicant-adhoc0 >>>> ap_scan=2 >>>> network={ >>>> mode=1 >>>> scan_ssid=0 >>>> ssid="mesh.test" >>>> bssid=02:16:c8:6e:0f:1e >>>> key_mgmt=WPA-PSK >>>> proto=RSN >>>> frequency=2472 >>>> fixed_freq=1 >>>> beacon_interval=1000 >>>> >>>> htmode=HT20 >>>> >>>> psk="1234567890" >>>> >>>> >>>> Linux version 3.3.8 (cmsv@net) (gcc version 4.6.3 20120201 >>>> (prerelease) >>>> (Linaro GCC 4.6-2012.02) ) #1 Thu Jun 27 22:23:26 EDT 2013 >>>> DISTRIB_ID="OpenWrt" >>>> DISTRIB_RELEASE="Attitude Adjustment" >>>> DISTRIB_REVISION="r37034" >>>> DISTRIB_CODENAME="attitude_**adjustment" >>>> DISTRIB_TARGET="ar71xx/**generic" >>>> DISTRIB_DESCRIPTION="OpenWrt Attitude Adjustment 12.09" >>>> >>>> >>>> >>>> Conclusion: >>>> It does seem that wpa_supplicant is not compatible with option >>>> beacon_int . However if i remove this option from the >>>> configuration or >>>> specify it as option beacon_interval; then wpa_supplicant works >>>> for the >>>> specified interface. >>>> >>>> Is this a bug, incompatibility or something was not updated to >>>> work with >>>> with wpa_supplicant ? >>>> >>>> Also; will this option work if specified as beacon_interval in >>>> /et/config/wireless ? The wiki describes it as >>>> beacon_int >>>> >>>> >>>> >>>> >>>> >>>> >>>> -- >>>> >>>> >>>> >>>> >>>> >>>> Site: http://wirelesspt.net >>>> Mesh: http://tinyurl.com/wirelesspt >>>> Admin: >>>> http://wirelesspt.net/wiki/**Cmsv<http://wirelesspt.net/wiki/Cmsv> >>>> Twitter: http://twitter.com/wirelesspt >>>> Suporte técnico via sms: 91 19 11 798 >>>> Donativos/Paypal: http://tinyurl.com/doar-verba >>>> Chave publica PGP/SSH: >>>> http://wirelesspt.net/**arquivos/pk<http://wirelesspt.net/arquivos/pk> >>>> Email assinado digitalmente pelo emissor assegurando autenticidade >>>> >>>> >>>> ______________________________**_________________ >>>> openwrt-users mailing list >>>> [email protected].**org<[email protected]> >>>> <mailto:openwrt-users@lists.**openwrt.org<[email protected]> >>>> > >>>> >>>> https://lists.openwrt.org/**mailman/listinfo/openwrt-users<https://lists.openwrt.org/mailman/listinfo/openwrt-users> >>>> >>>> >>>> >>>> >>>> -- >>>> Ben West >>>> http://gowasabi.net >>>> [email protected] <mailto:[email protected]> >>>> 314-246-9434 <tel:314-246-9434> >>>> >>>> >>>> ______________________________**_________________ >>>> openwrt-devel mailing list >>>> [email protected].**org <[email protected]> >>>> https://lists.openwrt.org/cgi-**bin/mailman/listinfo/openwrt-**devel<https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel> >>>> >>>> >>> >>> ______________________________**_________________ > openwrt-devel mailing list > [email protected].**org <[email protected]> > https://lists.openwrt.org/cgi-**bin/mailman/listinfo/openwrt-**devel<https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel> > -- Ben West http://gowasabi.net [email protected] 314-246-9434
fix_wpa_supplicat_beacon_int_AA.patch.gz
Description: GNU Zip compressed data
_______________________________________________ openwrt-devel mailing list [email protected] https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
