Commit b1266d92 authored by Philipp Hortmann's avatar Philipp Hortmann Committed by Greg Kroah-Hartman

staging: rtl8192e: Remove used constants MSR_LINK_SH.. and MSR_LINK_N..

Remove used constants MSR_LINK_SHIFT = 0 and MSR_LINK_NONE = 0. Use rules
a << 0 = a, 0 << 0 = 0 and msr | 0 = msr to remove dead code.
Signed-off-by: default avatarPhilipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/46bd1f075d5e4d211e1fc827843933907f7fee29.1675003608.git.philipp.g.hortmann@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d48455b0
......@@ -54,22 +54,16 @@ static void _rtl92e_update_msr(struct net_device *dev)
switch (priv->rtllib->iw_mode) {
case IW_MODE_INFRA:
if (priv->rtllib->state == RTLLIB_LINKED)
msr |= (MSR_LINK_MANAGED << MSR_LINK_SHIFT);
else
msr |= (MSR_LINK_NONE << MSR_LINK_SHIFT);
msr |= MSR_LINK_MANAGED;
LedAction = LED_CTL_LINK;
break;
case IW_MODE_ADHOC:
if (priv->rtllib->state == RTLLIB_LINKED)
msr |= (MSR_LINK_ADHOC << MSR_LINK_SHIFT);
else
msr |= (MSR_LINK_NONE << MSR_LINK_SHIFT);
msr |= MSR_LINK_ADHOC;
break;
case IW_MODE_MASTER:
if (priv->rtllib->state == RTLLIB_LINKED)
msr |= (MSR_LINK_MASTER << MSR_LINK_SHIFT);
else
msr |= (MSR_LINK_NONE << MSR_LINK_SHIFT);
msr |= MSR_LINK_MASTER;
break;
default:
break;
......
......@@ -172,8 +172,6 @@ enum _RTL8192Pci_HW {
MSR = 0x303,
#define MSR_LINK_MASK ((1<<0)|(1<<1))
#define MSR_LINK_MANAGED 2
#define MSR_LINK_NONE 0
#define MSR_LINK_SHIFT 0
#define MSR_LINK_ADHOC 1
#define MSR_LINK_MASTER 3
......
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