From patchwork Wed Feb 17 22:44:45 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Roskin X-Patchwork-Id: 80100 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o1HMj0SZ026130 for ; Wed, 17 Feb 2010 22:45:02 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755934Ab0BQWo7 (ORCPT ); Wed, 17 Feb 2010 17:44:59 -0500 Received: from c60.cesmail.net ([216.154.195.49]:44643 "EHLO c60.cesmail.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755508Ab0BQWo6 (ORCPT ); Wed, 17 Feb 2010 17:44:58 -0500 Received: from unknown (HELO smtprelay1.cesmail.net) ([192.168.1.111]) by c60.cesmail.net with ESMTP; 17 Feb 2010 17:45:02 -0500 Received: from [192.168.0.22] (unknown [72.92.88.10]) by smtprelay1.cesmail.net (Postfix) with ESMTPSA id A135234C69; Wed, 17 Feb 2010 17:44:53 -0500 (EST) Subject: Re: [PATCH] v2: rtl8187: micro cleanup From: Pavel Roskin To: okias Cc: linux-wireless@vger.kernel.org In-Reply-To: References: <4B7C35C9.30607@lwfinger.net> <1266431764.15836.8.camel@jlt3.sipsolutions.net> <1266433138.9050.27.camel@mj> Date: Wed, 17 Feb 2010 17:44:45 -0500 Message-Id: <1266446685.12365.14.camel@mj> Mime-Version: 1.0 X-Mailer: Evolution 2.26.3 (2.26.3-1.fc11) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Wed, 17 Feb 2010 22:45:02 +0000 (UTC) --- a/drivers/net/wireless/rtl818x/rtl8187_dev.c +++ b/drivers/net/wireless/rtl818x/rtl8187_dev.c @@ -1163,9 +1163,10 @@ static void rtl8187_bss_info_changed(struct ieee80211_hw *dev, { struct rtl8187_priv *priv = dev->priv; int i; - u8 reg; if (changed & BSS_CHANGED_BSSID) { + u8 reg; + mutex_lock(&priv->conf_mutex); for (i = 0; i < ETH_ALEN; i++) rtl818x_iowrite8(priv, &priv->map->BSSID[i], @@ -1176,13 +1177,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); }