On Thu, Oct 20, 2011 at 4:13 AM, Johannes Berg <johannes@xxxxxxxxxxxxxxxx> wrote: > >> - baselen = (u8 *) mgmt->u.probe_resp.variable - (u8 *) mgmt; >> + switch (stype) { >> + case IEEE80211_STYPE_PROBE_RESP: >> + ies = (u8 *) mgmt->u.probe_resp.variable; >> + break; >> + case IEEE80211_STYPE_BEACON: >> + ies = (u8 *) mgmt->u.beacon.variable; >> + break; >> + default: >> + return; >> + } >> + > > Does that really make sense? the offset is the same anyway and we don't > get here with other frames. I don't think so: struct { __le64 timestamp; __le16 beacon_int; __le16 capab_info; /* followed by some of SSID, Supported rates, * FH Params, DS Params, CF Params, IBSS Params, TIM */ u8 variable[0]; } __attribute__ ((packed)) beacon; struct { /* only variable items: SSID, Supported rates */ u8 variable[0]; } __attribute__ ((packed)) probe_req; True, we don't currently get probe responses in a mesh, but the function _is_ named "_rx_bcn_presp" so we should be ready to handle these in the future. Previously we always getting the wrong offset. Thomas -- 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