aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2013-01-30 02:50:37 -0500
committerJohannes Berg <johannes.berg@intel.com>2013-02-04 12:57:42 -0500
commit37e0838117084eb957fdf124bf555f4b9933a5a5 (patch)
tree080d87ef770024e818a8649131efd83183768b50 /net/wireless
parent3af6341c5378d1ed0905614575ee9ee2e5522c81 (diff)
cfg80211: remove unused cfg80211_get_mesh
As Thomas pointed out, cfg80211_get_mesh() is unused and can be removed. Cc: Thomas Pedersen <thomas@cozybit.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless')
-rw-r--r--net/wireless/scan.c65
1 files changed, 0 insertions, 65 deletions
diff --git a/net/wireless/scan.c b/net/wireless/scan.c
index 1435b97b1ca2..3772638714fa 100644
--- a/net/wireless/scan.c
+++ b/net/wireless/scan.c
@@ -311,43 +311,6 @@ static bool is_bss(struct cfg80211_bss *a, const u8 *bssid,
311 return memcmp(ssidie + 2, ssid, ssid_len) == 0; 311 return memcmp(ssidie + 2, ssid, ssid_len) == 0;
312} 312}
313 313
314static bool is_mesh(struct cfg80211_bss *a,
315 const u8 *meshid, size_t meshidlen,
316 const u8 *meshcfg)
317{
318 const struct cfg80211_bss_ies *ies;
319 const u8 *ie;
320
321 if (!WLAN_CAPABILITY_IS_STA_BSS(a->capability))
322 return false;
323
324 ies = rcu_access_pointer(a->ies);
325 if (!ies)
326 return false;
327
328 ie = cfg80211_find_ie(WLAN_EID_MESH_ID, ies->data, ies->len);
329 if (!ie)
330 return false;
331 if (ie[1] != meshidlen)
332 return false;
333 if (memcmp(ie + 2, meshid, meshidlen))
334 return false;
335
336 ie = cfg80211_find_ie(WLAN_EID_MESH_CONFIG, ies->data, ies->len);
337 if (!ie)
338 return false;
339 if (ie[1] != sizeof(struct ieee80211_meshconf_ie))
340 return false;
341
342 /*
343 * Ignore mesh capability (last two bytes of the IE) when
344 * comparing since that may differ between stations taking
345 * part in the same mesh.
346 */
347 return memcmp(ie + 2, meshcfg,
348 sizeof(struct ieee80211_meshconf_ie) - 2) == 0;
349}
350
351/** 314/**
352 * enum bss_compare_mode - BSS compare mode 315 * enum bss_compare_mode - BSS compare mode
353 * @BSS_CMP_REGULAR: regular compare mode (for insertion and normal find) 316 * @BSS_CMP_REGULAR: regular compare mode (for insertion and normal find)
@@ -503,34 +466,6 @@ struct cfg80211_bss *cfg80211_get_bss(struct wiphy *wiphy,
503} 466}
504EXPORT_SYMBOL(cfg80211_get_bss); 467EXPORT_SYMBOL(cfg80211_get_bss);
505 468
506struct cfg80211_bss *cfg80211_get_mesh(struct wiphy *wiphy,
507 struct ieee80211_channel *channel,
508 const u8 *meshid, size_t meshidlen,
509 const u8 *meshcfg)
510{
511 struct cfg80211_registered_device *dev = wiphy_to_dev(wiphy);
512 struct cfg80211_internal_bss *bss, *res = NULL;
513
514 spin_lock_bh(&dev->bss_lock);
515
516 list_for_each_entry(bss, &dev->bss_list, list) {
517 if (channel && bss->pub.channel != channel)
518 continue;
519 if (is_mesh(&bss->pub, meshid, meshidlen, meshcfg)) {
520 res = bss;
521 kref_get(&res->ref);
522 break;
523 }
524 }
525
526 spin_unlock_bh(&dev->bss_lock);
527 if (!res)
528 return NULL;
529 return &res->pub;
530}
531EXPORT_SYMBOL(cfg80211_get_mesh);
532
533
534static void rb_insert_bss(struct cfg80211_registered_device *dev, 469static void rb_insert_bss(struct cfg80211_registered_device *dev,
535 struct cfg80211_internal_bss *bss) 470 struct cfg80211_internal_bss *bss)
536{ 471{