Search Linux Wireless

Re: [PATCH v5 1/3] mac80211: improve the rate control API

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

 



On Mon, 2013-04-22 at 12:09 +0200, Felix Fietkau wrote:

> @@ -692,16 +692,38 @@ ieee80211_tx_h_rate_ctrl(struct ieee80211_tx_data *tx)
>  	 */
>  	rate_control_get_rate(tx->sdata, tx->sta, &txrc);
>  
> -	if (unlikely(info->control.rates[0].idx < 0))
> -		return TX_DROP;
> +	if (tx->sta && !info->control.skip_table)
> +		ratetbl = rcu_dereference(tx->sta->sta.rates);
> +
> +	if (unlikely(info->control.rates[0].idx < 0)) {
> +		if (ratetbl) {
> +			struct ieee80211_tx_rate rate = {
> +				.idx = ratetbl->rate[0].idx,
> +				.flags = ratetbl->rate[0].flags,
> +				.count = ratetbl->rate[0].count
> +			};
> +
> +			if (ratetbl->rate[0].idx < 0)
> +				return TX_DROP;

This can't happen, idx is unsigned. Did you intend idx to be signed?

johannes

--
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




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux