On Tue, 2007-12-18 at 14:17 +0100, Johannes Berg wrote: > > > > + /* If a forced rate is in effect, select it. */ > > > > + sdata = IEEE80211_DEV_TO_SUB_IF(dev); > > > > + if (sdata->bss && sdata->bss->force_unicast_rateidx > -1) > > > > + sel->rate = &mode->rates[sdata->bss->force_unicast_rateidx]; > > > > + > > > > + /* If we haven't found the rate yet, ask the rate control algo. */ > > > > + if (!sel->rate) > > > > + ref->ops->get_rate(ref->priv, dev, mode, skb, sel); > > > > > > Maybe after this we should insert > > > > > > if (unlikely(!sel->rate)) { > > > WARN_ON(1); > > > sel->rate = rate_lowest(...); > > > } > > > > > > Not sure though. > > > > I don't think we need this. Rate control is supposed to select a rate, > > if it doesn't know it can assign a fallback rate itself. > > Obviously. I just thought we could protect against buggy rate control > algorithm code that way. Not really necessary though. If it's buggy, it should be fixed. So it's actually better to fail dramatically ;-) Mattias - 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