Browse Source

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: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg 16 năm trước cách đây
mục cha
commit
160002fe84
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 2 0
      net/wireless/scan.c

+ 2 - 0
net/wireless/scan.c

@@ -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) {