mac80211: make netifd script create AP interface directly
authorFelix Fietkau <nbd@openwrt.org>
Sat, 30 May 2015 23:08:57 +0000 (23:08 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Sat, 30 May 2015 23:08:57 +0000 (23:08 +0000)
commit283088074f261cad7097fb88c83e00895840b310
tree4b6b7a08009f4eb1256a402a0f29b13c330667b8
parent8393c87bc74c6756bcb2b2b89e6f784a307e2782
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>
SVN-Revision: 45856
package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh