[IEEE80211]: Fix softmac lockdep reports.

It seems I was actually able to hit this deadlock, on my quad G5 softmac
locks up more often than not. This fixes it by using an own workqueue
that can safely be flushed under RTNL.

Not sure if the patch is correct with the workqueue naming. And don't
think with the patch it doesn't continually lock up. It still does, just
doesn't invoke lockdep warnings all the time.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
此提交包含在:
Johannes Berg
2007-10-03 18:14:23 -07:00
提交者 David S. Miller
父節點 05155c83d1
當前提交 501d857ec9
共有 7 個檔案被更改,包括 25 行新增17 行删除

查看文件

@@ -53,7 +53,7 @@ ieee80211softmac_assoc(struct ieee80211softmac_device *mac, struct ieee80211soft
/* Set a timer for timeout */
/* FIXME: make timeout configurable */
if (likely(mac->running))
schedule_delayed_work(&mac->associnfo.timeout, 5 * HZ);
queue_delayed_work(mac->wq, &mac->associnfo.timeout, 5 * HZ);
spin_unlock_irqrestore(&mac->lock, flags);
}
@@ -419,7 +419,7 @@ ieee80211softmac_handle_assoc_response(struct net_device * dev,
network->authenticated = 0;
/* we don't want to do this more than once ... */
network->auth_desynced_once = 1;
schedule_delayed_work(&mac->associnfo.work, 0);
queue_delayed_work(mac->wq, &mac->associnfo.work, 0);
break;
}
default:
@@ -441,7 +441,7 @@ ieee80211softmac_try_reassoc(struct ieee80211softmac_device *mac)
spin_lock_irqsave(&mac->lock, flags);
mac->associnfo.associating = 1;
schedule_delayed_work(&mac->associnfo.work, 0);
queue_delayed_work(mac->wq, &mac->associnfo.work, 0);
spin_unlock_irqrestore(&mac->lock, flags);
}
@@ -483,7 +483,7 @@ ieee80211softmac_handle_reassoc_req(struct net_device * dev,
dprintkl(KERN_INFO PFX "reassoc request from unknown network\n");
return 0;
}
schedule_delayed_work(&mac->associnfo.work, 0);
queue_delayed_work(mac->wq, &mac->associnfo.work, 0);
return 0;
}