diff options
author | Felix Fietkau <nbd@openwrt.org> | 2015-05-30 23:08:57 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2015-05-30 23:08:57 +0000 |
commit | 4163b0853da8b0dde090b5f8df81b71d3940bdb2 (patch) | |
tree | 4b6b7a08009f4eb1256a402a0f29b13c330667b8 /package/kernel/mac80211/files | |
parent | 8da0cd2349b05282fc4530772ca6d2698614ced7 (diff) | |
download | master-187ad058-4163b0853da8b0dde090b5f8df81b71d3940bdb2.tar.gz master-187ad058-4163b0853da8b0dde090b5f8df81b71d3940bdb2.tar.bz2 master-187ad058-4163b0853da8b0dde090b5f8df81b71d3940bdb2.zip |
mac80211: make netifd script create AP interface directly
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>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45856 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/kernel/mac80211/files')
-rw-r--r-- | package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh index 824c87ac15..4f680a41f5 100644 --- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh +++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh @@ -447,7 +447,7 @@ mac80211_prepare_vif() { mac80211_hostapd_setup_bss "$phy" "$ifname" "$macaddr" "$type" || return [ -n "$hostapd_ctrl" ] || { - iw phy "$phy" interface add "$ifname" type managed + iw phy "$phy" interface add "$ifname" type __ap hostapd_ctrl="${hostapd_ctrl:-/var/run/hostapd/$ifname}" } ;; |