]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
hostapd: fix crash at txpower set on ath10k
authorArne Fitzenreiter <arne_f@ipfire.org>
Sat, 26 Mar 2016 14:35:31 +0000 (15:35 +0100)
committerArne Fitzenreiter <arne_f@ipfire.org>
Sat, 26 Mar 2016 14:35:31 +0000 (15:35 +0100)
ath10k generate a fault if iwconfig try to set txpower
while the device is down.

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
lfs/hostapd
src/initscripts/init.d/hostapd

index e9286684bf6b8dc64abde07aa5fc082670027ff4..f393d9179e6a80cbd32252e16721ebb748e98d5e 100644 (file)
@@ -1,7 +1,7 @@
 ###############################################################################
 #                                                                             #
 # 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        #
@@ -32,7 +32,7 @@ DL_FROM    = $(URL_IPFIRE)
 DIR_APP    = $(DIR_SRC)/$(THISAPP)
 TARGET     = $(DIR_INFO)/$(THISAPP)
 PROG       = hostapd
 DIR_APP    = $(DIR_SRC)/$(THISAPP)
 TARGET     = $(DIR_INFO)/$(THISAPP)
 PROG       = hostapd
-PAK_VER    = 34
+PAK_VER    = 35
 
 DEPS       = ""
 
 
 DEPS       = ""
 
index 209f969def7c93d043c77b46069deed5145b7551..02e8c161472623109f1586904e42b234eb760794 100644 (file)
@@ -73,7 +73,9 @@ case "${1}" in
                /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 &