]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
rt2x00: Fix antenna diversity
authorIvo van Doorn <ivdoorn@gmail.com>
Mon, 25 Feb 2008 22:15:01 +0000 (23:15 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 28 Feb 2008 14:13:09 +0000 (09:13 -0500)
commitb290d433618aa7122f6e6c4a62ddc79412a48d4d
tree2c24cf5ac226d7c15bca28e79ccd2c7139b7a03d
parent8bfb04756a698e38825656eab3bc339a321551b3
rt2x00: Fix antenna diversity

Fix 2 issues in antenna diversity selection.

1) the following statement will always return true.
if ((rssi_curr - rssi_old) > -5 || (rssi_curr - rssi_old) < 5)
It is cleaner to check if the absolute value is smaller then 5.

2) Only enable software diversity when default antenna setup
indicates support for it. Don't select it when the hardware
does not indicate support for it...

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rt2x00/rt2x00dev.c