Developing lightweight computation at the DSG edge

Commit c2fe5466 authored by p4u's avatar p4u
Browse files

Merge branch 'testing' into experimental

Conflicts:
	packages/bmx6-qmp/Makefile
parents 42c0f84d 617efdc7
......@@ -33,13 +33,14 @@ Public Sources:
PKG_SOURCE_URL:=git://github.com/axn/bmx6.git
PKG_REV:=bf55438352797a939ccf08eacdc3290928fe3fe7
#PKG_REV:=3434d7fddf8de71d3d4829cb6d5adcefbbf7fe4f
Private Sources:
#PKG_SOURCE_URL:=file:///usr/src/bmx6/bmx6-private.git
PKG_VERSION:=r2012061801
PKG_RELEASE:=2
PKG_RELEASE:=3
#PKG_INSTALL:=1 # this tries to install straight to /usr/sbin/bmx6
PKG_SOURCE_VERSION:=$(PKG_REV)
......
......@@ -21,7 +21,7 @@ SOURCE_COMMON=1
#DEBUG="/tmp/qmp_common.debug"
#######################
# UCI related commands
# UCI related commands
#######################
qmp_uci_get() {
......@@ -52,15 +52,15 @@ qmp_uci_set() {
return $r
}
qmp_uci_set_raw() {
qmp_uci_set_raw() {
uci -q set $@ > /dev/null
r=$?
uci commit
r=$(( $r + $? ))
r=$?
uci commit
r=$(( $r + $? ))
[ $r -ne 0 ] && logger -t qMp "UCI returned an error (uci set $@)"
qmp_debug "qmp_uci_set_raw: uci -q set $@"
return $r
}
return $r
}
qmp_uci_del() {
uci -q del qmp.$1
......@@ -117,20 +117,20 @@ qmp_uci_commit() {
qmp_uci_add_raw() {
uci -q add $@ > /dev/null
r=$?
r=$?
uci commit
r=$(( $r + $? ))
[ $r -ne 0 ] && logger -t qMp "UCI returned an error (uci add $@)"
qmp_debug "qmp_uci_add_raw: uci -q add $@"
return $r
return $r
}
qmp_uci_add_list_raw() {
uci -q add_list $@ > /dev/null
r=$?
uci commit
r=$(( $r + $? ))
[ $r -ne 0 ] && logger -t qMp "UCI returned an error (uci add_list $@)"
r=$?
uci commit
r=$(( $r + $? ))
[ $r -ne 0 ] && logger -t qMp "UCI returned an error (uci add_list $@)"
qmp_debug "qmp_uci_add_list_raw: uci -q add_list $@"
return $r
}
......@@ -140,7 +140,7 @@ qmp_uci_import() {
[ ! -z "$v" ] && { uci set $v; qmp_debug "qmp_uci_import: uci set $v"; }
done
uci commit
return $?
return $?
}
qmp_uci_test() {
......@@ -189,8 +189,7 @@ qmp_get_wifi_mac_devices() {
# qmp_get_dev_from_mac 00:22:11:33:44:55
qmp_get_dev_from_mac() {
ip link | grep $1 -i -B1 | grep -v \@ | egrep -v "ether|br|mon" | grep mtu | awk '{print $2}' | tr -d : | awk NR==1
}
}
qmp_get_mac_for_dev() {
ip addr show dev $1 | grep -m 1 "link/ether" | awk '{print $2}'
......@@ -207,7 +206,7 @@ qmp_reverse_order() {
# Print the output of the command parameter in reverse order (separed by lines)
qmp_tac() {
$@ | awk '{a[NR]=$0} END {for(i=NR;i>0;i--)print a[i]}'
$@ | awk '{a[NR]=$0} END {for(i=NR;i>0;i--)print a[i]}'
}
qmp_get_dec_node_id() {
......
......@@ -71,7 +71,7 @@ function qmpinfo.get_txpower(dev)
local iw = iwinfo[iwinfo.type(dev)]
local txpower_supported = {}
if iw ~= nil then
local txp = iw.txpwrlist(dev)
local txp = iw.txpwrlist(dev) or {}
for _,v in ipairs(txp) do
table.insert(txpower_supported,v.dbm)
end
......
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