diff options
author | Philipp Hortmann <philipp.g.hortmann@gmail.com> | 2022-08-07 20:13:51 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-08-16 15:10:42 +0200 |
commit | 0e17361b3d12e15586adcc6ad7b7bbefb6ca06d5 (patch) | |
tree | ea6992b44bd4ed02ac2e564bbdd063c10902bf13 /drivers | |
parent | cc00269153b870895baaad9f74034b8ae8803d7a (diff) | |
download | linux-0e17361b3d12e15586adcc6ad7b7bbefb6ca06d5.tar.gz linux-0e17361b3d12e15586adcc6ad7b7bbefb6ca06d5.tar.bz2 linux-0e17361b3d12e15586adcc6ad7b7bbefb6ca06d5.zip |
staging: vt6655: Convert macro MACvEnableBarkerPreambleMd
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/vt6655/device_main.c | 6 | ||||
-rw-r--r-- | drivers/staging/vt6655/mac.h | 8 |
2 files changed, 5 insertions, 9 deletions
diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c index 96945fb8d536..46bd88ee4668 100644 --- a/drivers/staging/vt6655/device_main.c +++ b/drivers/staging/vt6655/device_main.c @@ -244,6 +244,10 @@ static void vt6655_mac_dis_protect_md(void __iomem *iobase) 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 */ @@ -1479,7 +1483,7 @@ static void vnt_bss_info_changed(struct ieee80211_hw *hw, 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); diff --git a/drivers/staging/vt6655/mac.h b/drivers/staging/vt6655/mac.h index a7d6254fded0..3400ea15b673 100644 --- a/drivers/staging/vt6655/mac.h +++ b/drivers/staging/vt6655/mac.h @@ -543,14 +543,6 @@ #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; \ |