diff options
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/ieee80211_sta.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.c index 1641e8fe44b7..8dae26bbfdf9 100644 --- a/net/mac80211/ieee80211_sta.c +++ b/net/mac80211/ieee80211_sta.c | |||
@@ -1203,15 +1203,11 @@ static void ieee80211_rx_mgmt_assoc_resp(struct net_device *dev, | |||
1203 | capab_info = le16_to_cpu(mgmt->u.assoc_resp.capab_info); | 1203 | capab_info = le16_to_cpu(mgmt->u.assoc_resp.capab_info); |
1204 | status_code = le16_to_cpu(mgmt->u.assoc_resp.status_code); | 1204 | status_code = le16_to_cpu(mgmt->u.assoc_resp.status_code); |
1205 | aid = le16_to_cpu(mgmt->u.assoc_resp.aid); | 1205 | aid = le16_to_cpu(mgmt->u.assoc_resp.aid); |
1206 | if ((aid & (BIT(15) | BIT(14))) != (BIT(15) | BIT(14))) | ||
1207 | printk(KERN_DEBUG "%s: invalid aid value %d; bits 15:14 not " | ||
1208 | "set\n", dev->name, aid); | ||
1209 | aid &= ~(BIT(15) | BIT(14)); | ||
1210 | 1206 | ||
1211 | printk(KERN_DEBUG "%s: RX %sssocResp from %s (capab=0x%x " | 1207 | printk(KERN_DEBUG "%s: RX %sssocResp from %s (capab=0x%x " |
1212 | "status=%d aid=%d)\n", | 1208 | "status=%d aid=%d)\n", |
1213 | dev->name, reassoc ? "Rea" : "A", print_mac(mac, mgmt->sa), | 1209 | dev->name, reassoc ? "Rea" : "A", print_mac(mac, mgmt->sa), |
1214 | capab_info, status_code, aid); | 1210 | capab_info, status_code, aid & ~(BIT(15) | BIT(14))); |
1215 | 1211 | ||
1216 | if (status_code != WLAN_STATUS_SUCCESS) { | 1212 | if (status_code != WLAN_STATUS_SUCCESS) { |
1217 | printk(KERN_DEBUG "%s: AP denied association (code=%d)\n", | 1213 | 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, | |||
1223 | return; | 1219 | return; |
1224 | } | 1220 | } |
1225 | 1221 | ||
1222 | if ((aid & (BIT(15) | BIT(14))) != (BIT(15) | BIT(14))) | ||
1223 | printk(KERN_DEBUG "%s: invalid aid value %d; bits 15:14 not " | ||
1224 | "set\n", dev->name, aid); | ||
1225 | aid &= ~(BIT(15) | BIT(14)); | ||
1226 | |||
1226 | pos = mgmt->u.assoc_resp.variable; | 1227 | pos = mgmt->u.assoc_resp.variable; |
1227 | if (ieee802_11_parse_elems(pos, len - (pos - (u8 *) mgmt), &elems) | 1228 | if (ieee802_11_parse_elems(pos, len - (pos - (u8 *) mgmt), &elems) |
1228 | == ParseFailed) { | 1229 | == ParseFailed) { |