]> git.baikalelectronics.ru Git - kernel.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)
commit54dd210cf45e4e58a38c4e8ef93ac82f8e8959ed
tree2c24cf5ac226d7c15bca28e79ccd2c7139b7a03d
parentd4aabb6ef841de7124dbaa24bb1537a653c107aa
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