madwifi: modify madwifi.sh to support IBSS WPA-NONE
authorFelix Fietkau <nbd@openwrt.org>
Tue, 27 Mar 2012 13:21:39 +0000 (13:21 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Tue, 27 Mar 2012 13:21:39 +0000 (13:21 +0000)
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
SVN-Revision: 31082

package/madwifi/files/lib/wifi/madwifi.sh

index a180a82d888ce6714d2a624c1725d3e660d940a1..2e37325511ea55cd3069e8f58f8f892ec924a9f9 100755 (executable)
@@ -415,6 +415,15 @@ enable_atheros() {
                                        }
                                fi
                        ;;
+                       adhoc)
+                               if eval "type wpa_supplicant_setup_vif" 2>/dev/null >/dev/null; then
+                                       wpa_supplicant_setup_vif "$vif" madwifi || {
+                                               echo "enable_atheros($device): Failed to set up wpa"
+                                               ifconfig "$ifname" down
+                                               wlanconfig "$ifname" destroy
+                                               continue
+                                       }
+                               fi
                esac
        done
 }