Search Linux Wireless

Re: [[PATCH v2 3/4] mac80211: Modify sta_get_rates to give basic rates

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

 



On Mon, 2012-04-02 at 12:37 +0200, Johannes Berg wrote:
> On Sat, 2012-03-31 at 13:32 -0700, Ashok Nagarajan wrote:
> 
> > @@ -1127,15 +1127,25 @@ u32 ieee80211_sta_get_rates(struct ieee80211_local *local,
> >  		     elems->ext_supp_rates_len; i++) {
> >  		u8 rate = 0;
> >  		int own_rate;
> > +		bool is_basic;
> >  		if (i < elems->supp_rates_len)
> >  			rate = elems->supp_rates[i];
> >  		else if (elems->ext_supp_rates)
> >  			rate = elems->ext_supp_rates
> >  				[i - elems->supp_rates_len];
> >  		own_rate = 5 * (rate & 0x7f);
> > -		for (j = 0; j < num_rates; j++)
> > -			if (bitrates[j].bitrate == own_rate)
> > +		is_basic = !!(rate & 0x80);
> > +
> > +		if (is_basic && (rate & 0x7f) == BSS_MEMBERSHIP_SELECTOR_HT_PHY)
> > +			continue;
> > +
> > +		for (j = 0; j < num_rates; j++) {
> > +			if (bitrates[j].bitrate == own_rate) {
> >  				supp_rates |= BIT(j);
> > +				if (basic_rates && is_basic)
> > +					*basic_rates |= BIT(j);
> > +			}
> > +		}
> 
> Seems it'd be worth skipping the entire logic if basic_rates is NULL?

Oh, never mind, got confused.

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


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

  Powered by Linux