提交 160002fe 编写于 作者: J Johannes Berg 提交者: John W. Linville

cfg80211: copy hold when replacing BSS

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: NJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 7181d467
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册