kfree(bss);
}
+static inline void bss_ref_get(struct cfg80211_internal_bss *bss)
+{
+ kref_get(&bss->ref);
+}
+
+static inline void bss_ref_put(struct cfg80211_internal_bss *bss)
+{
+ kref_put(&bss->ref, bss_release);
+}
+
static void __cfg80211_unlink_bss(struct cfg80211_registered_device *dev,
struct cfg80211_internal_bss *bss)
{
list_del_init(&bss->list);
rb_erase(&bss->rbn, &dev->bss_tree);
- kref_put(&bss->ref, bss_release);
+ bss_ref_put(bss);
}
static void __cfg80211_bss_expire(struct cfg80211_registered_device *dev,
continue;
if (is_bss(&bss->pub, bssid, ssid, ssid_len)) {
res = bss;
- kref_get(&res->ref);
+ bss_ref_get(res);
break;
}
}
dev->bss_generation++;
spin_unlock_bh(&dev->bss_lock);
- kref_get(&found->ref);
+ bss_ref_get(found);
return found;
}
return;
bss = container_of(pub, struct cfg80211_internal_bss, pub);
- kref_get(&bss->ref);
+ bss_ref_get(bss);
}
EXPORT_SYMBOL(cfg80211_ref_bss);
return;
bss = container_of(pub, struct cfg80211_internal_bss, pub);
- kref_put(&bss->ref, bss_release);
+ bss_ref_put(bss);
}
EXPORT_SYMBOL(cfg80211_put_bss);