From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from pentafluge.infradead.org ([213.146.154.40]:46045 "EHLO pentafluge.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1764737AbXKOGWa (ORCPT ); Thu, 15 Nov 2007 01:22:30 -0500 Date: Wed, 14 Nov 2007 22:21:01 -0800 From: Greg KH To: linux-kernel@vger.kernel.org, stable@kernel.org Cc: Justin Forbes , Zwane Mwaikambo , Theodore Ts'o , Randy Dunlap , Dave Jones , Chuck Wolber , Chris Wedgwood , Michael Krufky , Chuck Ebbert , Domenico Andreoli , torvalds@linux-foundation.org, akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk, Johannes Berg , linux-wireless@vger.kernel.org, "John W. Linville" , Michael Wu Subject: [patch 18/23] mac80211: reorder association debug output Message-ID: <20071115062100.GS8282@kroah.com> (sfid-20071115_062238_751642_12C75B1B) References: <20071115055238.692814352@mini.kroah.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <20071115061806.GA8282@kroah.com> Sender: linux-wireless-owner@vger.kernel.org List-ID: -stable review patch. If anyone has any objections, please let us know. ------------------ From: Johannes Berg patch 1dd84aa213d0f98a91a1ec9be2f750f5f48e75a0 in mainline. There's no reason to warn about an invalid AID field when the association was denied. Signed-off-by: Johannes Berg Acked-by: Michael Wu Signed-off-by: John W. Linville Signed-off-by: Greg Kroah-Hartman --- net/mac80211/ieee80211_sta.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) --- a/net/mac80211/ieee80211_sta.c +++ b/net/mac80211/ieee80211_sta.c @@ -1174,15 +1174,11 @@ static void ieee80211_rx_mgmt_assoc_resp capab_info = le16_to_cpu(mgmt->u.assoc_resp.capab_info); status_code = le16_to_cpu(mgmt->u.assoc_resp.status_code); aid = le16_to_cpu(mgmt->u.assoc_resp.aid); - if ((aid & (BIT(15) | BIT(14))) != (BIT(15) | BIT(14))) - printk(KERN_DEBUG "%s: invalid aid value %d; bits 15:14 not " - "set\n", dev->name, aid); - aid &= ~(BIT(15) | BIT(14)); printk(KERN_DEBUG "%s: RX %sssocResp from " MAC_FMT " (capab=0x%x " "status=%d aid=%d)\n", dev->name, reassoc ? "Rea" : "A", MAC_ARG(mgmt->sa), - capab_info, status_code, aid); + capab_info, status_code, aid & ~(BIT(15) | BIT(14))); if (status_code != WLAN_STATUS_SUCCESS) { printk(KERN_DEBUG "%s: AP denied association (code=%d)\n", @@ -1192,6 +1188,11 @@ static void ieee80211_rx_mgmt_assoc_resp return; } + if ((aid & (BIT(15) | BIT(14))) != (BIT(15) | BIT(14))) + printk(KERN_DEBUG "%s: invalid aid value %d; bits 15:14 not " + "set\n", dev->name, aid); + aid &= ~(BIT(15) | BIT(14)); + pos = mgmt->u.assoc_resp.variable; if (ieee802_11_parse_elems(pos, len - (pos - (u8 *) mgmt), &elems) == ParseFailed) { --