Identical to connman patch as this code seems to be cut'n'pasted. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>