Ported regulatory test patch to OpenWrt trunk.