Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 134500
b: refs/heads/master
c: 79420f0
h: refs/heads/master
v: v3
  • Loading branch information
Johannes Berg authored and John W. Linville committed Feb 13, 2009
1 parent c1ef214 commit c19be4c
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 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: d491af19db3adcc1eb1653e60a427fb4df36f361
refs/heads/master: 79420f09e76e8e1dd1149d6ce9c20e06cbb5802a
12 changes: 11 additions & 1 deletion trunk/include/net/cfg80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,17 @@ cfg80211_inform_bss_frame(struct wiphy *wiphy,
struct cfg80211_bss *cfg80211_get_bss(struct wiphy *wiphy,
struct ieee80211_channel *channel,
const u8 *bssid,
const u8 *ssid, size_t ssid_len);
const u8 *ssid, size_t ssid_len,
u16 capa_mask, u16 capa_val);
static inline struct cfg80211_bss *
cfg80211_get_ibss(struct wiphy *wiphy,
struct ieee80211_channel *channel,
const u8 *ssid, size_t ssid_len)
{
return cfg80211_get_bss(wiphy, channel, NULL, ssid, ssid_len,
WLAN_CAPABILITY_IBSS, WLAN_CAPABILITY_IBSS);
}

struct cfg80211_bss *cfg80211_get_mesh(struct wiphy *wiphy,
struct ieee80211_channel *channel,
const u8 *meshid, size_t meshidlen,
Expand Down
10 changes: 8 additions & 2 deletions trunk/net/wireless/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,12 @@ static bool is_bss(struct cfg80211_bss *a,
{
const u8 *ssidie;

if (compare_ether_addr(a->bssid, bssid))
if (bssid && compare_ether_addr(a->bssid, bssid))
return false;

if (!ssid)
return true;

ssidie = find_ie(WLAN_EID_SSID,
a->information_elements,
a->len_information_elements);
Expand Down Expand Up @@ -199,14 +202,17 @@ static int cmp_bss(struct cfg80211_bss *a,
struct cfg80211_bss *cfg80211_get_bss(struct wiphy *wiphy,
struct ieee80211_channel *channel,
const u8 *bssid,
const u8 *ssid, size_t ssid_len)
const u8 *ssid, size_t ssid_len,
u16 capa_mask, u16 capa_val)
{
struct cfg80211_registered_device *dev = wiphy_to_dev(wiphy);
struct cfg80211_internal_bss *bss, *res = NULL;

spin_lock_bh(&dev->bss_lock);

list_for_each_entry(bss, &dev->bss_list, list) {
if ((bss->pub.capability & capa_mask) != capa_val)
continue;
if (channel && bss->pub.channel != channel)
continue;
if (is_bss(&bss->pub, bssid, ssid, ssid_len)) {
Expand Down

0 comments on commit c19be4c

Please sign in to comment.