Subject: Re: [PATCH][RFC] softmac: suggest TX rate

From: Johannes Berg <[email-masked]>
Date: Mon, 17 Apr 2006 11:16:25 +0200

On Mon, 2006-04-17 at 01:28 +0100, Daniel Drake wrote:

> Rather than having to explicitly call ieee80211softmac_suggest_tx_rate() 
> from the driver's hard_start_xmit function, it would be nicer if the 
> suggested rate was passed as a parameter. But not all drivers would need 
> it, so maybe the extra calculations should be controlled by a new flag.

Couldn't we just initialise the softmac txrates substructure to
something useful when associating, and have drivers look into that
instead?

> +	case IEEE80211_FTYPE_DATA:
> +		if (unlikely(!mac->associated)) {
> +			dprintkl(KERN_ERROR PFX "suggest_tx_rate: Not associated\n");
> +			return IEEE80211_CCK_RATE_1MB;
> +		}
> +		return suggest_rate_from_associnfo(mac);

This isn't correct. Here, you have to take into account multicast frames
because those require clamping the rate to the highest rate from the
basic rateset.

I'll try to come up with an alternative.

johannes