oops... wrong patch (unfixed typo)
[openwrt/svn-archive/archive.git] / package / madwifi / patches / 111-wds_fix_PR_914.patch
1 diff -urN madwifi-ng-refcount-r2313-20070505.old/net80211/ieee80211_node.c madwifi-ng-refcount-r2313-20070505.dev/net80211/ieee80211_node.c
2 --- madwifi-ng-refcount-r2313-20070505.old/net80211/ieee80211_node.c 2007-05-04 23:09:29.000000000 +0200
3 +++ madwifi-ng-refcount-r2313-20070505.dev/net80211/ieee80211_node.c 2007-05-13 18:17:55.697101792 +0200
4 @@ -981,11 +981,11 @@
5 ieee80211_del_wds_node(struct ieee80211_node_table *nt, struct ieee80211_node *ni)
6 {
7 int hash;
8 - struct ieee80211_wds_addr *wds;
9 + struct ieee80211_wds_addr *wds, *next;
10
11 IEEE80211_NODE_TABLE_LOCK_IRQ(nt);
12 for (hash = 0; hash < IEEE80211_NODE_HASHSIZE; hash++) {
13 - LIST_FOREACH(wds, &nt->nt_wds_hash[hash], wds_hash) {
14 + LIST_FOREACH_SAFE(wds, &nt->nt_wds_hash[hash], wds_hash, next) {
15 if (wds->wds_ni == ni) {
16 LIST_REMOVE(wds, wds_hash);
17 ieee80211_unref_node(&wds->wds_ni);
18 @@ -1002,11 +1002,11 @@
19 {
20 struct ieee80211_node_table *nt = (struct ieee80211_node_table *)data;
21 int hash;
22 - struct ieee80211_wds_addr *wds;
23 + struct ieee80211_wds_addr *wds, *next;
24
25 IEEE80211_NODE_TABLE_LOCK_IRQ(nt);
26 for (hash = 0; hash < IEEE80211_NODE_HASHSIZE; hash++) {
27 - LIST_FOREACH(wds, &nt->nt_wds_hash[hash], wds_hash) {
28 + LIST_FOREACH_SAFE(wds, &nt->nt_wds_hash[hash], wds_hash, next) {
29 if (wds->wds_agingcount != WDS_AGING_STATIC) {
30 if (!wds->wds_agingcount) {
31 LIST_REMOVE(wds, wds_hash);