Skip to contentSkip to conversation

mac80211: fail back to use associate from reassociate failure

PATCH New John W. Linville 1 participant 1 message May 17, 2007

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mac80211: fail back to use associate from reassociate failure

From: Zhu Yi <[email protected]>

Some APs have strict checking between associate and reassociate. In a case when an AP is restarted during a connection, it denies the mac80211 reassoc request since this is a new association for the AP. To fix this problem, we need to check the status code against WLAN_STATUS_REASSOC_NO_ASSOC and clear ifsta->prev_bssid_set in handling the association failure response.

---

 net/mac80211/ieee80211_sta.c |    2 ++
 1 file changed, 2 insertions(+)
net/mac80211/ieee80211_sta.c +2 -0
index b003912..dacd2d3 100644
@@ -1182,6 +1182,8 @@ static void ieee80211_rx_mgmt_assoc_resp(struct net_device *dev,
 	if (status_code != WLAN_STATUS_SUCCESS) {
 		printk(KERN_DEBUG "%s: AP denied association (code=%d)\n",
 		       dev->name, status_code);
+		if (status_code == WLAN_STATUS_REASSOC_NO_ASSOC)
+			ifsta->prev_bssid_set = 0;
 		return;
 	}