Commit 3017e587 authored by Oscar Carter's avatar Oscar Carter Committed by Greg Kroah-Hartman

staging: vt6656: Use BIT() macro in vnt_mac_reg_bits_* functions

The last parameter in the functions vnt_mac_reg_bits_on and
vnt_mac_reg_bits_off defines the bits to set or unset. So, it's more
clear to use the BIT() macro instead of an hexadecimal value.
Signed-off-by: default avatarOscar Carter <oscar.carter@gmx.com>
Link: https://lore.kernel.org/r/20200320181326.12156-1-oscar.carter@gmx.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 609ccb30
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
* *
*/ */
#include <linux/bits.h>
#include "mac.h" #include "mac.h"
#include "baseband.h" #include "baseband.h"
#include "rf.h" #include "rf.h"
...@@ -454,7 +455,7 @@ int vnt_vt3184_init(struct vnt_private *priv) ...@@ -454,7 +455,7 @@ int vnt_vt3184_init(struct vnt_private *priv)
if (ret) if (ret)
goto end; goto end;
ret = vnt_mac_reg_bits_on(priv, MAC_REG_PAPEDELAY, 0x01); ret = vnt_mac_reg_bits_on(priv, MAC_REG_PAPEDELAY, BIT(0));
if (ret) if (ret)
goto end; goto end;
} else if (priv->rf_type == RF_VT3226D0) { } else if (priv->rf_type == RF_VT3226D0) {
...@@ -463,7 +464,7 @@ int vnt_vt3184_init(struct vnt_private *priv) ...@@ -463,7 +464,7 @@ int vnt_vt3184_init(struct vnt_private *priv)
if (ret) if (ret)
goto end; goto end;
ret = vnt_mac_reg_bits_on(priv, MAC_REG_PAPEDELAY, 0x01); ret = vnt_mac_reg_bits_on(priv, MAC_REG_PAPEDELAY, BIT(0));
if (ret) if (ret)
goto end; goto end;
} }
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
* *
*/ */
#include <linux/bits.h>
#include "device.h" #include "device.h"
#include "card.h" #include "card.h"
#include "baseband.h" #include "baseband.h"
...@@ -63,7 +64,8 @@ void vnt_set_channel(struct vnt_private *priv, u32 connection_channel) ...@@ -63,7 +64,8 @@ void vnt_set_channel(struct vnt_private *priv, u32 connection_channel)
vnt_mac_reg_bits_on(priv, MAC_REG_MACCR, MACCR_CLRNAV); vnt_mac_reg_bits_on(priv, MAC_REG_MACCR, MACCR_CLRNAV);
/* Set Channel[7] = 0 to tell H/W channel is changing now. */ /* Set Channel[7] = 0 to tell H/W channel is changing now. */
vnt_mac_reg_bits_off(priv, MAC_REG_CHANNEL, 0xb0); vnt_mac_reg_bits_off(priv, MAC_REG_CHANNEL,
(BIT(7) | BIT(5) | BIT(4)));
vnt_control_out(priv, MESSAGE_TYPE_SELECT_CHANNEL, vnt_control_out(priv, MESSAGE_TYPE_SELECT_CHANNEL,
connection_channel, 0, 0, NULL); connection_channel, 0, 0, NULL);
......
...@@ -366,7 +366,7 @@ static int vnt_init_registers(struct vnt_private *priv) ...@@ -366,7 +366,7 @@ static int vnt_init_registers(struct vnt_private *priv)
if (ret) if (ret)
goto end; goto end;
ret = vnt_mac_reg_bits_on(priv, MAC_REG_GPIOCTL0, 0x01); ret = vnt_mac_reg_bits_on(priv, MAC_REG_GPIOCTL0, BIT(0));
if (ret) if (ret)
goto end; goto end;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment