cfg80211: copy hold when replacing BSS
authorJohannes Berg <johannes@sipsolutions.net>
Thu, 16 Apr 2009 10:15:38 +0000 (12:15 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 17 Apr 2009 19:27:13 +0000 (15:27 -0400)
When we receive a probe response frame we can replace the
BSS struct in our list -- but if that struct is held then
we need to hold the new one as well.

We really should fix this completely and not replace the
struct, but this is a bandaid for now.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/wireless/scan.c

index 2a00e362f5fe1f0eca4c503fa92faf6d13450deb..4c77669275ebd3db17aa349108342c869a09a471 100644 (file)
@@ -364,6 +364,8 @@ cfg80211_bss_update(struct cfg80211_registered_device *dev,
                list_replace(&found->list, &res->list);
                rb_replace_node(&found->rbn, &res->rbn,
                                &dev->bss_tree);
+               /* XXX: workaround */
+               res->hold = found->hold;
                kref_put(&found->ref, bss_release);
                found = res;
        } else if (found) {