Skip to contentSkip to conversation

mac80211 fixes for 2.6.22

PATCH In review John W. Linville 3 participants 6 messages May 30, 2007 – May 31, 2007 2 messages not in the archive

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

cover mac80211 fixes for 2.6.22

Some bug fixes that should be applied to 2.6.22:

mac80211: fail back to use associate from reassociate
mac80211: fix memory leak when defrag fragments
mac80211: always set carrier status on open
mac80211: avoid null ptr deref in ieee80211_ibss_add_sta

These are also available in the wireless-2.6 git tree:

	git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git mac80211

Please apply at your earliest convenience!

Thanks,

John

Signature · 2 lines
John W. Linville
[email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw

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

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 files changed, 2 insertions(+), 0 deletions(-)
net/mac80211/ieee80211_sta.c +2 -0
index 3e07e9d..dbac858 100644
@@ -1155,6 +1155,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;
 	}
 
Signature · 5 lines
1.5.0.6

-- 
John W. Linville
[email protected]
#3 lore raw

PATCH 2/4 mac80211: fix memory leak when defrag fragments

From: Hong Liu <[email protected]>

We forget to free all the fragments when defraging them into one packet.

---
 net/mac80211/ieee80211.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
net/mac80211/ieee80211.c +3 -1
index 6e36df6..145604a 100644
@@ -3278,8 +3278,10 @@ ieee80211_rx_h_defragment(struct ieee80211_txrx_data *rx)
 			return TXRX_DROP;
 		}
 	}
-	while ((skb = __skb_dequeue(&entry->skb_list)))
+	while ((skb = __skb_dequeue(&entry->skb_list))) {
 		memcpy(skb_put(rx->skb, skb->len), skb->data, skb->len);
+		dev_kfree_skb(skb);
+	}
 
 	/* Complete frame has been reassembled - process it now */
 	rx->fragmented = 1;
Signature · 5 lines
1.5.0.6

-- 
John W. Linville
[email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#5 lore raw

PATCH 3/4 mac80211: always set carrier status on open

From: Michael Wu <flamingice-R9e9/[email protected]>

ieee80211_open should always set the carrier status since we may have set it to off before.

---
 net/mac80211/ieee80211.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
net/mac80211/ieee80211.c +2 -0
index 145604a..4e84f24 100644
@@ -2474,6 +2474,8 @@ static int ieee80211_open(struct net_device *dev)
 	if (sdata->type == IEEE80211_IF_TYPE_STA &&
 	    !local->user_space_mlme)
 		netif_carrier_off(dev);
+	else
+		netif_carrier_on(dev);
 
 	netif_start_queue(dev);
 	return 0;
Signature · 5 lines
1.5.0.6

-- 
John W. Linville
[email protected]
#6 lore raw

PATCH 4/4 mac80211: avoid null ptr deref in ieee80211_ibss_add_sta

From: John W. Linville <[email protected]>

avoid sdata null pointer dereference in ieee80211_ibss_add_sta.

---
 net/mac80211/ieee80211_sta.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
net/mac80211/ieee80211_sta.c +1 -1
index dbac858..9f30ae4 100644
@@ -2997,7 +2997,7 @@ struct sta_info * ieee80211_ibss_add_sta(struct net_device *dev,
 {
 	struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
 	struct sta_info *sta;
-	struct ieee80211_sub_if_data *sdata = NULL;
+	struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
 
 	/* TODO: Could consider removing the least recently used entry and
 	 * allow new one to be added. */
Signature · 5 lines
1.5.0.6

-- 
John W. Linville
[email protected]
#7 lore raw
In reply to a message not in the archive

From: "John W. Linville" <[email protected]>
Date: Wed, 30 May 2007 14:25:38 -0400

Quoted 7 lines

Some bug fixes that should be applied to 2.6.22:

mac80211: fail back to use associate from reassociate
mac80211: fix memory leak when defrag fragments
mac80211: always set carrier status on open
mac80211: avoid null ptr deref in ieee80211_ibss_add_sta

Quoted 5 lines

These are also available in the wireless-2.6 git tree:

	git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git mac80211

Please apply at your earliest convenience!

Looks good, pulled, thanks a lot John.