Search Linux Wireless

Re: [PATCH 05/10] wl12xx: report invalid TX rate when returning non-TX-ed skbs

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

 



On Thu, Jan 27, 2011 at 12:33, Johannes Berg <johannes@xxxxxxxxxxxxxxxx> wrote:
> On Thu, 2011-01-27 at 11:51 +0200, Luciano Coelho wrote:
>> On Sun, 2011-01-16 at 06:42 +0100, Arik Nemtsov wrote:
>> > Report a TX rate idx of -1 when returning untransmitted skbs to mac80211
>> > using ieee80211_tx_status(). Otherwise mac80211 tries to use the
>> > returned (essentially garbage) status.
>> >
>> > Signed-off-by: Arik Nemtsov <arik@xxxxxxxxxx>
>> > ---
>>
>> Is this a documented way of doing it or it just happens to work?
>
> I think the more expected way would be to set the TX counts to 0?

Good catch. I'll set the rates[0].count = 0.

The original patch was to avoid this problematic line in ieee80211_tx_status:

		if ((local->hw.flags & IEEE80211_HW_HAS_RATE_CONTROL) &&
		    (rates_idx != -1))
			sta->last_tx_rate = info->status.rates[rates_idx];

If rates[0].idx is invalid this will be a bad deref.

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