rt2x00: rt2800lib: optimize frequency offset adjustment
authorGabor Juhos <juhosg@openwrt.org>
Sat, 17 Aug 2013 12:09:29 +0000 (14:09 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 22 Aug 2013 18:30:27 +0000 (14:30 -0400)
commit6af1bdccabe956a08a37f2ae049d37307ec0c91c
tree245a8688b70e5ef703a802ec82abd06d278bcf29
parentc1fada4e5e53d88a8edd3ff01cee9d316cbf6025
rt2x00: rt2800lib: optimize frequency offset adjustment

Don't write the new value into the register if it is
the same as the old value to avoid unncessary USB bus
traffic with USB devices. The change also saves a few
cycle on MMIO based devices.

Based on the DPO_RT5572_LinuxSTA_2.6.0.1_20120629
driver.

Reference:
  RTMPAdjustFrequencyOffset function in common/rt_rf.c

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rt2x00/rt2800lib.c