Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 290340
b: refs/heads/master
c: 4c0c0b7
h: refs/heads/master
v: v3
  • Loading branch information
Johannes Berg authored and John W. Linville committed Feb 6, 2012
1 parent 1cfa6d7 commit 851d1d8
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 95de817b9034d50860319f6033ec85d25024694c
refs/heads/master: 4c0c0b75e0c35ddb8f61c06bcbffede63ab4f4a2
14 changes: 14 additions & 0 deletions trunk/include/net/cfg80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -2719,6 +2719,20 @@ struct cfg80211_bss *cfg80211_get_mesh(struct wiphy *wiphy,
struct ieee80211_channel *channel,
const u8 *meshid, size_t meshidlen,
const u8 *meshcfg);
/**
* cfg80211_ref_bss - reference BSS struct
* @bss: the BSS struct to reference
*
* Increments the refcount of the given BSS struct.
*/
void cfg80211_ref_bss(struct cfg80211_bss *bss);

/**
* cfg80211_put_bss - unref BSS struct
* @bss: the BSS struct
*
* Decrements the refcount of the given BSS struct.
*/
void cfg80211_put_bss(struct cfg80211_bss *bss);

/**
Expand Down
5 changes: 0 additions & 5 deletions trunk/net/wireless/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,6 @@ static inline struct cfg80211_internal_bss *bss_from_pub(struct cfg80211_bss *pu
return container_of(pub, struct cfg80211_internal_bss, pub);
}

static inline void cfg80211_ref_bss(struct cfg80211_internal_bss *bss)
{
kref_get(&bss->ref);
}

static inline void cfg80211_hold_bss(struct cfg80211_internal_bss *bss)
{
atomic_inc(&bss->hold);
Expand Down
12 changes: 12 additions & 0 deletions trunk/net/wireless/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -861,6 +861,18 @@ cfg80211_inform_bss_frame(struct wiphy *wiphy,
}
EXPORT_SYMBOL(cfg80211_inform_bss_frame);

void cfg80211_ref_bss(struct cfg80211_bss *pub)
{
struct cfg80211_internal_bss *bss;

if (!pub)
return;

bss = container_of(pub, struct cfg80211_internal_bss, pub);
kref_get(&bss->ref);
}
EXPORT_SYMBOL(cfg80211_ref_bss);

void cfg80211_put_bss(struct cfg80211_bss *pub)
{
struct cfg80211_internal_bss *bss;
Expand Down

0 comments on commit 851d1d8

Please sign in to comment.