Skip to content

Commit

Permalink
staging: vt6655: Convert macro MACvDisableBarkerPreambleMd
Browse files Browse the repository at this point in the history
Convert macro MACvDisableBarkerPreambleMd to static function which calls
the common static function vt6655_mac_clear_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/2a1d67762d9ecf3f30f3e293ad6ab997ad278b84.1659892671.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Philipp Hortmann authored and gregkh committed Aug 16, 2022
1 parent 0e17361 commit 692f900
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
8 changes: 7 additions & 1 deletion drivers/staging/vt6655/device_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,12 @@ static void vt6655_mac_en_barker_preamble_md(void __iomem *iobase)
{
vt6655_mac_set_bits(iobase, ENCFG_BARKERPREAM);
}

static void vt6655_mac_dis_barker_preamble_md(void __iomem *iobase)
{
vt6655_mac_clear_bits(iobase, ENCFG_BARKERPREAM);
}

/*
* Initialisation of MAC & BBP registers
*/
Expand Down Expand Up @@ -1486,7 +1492,7 @@ static void vnt_bss_info_changed(struct ieee80211_hw *hw,
vt6655_mac_en_barker_preamble_md(priv->port_offset);
priv->preamble_type = true;
} else {
MACvDisableBarkerPreambleMd(priv->port_offset);
vt6655_mac_dis_barker_preamble_md(priv->port_offset);
priv->preamble_type = false;
}
}
Expand Down
8 changes: 0 additions & 8 deletions drivers/staging/vt6655/mac.h
Original file line number Diff line number Diff line change
Expand Up @@ -543,14 +543,6 @@
#define MACvSelectPage1(iobase) \
iowrite8(1, iobase + MAC_REG_PAGE1SEL)

#define MACvDisableBarkerPreambleMd(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 MACvSetBBType(iobase, byTyp) \
do { \
unsigned long dwOrgValue; \
Expand Down

0 comments on commit 692f900

Please sign in to comment.