Convert macro MACvEnableBarkerPreambleMd to static function which calls
the common static function vt6655_mac_set_bits. This saves
codelines and multiline macros are not liked by kernel community.
Function name is also changed to avoid CamelCase which is not accepted
by checkpatch.pl and to clean up namespace.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/542b9f8c0b10aa3db143b22f7425ab5bddc5bffe.1659892671.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
vt6655_mac_clear_bits(iobase, ENCFG_PROTECTMD);
}
+static void vt6655_mac_en_barker_preamble_md(void __iomem *iobase)
+{
+ vt6655_mac_set_bits(iobase, ENCFG_BARKERPREAM);
+}
/*
* Initialisation of MAC & BBP registers
*/
if (changed & BSS_CHANGED_ERP_PREAMBLE) {
if (conf->use_short_preamble) {
- MACvEnableBarkerPreambleMd(priv->port_offset);
+ vt6655_mac_en_barker_preamble_md(priv->port_offset);
priv->preamble_type = true;
} else {
MACvDisableBarkerPreambleMd(priv->port_offset);
#define MACvSelectPage1(iobase) \
iowrite8(1, iobase + MAC_REG_PAGE1SEL)
-#define MACvEnableBarkerPreambleMd(iobase) \
-do { \
- unsigned long dwOrgValue; \
- dwOrgValue = ioread32(iobase + MAC_REG_ENCFG); \
- dwOrgValue = dwOrgValue | ENCFG_BARKERPREAM; \
- iowrite32((u32)dwOrgValue, iobase + MAC_REG_ENCFG); \
-} while (0)
-
#define MACvDisableBarkerPreambleMd(iobase) \
do { \
unsigned long dwOrgValue; \