Backported support for DIR-505-A1 from trunk