On Mon, 10 Dec 2007 00:21:58 +0100 Stefano Brivio <stefano.brivio@xxxxxxxxx> wrote: > > > + /* If we just switched rate, update the rate behaviour info. */ > > > + if (pinfo->oldrate != sta->txrate) { > > > + for (i = 0; i < mode->num_rates; i++) > > > + if (rinfo[i].index == pinfo->oldrate) > > > + break; > > > + for (j = 0; j < mode->num_rates; j++) > > > + if (rinfo[j].index == sta->txrate) { > > > + rinfo[j].valid = 1; > > > + break; > > > + } > > > > This is no 3 and 4 of the call sites to the to be written > > find_index_for_rate() function ;-) > > > > Or what about this idea: Store direct indices into the rinfo table, so > > you needn't convert them back from the mode->rates indexing everywhere. > > This makes sense. Unless you are working to the find_index_for_rate() > function, which would make more sense. Eek, sorry, bullshit. I didn't get your point here, I do now. Will write that function. -- Ciao Stefano - 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