based on work from Matti Laasko that he posted in the wiki Signed-off-by: John Crispin <blogic@openwrt.or SVN-Revision: 37704