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