On Thu, Jul 30, 2009 at 12:57 AM, Johannes Berg<johannes@xxxxxxxxxxxxxxxx> wrote: > On Wed, 2009-07-29 at 18:01 -0700, Luis R. Rodriguez wrote: >> Since the bss is always set now once we are connected, if the >> bss has its own information element we refer to it and pass that >> instead of relying on mac80211's parsing. >> >> Now all cfg80211 drivers get country IE support, automatically. >> >> Signed-off-by: Luis R. Rodriguez <lrodriguez@xxxxxxxxxxx> >> --- >> >> Johill, I think this is what you wanted in the end, I tested it and >> I get no country IE hint going through :( I could debug further but I'm >> done for now and gotta work on some other stuff, not sure when I can >> get back to this. > > Well, you've made a critical mistake: > > + regulatory_hint_11d(wdev->wiphy, > + bss->information_elements, > + bss->len_information_elements); > > needs to be > > const u8 *country_ie > > country_ie = ieee80211_bss_get_ie(&bss->pub, WLAN_EID_COUNTRY); > if (country_ie) > regulatory_hint_11d(wdev->wiphy, > country_ie + 2, > country_ie[1]); > > > It's rather likely that it doesn't come first, so whatever is in > information_elements first would end up not looking like a country IE or > having the right length, so the _11d function would just throw it out. Hah, thanks, will try it. Luis -- 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