Re: [OpenWrt-Devel] [PATCH 1/7] [package] mac80211: Make debugging wireless issues with hostapd a little easier
On 2012-11-09 11:10 PM, Daniel Dickinson wrote: --- package/mac80211/files/lib/wifi/mac80211.sh | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/package/mac80211/files/lib/wifi/mac80211.sh b/package/mac80211/files/lib/wifi/mac80211.sh index 4bf035e..4ecb419 100644 --- a/package/mac80211/files/lib/wifi/mac80211.sh +++ b/package/mac80211/files/lib/wifi/mac80211.sh @@ -432,7 +432,15 @@ enable_mac80211() { done [ -n $start_hostapd ] { - hostapd -P /var/run/wifi-$phy.pid -B /var/run/hostapd-$phy.conf || { +{ +if [ -n $debug_hostapd ]; then +echo Debug mode ... +hostapd -d -P /var/run/wifi-$phy.pid /var/run/hostapd-$phy.conf +else +echo Normal mode ... +hostapd -P /var/run/wifi-$phy.pid -B /var/run/hostapd-$phy.conf +fi +} || { echo Failed to start hostapd for $phy return } Starting hostapd a second time here makes no sense at all. If it doesn't work, let the user turn on debugging and run wifi again. - Felix ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 1/7] [package] mac80211: Make debugging wireless issues with hostapd a little easier
--- package/mac80211/files/lib/wifi/mac80211.sh | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/package/mac80211/files/lib/wifi/mac80211.sh b/package/mac80211/files/lib/wifi/mac80211.sh index 4bf035e..4ecb419 100644 --- a/package/mac80211/files/lib/wifi/mac80211.sh +++ b/package/mac80211/files/lib/wifi/mac80211.sh @@ -432,7 +432,15 @@ enable_mac80211() { done [ -n $start_hostapd ] { - hostapd -P /var/run/wifi-$phy.pid -B /var/run/hostapd-$phy.conf || { +{ +if [ -n $debug_hostapd ]; then +echo Debug mode ... +hostapd -d -P /var/run/wifi-$phy.pid /var/run/hostapd-$phy.conf +else +echo Normal mode ... +hostapd -P /var/run/wifi-$phy.pid -B /var/run/hostapd-$phy.conf +fi +} || { echo Failed to start hostapd for $phy return } -- 1.7.9.5 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel