aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/mac80211/files
Commit message (Collapse)AuthorAgeFilesLines
* mac80211: don't pass the hostapd ctrl iface in adhocAntonio Quartulli2017-12-131-2/+8
| | | | | | | | Passing the ctrl iface to wpa_supplicant will automatically cause wpa_supplicant to send "STOP_AP" messages to the hostapd. This breaks the AP interfaces. Signed-off-by: Antonio Quartulli <ordex@autistici.org> (cherry picked from commit 0da54fa6428ea98d31b49f5d9a4a272214f5d188)
* mac80211: gracefully handle preexisting VIFJo-Philipp Wich2017-12-131-0/+6
| | | | | | | | | | | | | | | | | | | | | Gracefully handle cases where the to-be-created wireless interface already exists on the system which might commonly happen with non-multi-SSID capable wireless drivers. This fixes commit 8301e613655c2d95fa5430a1a57d92d966fdc70b which caused previously ignored "Too many open files in system (-23)" errors to fail the wireless setup procedure. With the updated approach we'll still try recreating the vif after one second if the first attempt to do so failed with ENFILE but we will now consider the operation successfull if a second attempt still yields ENFILE with the requested ifname already existing on the system. Fixes FS#664, FS#704. Suggested-by: Vittorio Gambaletta <openwrt@vittgam.net> Signed-off-by: Jo-Philipp Wich <jo@mein.io> (cherry picked from commit 4a033475453b63d0d5ae41489e7c395882567698)
* mac80211: Fix race condition leading to wifi interfaces not coming up at ↵Vittorio Gambaletta2017-12-131-5/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | boot sometimes. In the drv_mac80211_setup function, mac80211_interface_cleanup is called to ask the kernel to delete all existing interfaces for the phy that is being configured via netlink. Later in the first function, mac80211_prepare_vif is called to set up the new interfaces as required. But sometimes, when mac80211_prepare_vif (and so the relevant `iw phy x interface add y` command) runs, the kernel might still be cleaning up the old interface with the same ifname. It usually takes very few time to do that; possibly a few milliseconds of sleep in the script after detecting this error condition could be enough, but the busybox sh does not support sub-second sleep intervals. When this happens, iw obviously fails to create the new interface; and the following message is printed in the system log, followed by subsequent failure messages from hostapd in case this would have been an AP interface. Tue Mar 14 04:21:57 2017 daemon.notice netifd: radio1 (2767): command failed: Too many open files in system (-23) This was a long-standing issue existing since at least OpenWrt Backfire, and today I finally managed to debug and (hopefully) solve it. It was happening very few times on most devices; but it was happening a lot more frequently on fast platforms with multiple radios, such as the powerpc-based dual-ath9k-radio tl-wdr4900-v1. Signed-off-by: Vittorio Gambaletta <openwrt@vittgam.net> (cherry picked from commit 8301e613655c2d95fa5430a1a57d92d966fdc70b)
* mac80211: Update wireless-regdb to master-2017-03-07Ryan Mounce2017-10-161-12/+19
| | | | | | | | | | | | | | | | | The short log of changes since the 2016-06-10 release is below. Jouni Malinen (1): wireless-regdb: Remove DFS requirement for India (IN) Ryan Mounce (1): wireless-regdb: Update rules for Australia (AU) and add 60GHz rules Seth Forshee (2): wireless-regdb: Update 5 GHz rules for Canada wireless-regdb: update regulatory.bin based on preceding changes Signed-off-by: Ryan Mounce <ryan@mounce.com.au> (cherry picked from commit 8b12e62e9cd6ba2e3bb2e7f2555180df0173c7c6)
* treewide: fix shellscript syntax errors/typosLorenzo Santina2017-09-131-1/+1
| | | | | | | | | Fix multiple syntax errors in shelscripts (of packages only) These errors were causing many conditions to not working properly Signed-off-by: Lorenzo Santina <lorenzo.santina@edu.unito.it> [increase PKG_RELEASE, drop command substitution from directip.sh] Signed-off-by: Mathias Kresin <dev@kresin.em>
* mac80211, hostapd: always explicitly set beacon intervalMatthias Schiffer2017-05-271-4/+6
| | | | | | | | | | | | | | | | One of the latest mac80211 updates added sanity checks, requiring the beacon intervals of all VIFs of the same radio to match. This often broke AP+11s setups, as these modes use different default intervals, at least in some configurations (observed on ath9k). Instead of relying on driver or hostapd defaults, change the scripts to always explicitly set the beacon interval, defaulting to 100. This also applies the beacon interval to 11s interfaces, which had been forgotten before. VIF-specific beacon_int setting is removed from hostapd.sh. Fixes FS#619. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* mac80211: start hostapd with logging wpa_printf messages to syslogRafał Miłecki2017-02-051-1/+1
| | | | | | | Some debugging/error messages are printed using wpa_printf and this change allows finally reading them out of the syslog. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* mac80211: Allow HT/VHT rates when running unencrypted mesh.Alexis Green2017-01-021-1/+36
| | | | Signed-off-by: Alexis Green <agreen@cococorp.com>
* base-files, mac80211, broadcom-wl: wifi detection and configurationChristian Lamparter2016-11-031-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the wifi detection script is executed as part of the (early) boot process. Pluggable wifi USB devices, which are inserted at a later time are not automatically detected and therefore they don't show up in LuCI. A user has to deal with wifi detection manually, or restart the router. However, the current "sleep 1" window - which the boot process waits for wifi devices to "settle down" - is too short to detect wifi devices for some routers anyway. For example, this can happen with USB WLAN devices on the WNDR4700. This is because the usb controller needs to load its firmware from UBI and initialize, before it can operate. The issue can be seen on a BT HomeHub 5A as well as soon as the caldata are on an ubi volume. This is because the ath9k card has to be initialized by owl-loader first. Which has to wait for the firmware extraction script to retrieve the pci initialization values inside the caldata. This patch moves the wifi configuration to hotplug scripts. For mac80211, the wifi configuration will now automatically run any time a "ieee80211" device is added. Likewise broadcom-wl's script checks for new "net" devices which have the "wl$NUMBER" moniker. Issues with spawning multiple interface configuration - in case the detection script is run concurrently - have been resolved by using a named section for the initial configuration. Concurrent configuration scripts will now simply overwrite the same existing configuration. A workaround which preserves the "sleep 1" window for just the first boot has been added. This allows the existing brcm47xx boot and mvebu uci-default scripts to correctly setup the initial mac addresses and regulatory domain. And finally, the patch renames the "wifi detect" into "wifi config". As the script no longer produces any output that has to be redirected or appended to the configuration file. Thanks to Martin Blumenstingl for helping with the implementation and testing of the patch. Acked-by: Jo-Philipp Wich <jo@mein.io> Signed-off-by: Mathias Kresin <dev@kresin.me> Signed-off-by: Christian Lamparter <chunkeey@gmail.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
* base-files, mac80211, broadcom-wl: use uci to populate wireless configChristian Lamparter2016-11-031-22/+21
| | | | | | | | | | | | | | | | | | | | Previously, wifi detect simply dumped its generated wireless configuration to STDOUT. A second step was needed to append the configuration to /etc/config/wireless (or create it, if it didn't exist). With this patch, The wifi detection script will now use uci to update the wireless configuration directly. This patch also makes the initially created wifi-iface a named section ('default_radio$X' for mac80211 and 'default_wl$X' for broadcom). With this change, uci will not print the cfgHASH to STDOUT (which would now corrupt the wireless configuration). It will also prevent adding duplicated wifi interface configurations, if the wifi configuration is run concurrently. Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* mac80211: Update the regdb to master-2016-06-10Petko Bordjukov2016-08-071-21/+66
| | | | | | | | | | | | | | | Changes include: * Higher maximum transmit power in the 5170-5250 band of the BG regdomain * Introduction of the CU regdomain * Introduction of the 5725-5875 band (short-range devices) in the DE regdomain * Introduction of 60 GHz channels 1-4 in the KR regdomain * Introduction of the 5725-5875 band (short-range devices) in the NL regdomain Signed-off-by: Petko Bordjukov <bordjukov@gmail.com>
* mac80211: fix calculation of VHT capability valuesScott Shambarger2016-06-101-7/+6
| | | | | | | | | | - Fix calculation of `$vht_cap` bit field - Replace wrong reference to `$tx_stbc` variable with proper `$tx_stbc_2by1` one - Emit proper `RX-STBC-{1,12,123,1234}` tokens for the VHT capability list See https://dev.openwrt.org/ticket/22535 for reference. Signed-off-by: Scott Shambarger <devel@shambarger.net>
* mac80211: change default SSID from Lede to LEDERafał Miłecki2016-05-291-1/+1
| | | | | | | | | | LEDE project seems to be using "LEDE" as its acronym everywhere. To keep things consistent adjust default wireless SSID. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Acked-by: Jo-Philipp Wich <jo@mein.io> Acked-by: John Crispin <john@phrozen.org> Acked-by: Alexander Couzens <lynxis@fe80.eu>
* branding: add LEDE brandingJohn Crispin2016-03-241-1/+1
| | | | Signed-off-by: John Crispin <blogic@openwrt.org>
* mac80211: only strip the platform/ prefix from path for pci devicesFelix Fietkau2016-01-211-1/+3
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 48440
* mac80211: fix check for existing config section from r48426Felix Fietkau2016-01-211-3/+3
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 48439
* mac80211: strip platform/ prefix from device path to improve compatibility ↵Felix Fietkau2016-01-211-0/+1
| | | | | | | | between kernel versions Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 48426
* mac80211: make the path phy lookup more robust regarding config upgrades, ↵Felix Fietkau2016-01-212-9/+7
| | | | | | | | allow partial path matching Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 48425
* mac80211: resync regulatory db with master-2015-12-14Imre Kaloz2016-01-121-5/+5
| | | | | | Signed-off-by: Imre Kaloz <kaloz@openwrt.org> SVN-Revision: 48219
* mac80211: fix passing of VHT80 in IBSS modeJo-Philipp Wich2015-12-091-1/+1
| | | | | | | | | The "iw" utility expects the VHT80 to be specified as uppercase "80MHZ", change the script to reflect that. Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> SVN-Revision: 47814
* mac80211: fix disabling HT in IBSS mode (#21340)Jo-Philipp Wich2015-12-091-0/+3
| | | | | | Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> SVN-Revision: 47813
* mac80211: Allow to select VHT80 in IBSS modeFelix Fietkau2015-12-051-1/+4
| | | | | | Signed-off-by: Sven Eckelmann <sven@open-mesh.com> SVN-Revision: 47781
* mac80211: restricted automatic channel selectionFelix Fietkau2015-11-081-0/+3
| | | | | | | | | | | | | | | Add a new config option "channels" for mac80211 wifi devices. It's only valid if automatic channel selection is used and restricts the channel selection to one of the given channels. config wifi-device list channels 1 list channels 6 list channels 11 Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> SVN-Revision: 47427
* mac80211: set mcast-rate for mesh point interfacesFelix Fietkau2015-11-071-6/+8
| | | | | | | | | | | | | | | In order to set the multicast rate for mesh point interfaces the "mesh join" was made explicit and moved to mac80211_setup_vif(), similar to how it is done for IBSS interfaces. Previously, the mesh join was made implicit in case authentication (i.e. $key) was not used when creating the interface in mac80211_prepare_vif(), while using authentication would create the interface first, then join later in mac80211_setup_vif() by starting authsae. Signed-off-by: Nils Schneider <nils@nilsschneider.net> SVN-Revision: 47408
* mac80211: update regulatory database to master-2015-10-22Felix Fietkau2015-10-301-69/+80
| | | | | | Signed-off-by: Andrej Vlasic <andrej.vlasic0@gmail.com> SVN-Revision: 47297
* package: replace ifconfig-usage with ipSteven Barth2015-09-081-3/+3
| | | | | | Signed-off-by: Steven Barth <steven@midlink.org> SVN-Revision: 46832
* mac80211: update regulatory database to master-2015-06-05Felix Fietkau2015-07-071-45/+81
| | | | | | Signed-off-by: Petko Bordjukov <bordjukov@gmail.com> SVN-Revision: 46209
* hostapd: move ht_coex variable to mac80211.sh, guarded by 802.11n supportFelix Fietkau2015-06-061-2/+5
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 45917
* mac80211: make netifd script create AP interface directlyFelix Fietkau2015-05-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Before starting hostapd we create interface for it. The problem is we try to create STA interface just to let hostapd change it to AP later. It may fail if device doesn't support STA interfaces or if we already hit a limit. Consider following phy (it's from BCM43602 and brcmfmac): $ iw phy phy0 info | tail valid interface combinations: * #{ IBSS, managed } <= 1, #{ AP } <= 4, #{ P2P-client, P2P-GO } <= 1, #{ P2P-device } <= 1, total <= 3, #channels <= 1 Trying to setup 2 interfaces: STA + AP results in: radio0 (1101): command failed: Operation not supported (-95) radio0 (1101): command failed: Operation not supported (-95) radio0 (1101): command failed: Operation not supported (-95) radio0 (1101): command failed: Operation not supported (-95) radio0 (1101): Configuration file: /var/run/hostapd-phy0.conf radio0 (1101): Could not read interface wlan0-1 flags: No such device Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 45856
* mac80211: apply mesh parameters after starting authsae/wpa_supplicant (#16697)Felix Fietkau2015-05-091-5/+5
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 45651
* mac80211: fallback to wpa_supplicant to setup encrypted meshFelix Fietkau2015-04-201-4/+3
| | | | | | | | | | instead of failing when authsae is not installed, also try using wpa_supplicant as the newly added -mesh variants support mesh mode and SAE encryption. Signed-off-by: Daniel Golle <daniel@makrotopia.org> SVN-Revision: 45520
* netifd: fix start_disabled 'sh: bad number' in mac80211 setup (bug #19345)Felix Fietkau2015-04-111-0/+1
| | | | | | | | | | | | | | | | | | | Two errors "netifd: radio0: sh: bad number" have recently surfaced in system log in trunk when wifi interfaces come up. I tracked the errors to checking numerical values of some config options without ensuring that the option has any value. The errors I see have apparently been introduced by r45051 (ieee80211r in hostapd) and r45326 (start_disabled in mac80211). My patches fix two instances of "bad number", but there may be a third one, as the original report in bug 19345 pre-dates r45326 and already has two "bad number" errors for radio0. https://dev.openwrt.org/ticket/19345 Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi> SVN-Revision: 45379
* mac80211: add start_disabled optionJohn Crispin2015-04-091-2/+3
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 45326
* mac80211: fix 5ghz variable nameImre Kaloz2015-03-201-2/+2
| | | | | | Signed-off-by: Imre Kaloz <kaloz@openwrt.org> SVN-Revision: 44907
* mac80211: when looking for VHT, check 5GHz support as wellImre Kaloz2015-03-201-1/+2
| | | | | | Signed-off-by: Imre Kaloz <kaloz@openwrt.org> SVN-Revision: 44906
* mac80211: Revert adding SM Power Save capability to hostapd configurationJohn Crispin2015-02-021-8/+0
| | | | | | | | | | | | | | | Part of rev 44173 added setting the SM Power Save capability in the hostapd.conf file if the driver indicated that it was supported. It appears this was incorrect, because the field in the actual HT Capabilities field in the AP configuration is really a state indication. Just copying the state from the capability resulted in the AP indicating that it had SMPS enabled all the time if it supported SMPS. This effectively just disables all clients from sending packets to the AP with more than one spatial stream, for no good reason. So remove this part of the change. Signed-off-by: Robert Hancock <hancockrwd@gmail.com> SVN-Revision: 44239
* mac80211: Add some missing 802.11n capabilities to hostapd configurationJohn Crispin2015-01-281-0/+11
| | | | | | | | | Add some missing 802.11n capabilities to the hostapd ht_capab string when supported by the hardware: Spatial Multiplexing Power-Save and 7935-byte AMSDUs. Signed-off-by: Robert Hancock <hancockrwd@gmail.com> SVN-Revision: 44173
* mac80211: fix fallback to macaddrJohn Crispin2015-01-281-1/+5
| | | | | | | | | | | | | If '/sys/class/ieee80211/phyN' is not a symlink, the call to readlink produces either an empty path (if /sys/class/ieee80211/phyN/device doesn't exist) or a path that begins with '/sys/class/ieee80211' (which does not work with the subsequent line to strip '/sys/devices' from the beginning of the path). Modify the checks to detect these conditions, and fallback to using the macaddr. Signed-off-by: Nathan Hintz <nlhintz@hotmail.com> SVN-Revision: 44172
* mac80211/hostapd: fix HT mode setup for RSN ad-hoc networksFelix Fietkau2015-01-241-29/+33
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 44100
* mac80211: fix ad-hoc basic/multicast rate regression from r43782Felix Fietkau2015-01-051-2/+2
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 43853
* mac80211: fix HT mode selection for ad-hocFelix Fietkau2014-12-221-3/+32
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 43769
* mac80211: update regdb to master-2014-11-18Felix Fietkau2014-11-271-367/+611
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 43408
* mac80211: try to get interface addresses from wiphy sysfs 'addresses' if no ↵Felix Fietkau2014-11-191-1/+19
| | | | | | | | mask is set Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 43326
* scripts: fix wrong usage of '==' operatorJohn Crispin2014-10-141-1/+1
| | | | | | | | | | | | | | [base-files] shell-scripting: fix wrong usage of '==' operator normally the '==' is used for invoking a regex parser and is a bashism. all of the fixes just want to compare a string. the used busybox-ash will silently "ignore" this mistake, but make it portable/clean at least. this patch does not change the behavior/logic of the scripts. Signed-off-by: Bastian Bittorf <bittorf@bluebottle.com> SVN-Revision: 42911
* mac80211: remove NO-IR from channel 36-48Felix Fietkau2014-10-121-1/+1
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 42882
* mac80211: remove error from detect scriptFelix Fietkau2014-10-091-4/+11
| | | | | | Signed-off-by: Michel Stam <m.stam@fugro.nl> SVN-Revision: 42861
* mac80211: support wildcard paths when matching physJo-Philipp Wich2014-07-292-6/+14
| | | | | | | | | | | | | This change introduces support for wildcard patterns in "option path" of section "wifi-device". Objective is to allow paths like "*/usb[0-9]/*/*" in order to claim any usb device using the same backend type, regardless of its bus address or phy name. Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> SVN-Revision: 41873
* mac80211: Fix config variable name for dtim_periodFelix Fietkau2014-07-101-1/+1
| | | | | | | | | | | | The vif option dtim_period was accidently renamed dtim_interval in r38988 ("netifd: add wireless configuration support and port mac80211 to the new framework"). This is wrong and makes the dtim_period/dtim_interval a dead option because the rest of the config generation code still uses dtim_period. Reported-by: Jeppe Ledet-Pedersen <jlp@steinwurf.com> Signed-off-by: Sven Eckelmann <sven@narfation.org> SVN-Revision: 41557
* mac80211: update regulatory database to master-2014-06-13Hauke Mehrtens2014-07-021-27/+153
| | | | | | Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> SVN-Revision: 41489
* mac80211: disable greenfield by defaultFelix Fietkau2014-06-221-1/+1
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 41300