Search Linux Wireless

Re: [PATCH for 2.6.28] mac80211: fix basic rates

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

 



On Thu, 2008-10-30 at 16:51 +0200, Tomas Winkler wrote:

> Oh, I now I got it out of index. What about coding it in more readable way?
> 
> 
> for (i = 0; i < elems.supp_rates_len; i++) {
>                 int rate = (elems.supp_rates[i] & 0x7f) * 5;
>                 bool is_basic = !!(elems.supp_rates[i] & 0x80);
> 
>                 if (rate > 110)
>                         have_higher_than_11mbit = true;
> 
>                 for (j = 0; j < sband->n_bitrates; j++) {
>                         if (sband->bitrates[j].bitrate == rate) {
>                                 rates |= BIT(j);
>                                 if (is_basic)
>                                         basic_rates |= BIT(j);
>                                 break;

yeah, that works too, and the break is probably a good idea, want to
send a patch to supersede this one?

johannes

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux