On Fri, 2021-09-24 at 12:13 +0200, Johannes Berg wrote: > Taking a brief look before lunch, > > > if (!(ifmgd->flags & IEEE80211_STA_DISABLE_HT) && !is_6ghz) { > > const u8 *ht_oper_ie, *ht_cap_ie; > > > > > > > > > > - ht_oper_ie = ieee80211_bss_get_ie(cbss, WLAN_EID_HT_OPERATION); > > + ht_oper_ie = elems->ht_operation ? > > + ((const u8 *)elems->ht_operation) - 2 : > > + NULL; > > if (ht_oper_ie && ht_oper_ie[1] >= sizeof(*ht_oper)) > > ht_oper = (void *)(ht_oper_ie + 2); > > Can't we drop these checks, and simply do > > ht_oper = elems->ht_operation? I checked, yes, we can do that. Since I just did it anyway, no need to resend. johannes