ramips: allow to set switchdev by board in ramips_set_preinit_iface
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>
Mon, 16 Dec 2019 17:07:03 +0000 (18:07 +0100)
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>
Tue, 17 Dec 2019 14:09:48 +0000 (15:09 +0100)
commitf45a16dead15169f06a999f71061e66df1fc478c
tree4fabc0bcafe66c3d6a9fc497d111ee029ed54c6f
parent38bdfcdb87e9b3a1232e9820bd6534da4c28282b
ramips: allow to set switchdev by board in ramips_set_preinit_iface

This adds the option to determine switchdev by board when setting
preinit iface for failsafe. The patch reorganizes the code to use
functions for setting correct switchdev based on SOC and board,
which is supposed to improve readability and maintainability.

In this patch, the ramips_switchdev_from_board function is added
without specifying an actual device using it. This is meant to
make the life of device supporters waiting for merge easier, as
there is less to rebase and keep track of.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
target/linux/ramips/base-files/lib/preinit/07_set_preinit_iface_ramips