From 595ea383c2f363d47a81701d97c5750e95fef10f Mon Sep 17 00:00:00 2001 From: oblique Date: Sat, 26 Nov 2016 19:45:11 +0200 Subject: [PATCH] Broadcom driver can cause kernel panic when used with virtual interface. Blacklist it. Fixes #203 --- create_ap | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/create_ap b/create_ap index b0b7751..896051c 100755 --- a/create_ap +++ b/create_ap @@ -279,6 +279,13 @@ get_adapter_kernel_module() { can_be_sta_and_ap() { # iwconfig does not provide this information, assume false [[ $USE_IWCONFIG -eq 1 ]] && return 1 + if [[ "$(get_adapter_kernel_module "$1")" == "brcmfmac" ]]; then + echo "WARN: brmfmac driver doesn't work properly with virtual interfaces and" >&2 + echo " it can cause kernel panic. For this reason we disallow virtual" >&2 + echo " interfaces for your adapter." >&2 + echo " For more info: https://github.com/oblique/create_ap/issues/203" >&2 + return 1 + fi get_adapter_info "$1" | grep -E '{.* managed.* AP.*}' > /dev/null 2>&1 && return 0 get_adapter_info "$1" | grep -E '{.* AP.* managed.*}' > /dev/null 2>&1 && return 0 return 1