Shanyu Zhao a2c40249a3 mac80211: fix rts threshold check
Currently whenever rts thresold is set, every packet will use RTS
protection no matter its size exceeds the threshold or not. This is
due to a bug in the rts threshold check.
	if (len > tx->local->hw.wiphy->rts_threshold) {
		txrc.rts = rts = true;
	}
Basically it is comparing an int (len) and a u32 (rts_threshold),
and the variable len is assigned as:
	len = min_t(int, tx->skb->len + FCS_LEN,
			 tx->local->hw.wiphy->frag_threshold);
However, when frag_threshold is "-1", len is always "-1", which is
0xffffffff therefore rts is always set to true.

CC: stable@kernel.org
Signed-off-by: Shanyu Zhao <shanyu.zhao@intel.com>
Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-27 16:09:23 -04:00
..
2010-02-10 12:31:10 -08:00
2010-03-08 12:17:04 -08:00
2010-02-18 14:30:18 -08:00
2010-03-05 13:34:03 -08:00
2009-11-25 15:14:13 -08:00
2009-12-26 20:38:23 -08:00
2010-03-08 11:32:01 -08:00
2010-02-10 12:31:10 -08:00
2010-02-18 14:30:18 -08:00
2009-12-15 08:53:25 -08:00
2010-02-22 16:21:12 -08:00
2010-03-05 13:34:03 -08:00
2010-01-17 19:16:02 -08:00
2010-03-19 15:48:25 -04:00
2009-11-25 15:14:13 -08:00
2010-03-05 13:34:03 -08:00
2010-02-18 14:12:06 -08:00
2009-07-12 12:22:34 -07:00
2010-02-18 14:30:18 -08:00
2010-03-05 13:34:03 -08:00
2010-03-03 01:04:37 -08:00
2009-12-17 10:51:40 -05:00