From: John W. Linville Date: Fri, 30 Jul 2010 01:52:59 +0000 (-0400) Subject: rtl8187: consolidate MSR writes in rtl8187_bss_info_changed X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=31a5cddaaed9c04ef653e3c2900cfb5a646fe686;p=openwrt%2Fstaging%2Fblogic.git rtl8187: consolidate MSR writes in rtl8187_bss_info_changed Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/rtl818x/rtl8187_dev.c b/drivers/net/wireless/rtl818x/rtl8187_dev.c index 5738a55c1b06..0801c1d7c8d4 100644 --- a/drivers/net/wireless/rtl818x/rtl8187_dev.c +++ b/drivers/net/wireless/rtl818x/rtl8187_dev.c @@ -1176,13 +1176,12 @@ static void rtl8187_bss_info_changed(struct ieee80211_hw *dev, else reg = 0; - if (is_valid_ether_addr(info->bssid)) { + if (is_valid_ether_addr(info->bssid)) reg |= RTL818X_MSR_INFRA; - rtl818x_iowrite8(priv, &priv->map->MSR, reg); - } else { + else reg |= RTL818X_MSR_NO_LINK; - rtl818x_iowrite8(priv, &priv->map->MSR, reg); - } + + rtl818x_iowrite8(priv, &priv->map->MSR, reg); mutex_unlock(&priv->conf_mutex); }