summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--examples/wireless-wep2
-rw-r--r--src/8021x2
2 files changed, 4 insertions, 0 deletions
diff --git a/examples/wireless-wep b/examples/wireless-wep
index d0eeaba..b16f65e 100644
--- a/examples/wireless-wep
+++ b/examples/wireless-wep
@@ -7,3 +7,5 @@ KEY='1234567890'
IP='dhcp'
# Uncomment this if your ssid is hidden
#HIDDEN=yes
+## Uncomment if you are using an ad-hoc connection
+#ADHOC=1
diff --git a/src/8021x b/src/8021x
index 6f0edf2..2c49334 100644
--- a/src/8021x
+++ b/src/8021x
@@ -59,6 +59,7 @@ make_wpa_config_file() {
echo "ctrl_interface=/var/run/wpa_supplicant" >> "$WPA_CONF/wpa.conf" # we know $WPA_CONF now has no spaces, but it may have other nasty chars, so still needs to be quoted
echo "ctrl_interface_group=${WPA_GROUP:-wheel}" >> "$WPA_CONF/wpa.conf"
[[ $WPA_COUNTRY ]] && echo "country=$WPA_COUNTRY" >> "$WPA_CONF/wpa.conf"
+ [[ -n "$ADHOC" ]] && echo "ap_scan=2" >> "$WPA_CONF/wpa.conf"
echo "$WPA_CONF/wpa.conf"
}
@@ -70,6 +71,7 @@ make_wpa_config() {
if [[ -n "$AP" ]]; then
echo "bssid=$AP"
fi
+ [[ -n "$ADHOC" ]] && echo "mode=1"
;;
wpa-configsection)
echo "$CONFIGSECTION"