ath10k generate a fault if iwconfig try to set txpower
while the device is down.
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
###############################################################################
# #
# IPFire.org - A linux based firewall #
###############################################################################
# #
# IPFire.org - A linux based firewall #
-# Copyright (C) 2007-2015 IPFire Team <info@ipfire.org> #
+# Copyright (C) 2007-2016 IPFire Team <info@ipfire.org> #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
DIR_APP = $(DIR_SRC)/$(THISAPP)
TARGET = $(DIR_INFO)/$(THISAPP)
PROG = hostapd
DIR_APP = $(DIR_SRC)/$(THISAPP)
TARGET = $(DIR_INFO)/$(THISAPP)
PROG = hostapd
/usr/sbin/iw reg set $COUNTRY
/usr/sbin/iwconfig $INTERFACE channel $CHANNEL 2>/dev/null
/usr/sbin/iw reg set $COUNTRY
/usr/sbin/iwconfig $INTERFACE channel $CHANNEL 2>/dev/null
- /usr/sbin/iwconfig $INTERFACE txpower $TXPOWER
+
+ ip link set ${INTERFACE} up 2>/dev/null
+ /usr/sbin/iwconfig $INTERFACE txpower $TXPOWER 2>/dev/null
/usr/bin/hostapd -P /var/run/hostapd /etc/hostapd.conf >/dev/null 2>&1 &
/usr/bin/hostapd -P /var/run/hostapd /etc/hostapd.conf >/dev/null 2>&1 &