Search Linux Wireless

Re: [PATCH 1/4] mac80211: Clean up rate selection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> +	/* Send management frames and broadcast/multicast data using lowest
> +	 * rate. */
> +	fc = le16_to_cpu(hdr->frame_control);
> +	if ((fc & IEEE80211_FCTL_FTYPE) != IEEE80211_FTYPE_DATA ||
> +	    (hdr->addr1[0] & 0x01))
> +		sel->rate = rate_lowest(local, mode, sta);

I'm not sure but I don't think we want this. And you should use
is_multicast_addr() or whatever it's called.

> +	/* 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];

That's good.

> +	/* 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);

> +	/* Select a non-ERP backup rate. */
> +	if (!sel->nonerp) {
> +		for (i = 0; i < mode->num_rates - 1; i++) {
> +			struct ieee80211_rate *rate = &mode->rates[i];
> +			if (sel->rate->rate < rate->rate)
> +				break;
> +
> +			if (rate_supported(sta, mode, i) &&
> +			    !(rate->flags & IEEE80211_RATE_ERP))
> +				sel->nonerp = rate;
> +		}
> +	}

That I'm not sure about. This is the fallback rate?

johannes

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux