Developing lightweight computation at the DSG edge

Commit 330d3450 authored by Roger Pueyo Centelles's avatar Roger Pueyo Centelles
Browse files

Fix #281: Added 802.11na template, corrected 802.11ng, moved 802.11n to 802.11auto

parent f32c09dc
......@@ -153,23 +153,40 @@ qmp_configure_wifi_device() {
local mode11=""
local htmode=""
[ -n "$ht40" ] && {
[ "$ht40" == "+" -o "$ht40" == "-" ] && {
# Device is selected to use 40MHz channel
mode11="n"
htmode="HT40$ht40"
[ $channel < 15 ] && {
# If it is 2.4
mode11="ng"
} || {
# If it is 5
mode11="na"
}
} || {
m11b="$(echo $channel_raw | tr -d [0-9]+-)"
m11n="$($QMPINFO modes $device | grep -c n)"
[ -n "$m11b" -o $m11n = 0 ] && {
# Device is not 11n compatible or mode 11b is forced
[ "$m11b" == "b" ] && {
# Mode 11b is forced
htmode=""
mode11="b"
} || {
} || [ $m11n -eq 0 ] && {
# Device is not 11n compatible
htmode=""
mode11="auto"
} || {
# Device is 11n compatible
htmode="HT20"
mode11="n"
[ $channel < 15 ] && {
# If it is 2.4
htmode="HT20"
mode11="ng"
} || {
# If it is 5
htmode="HT20"
mode11="na"
}
}
}
......
......@@ -12,4 +12,3 @@ list wireless.#QMP_RADIO.ht_capab=SHORT-GI-20
list wireless.#QMP_RADIO.ht_capab=SHORT-GI-40
list wireless.#QMP_RADIO.ht_capab=RX-STBC1
list wireless.#QMP_RADIO.ht_capab=DSSS_CCK-40
wireless.#QMP_RADIO=wifi-device
wireless.#QMP_RADIO.type=mac80211
wireless.#QMP_RADIO.macaddr=#QMP_MAC
wireless.#QMP_RADIO.channel=#QMP_CHANNEL
wireless.#QMP_RADIO.country=#QMP_COUNTRY
wireless.#QMP_RADIO.hwmode=11na
wireless.#QMP_RADIO.htmode=#QMP_HTMODE
wireless.#QMP_RADIO.txpower=#QMP_TXPOWER
wireless.#QMP_RADIO.noscan=1
wireless.#QMP_RADIO.distance=5000
list wireless.#QMP_RADIO.ht_capab=SHORT-GI-20
list wireless.#QMP_RADIO.ht_capab=SHORT-GI-40
list wireless.#QMP_RADIO.ht_capab=RX-STBC1
list wireless.#QMP_RADIO.ht_capab=DSSS_CCK-40
wireless.#QMP_RADIO=wifi-device
wireless.#QMP_RADIO.type=mac80211
wireless.#QMP_RADIO.macaddr=#QMP_MAC
wireless.#QMP_RADIO.channel=#QMP_CHANNEL
wireless.#QMP_RADIO.country=#QMP_COUNTRY
wireless.#QMP_RADIO.hwmode=11ng
wireless.#QMP_RADIO.htmode=#QMP_HTMODE
wireless.#QMP_RADIO.txpower=#QMP_TXPOWER
wireless.#QMP_RADIO.noscan=1
wireless.#QMP_RADIO.distance=5000
list wireless.#QMP_RADIO.ht_capab=SHORT-GI-20
list wireless.#QMP_RADIO.ht_capab=SHORT-GI-40
list wireless.#QMP_RADIO.ht_capab=RX-STBC1
list wireless.#QMP_RADIO.ht_capab=DSSS_CCK-40
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment