Search Linux Wireless

Re: [PATCH v4 5/6] mac80211: use ieee802_11_parse_elems() to find ies instead of ieee80211_bss_get_ie()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux