On Tue, Jan 05, 2010 at 10:29:30AM +0100, Johannes Berg wrote: > On Tue, 2009-12-29 at 12:59 +0200, Jouni Malinen wrote: > > + if (basic_rates & (1 << *idx)) > > + return; /* selected rate is a basic rate */ > > + > > + for (i = *idx + 1; i <= max_rate_idx; i++) { > > Starting at *idx+1 only works because it's always 0 or something? i = *idx case is covered above and this loop is just run if the selected rate was not a basic rate. And yes, we only pick the lowest rate currently. > Wouldn't you want to go down from max_rate and find the highest basic > rate or so? That would change behavior in potentially harmful ways, i.e., we could end up picking up too high a rate and some of the associated STAs might not be close enough to receive the frames. This is really something that requires much more care and should be done by the rate control algorithm itself (e.g., check that all associated STAs are currently using a rate higher than whatever we could pick for multicast/broadcast). The goal of this new code is to just enforce the must-use-basic-rate policy for multicast/broadcast frames. Picking the lowest available options sounds like the safest bet here. > Other than that seems fine to me, except I'm not sure I like the > "txrc.ap" thing much, but it's probably a reasonable choice to make at > this point (but consider mesh, IBSS?) Cannot really say that I would like it much either, but I did not even want to think about IBSS rules for basic rates, never mind mesh ;-). This can obviously be changed in the future once it is clear that we are configuring the basic_rates value properly for other modes. -- Jouni Malinen PGP id EFC895FA -- 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