On Wed, 2011-11-16 at 15:00 +0100, Dmitry Tarnyagin wrote: > More correct implementation of the same idea as in the > "cfg80211: merge in beacon ies of hidden bss" commit. > > The patch implements linked list of aliases for bss (alias is a bss > with the same key information but with different ESSID). I think you mean here not "different SSID", but "possibly hidden SSID"? Otherwise the code doesn't make much sense -- if the SSID is really incompatible it doesn't seem to get stuffed into the same node? > Ie update rules when new beacon/proberesp is coming: > - Beacon updates target bss and aliases with empty beacon ies list. > - Probe response ies updates only target bss structure. > - Beacon ies of incoming probe response are filled with > beacon ies taken from an alias. Wow, thanks. > +++ b/net/wireless/scan.c > @@ -191,6 +191,8 @@ static void __cfg80211_unlink_bss(struct > cfg80211_registered_device *dev, > struct cfg80211_internal_bss *bss) (rfc patch only but just FYI something caused line-wrapping here) > @@ -355,8 +357,8 @@ static bool is_mesh(struct cfg80211_bss *a, > sizeof(struct ieee80211_meshconf_ie) - 2) == 0; > } > > -static int cmp_bss_core(struct cfg80211_bss *a, > - struct cfg80211_bss *b) > +static int cmp_bss_noessid(struct cfg80211_bss *a, > + struct cfg80211_bss *b) can we call it "ssid", not "essid" please? :) > +static void > +cfg80211_bss_update_list(struct cfg80211_registered_device *dev, > + struct cfg80211_internal_bss *prev, > + struct cfg80211_internal_bss *res, > + int force) > +{ > + struct cfg80211_internal_bss *bss; > + > + cfg80211_bss_update_bss(dev, prev, res, force); > + list_for_each_entry(bss, &prev->list_aliases, list_aliases) > + cfg80211_bss_update_bss(dev, bss, res, force); > +} > + > +static void > +cfg80211_bss_insert(struct cfg80211_registered_device *dev, > + struct cfg80211_internal_bss *alias, > + struct cfg80211_internal_bss *res) > +{ > + list_add_tail(&res->list, &dev->bss_list); > + if (alias) > + list_add_tail(&alias->list_aliases, &res->list_aliases); > + rb_insert_bss(dev, res); Hm the fact that sometimes list_aliases is the anchor and sometimes not is a bit confusing, but I think I understand it. Wasn't there a case where an existing BSS entry is replaced by a new one? johannes -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html