]> git.karo-electronics.de Git - linux-beck.git/commitdiff
[PATCH] mac80211: reorder association debug output
authorJohannes Berg <johannes@sipsolutions.net>
Wed, 10 Oct 2007 10:03:41 +0000 (12:03 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 17 Oct 2007 01:11:56 +0000 (21:11 -0400)
There's no reason to warn about an invalid AID field when the
association was denied.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Michael Wu <flamingice@sourmilk.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/ieee80211_sta.c

index 1641e8fe44b715e9b8d3832273d90d7df499b4a4..8dae26bbfdf9019ba49c7beb768e9f19a67dc0d6 100644 (file)
@@ -1203,15 +1203,11 @@ static void ieee80211_rx_mgmt_assoc_resp(struct net_device *dev,
        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 %s (capab=0x%x "
               "status=%d aid=%d)\n",
               dev->name, reassoc ? "Rea" : "A", print_mac(mac, 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",
@@ -1223,6 +1219,11 @@ static void ieee80211_rx_mgmt_assoc_resp(struct net_device *dev,
                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) {