Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 134499
b: refs/heads/master
c: d491af1
h: refs/heads/master
i:
  134497: 12b4234
  134495: 6a1265b
v: v3
  • Loading branch information
Johannes Berg authored and John W. Linville committed Feb 13, 2009
1 parent 0bb0d2a commit c1ef214
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 78c1c7e109f1f14e7c18f290c4ebc58da220c7ba
refs/heads/master: d491af19db3adcc1eb1653e60a427fb4df36f361
11 changes: 11 additions & 0 deletions trunk/include/net/cfg80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -791,5 +791,16 @@ struct cfg80211_bss *cfg80211_get_mesh(struct wiphy *wiphy,
const u8 *meshid, size_t meshidlen,
const u8 *meshcfg);
void cfg80211_put_bss(struct cfg80211_bss *bss);
/**
* cfg80211_unlink_bss - unlink BSS from internal data structures
* @wiphy: the wiphy
* @bss: the bss to remove
*
* This function removes the given BSS from the internal data structures
* thereby making it no longer show up in scan results etc. Use this
* function when you detect a BSS is gone. Normally BSSes will also time
* out, so it is not necessary to use this function at all.
*/
void cfg80211_unlink_bss(struct wiphy *wiphy, struct cfg80211_bss *bss);

#endif /* __NET_CFG80211_H */
21 changes: 21 additions & 0 deletions trunk/net/wireless/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,27 @@ void cfg80211_put_bss(struct cfg80211_bss *pub)
}
EXPORT_SYMBOL(cfg80211_put_bss);

void cfg80211_unlink_bss(struct wiphy *wiphy, struct cfg80211_bss *pub)
{
struct cfg80211_registered_device *dev = wiphy_to_dev(wiphy);
struct cfg80211_internal_bss *bss;

if (WARN_ON(!pub))
return;

bss = container_of(pub, struct cfg80211_internal_bss, pub);

spin_lock_bh(&dev->bss_lock);

list_del(&bss->list);
rb_erase(&bss->rbn, &dev->bss_tree);

spin_unlock_bh(&dev->bss_lock);

kref_put(&bss->ref, bss_release);
}
EXPORT_SYMBOL(cfg80211_unlink_bss);

#ifdef CONFIG_WIRELESS_EXT
int cfg80211_wext_siwscan(struct net_device *dev,
struct iw_request_info *info,
Expand Down

0 comments on commit c1ef214

Please sign in to comment.