Add rtl8180 and rtl8187 support. Based on patch from #5138.