]> git.openfabrics.org - ~emulex/infiniband.git/commit
rtl8180: don't use weird trick to access "far" registers
authorAndrea Merello <andrea.merello@gmail.com>
Fri, 28 Mar 2014 17:14:28 +0000 (18:14 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 31 Mar 2014 17:47:41 +0000 (13:47 -0400)
commit6cea5f2173440d324b0172373a95408323f28911
treee8f8e89facb8d0138862c10541420aa6a28810d5
parent3f3aa2fb48bd637002c5742c6d1cd4dfa931b771
rtl8180: don't use weird trick to access "far" registers

In rtl8180/rtl8185/rtl8187se the register space is represented
using packed structure type. Register are thus accessed using a
pointer of this type.
All registers are packed toghether, and only small gaps are present.

However Rtl8187se has also some "sparse" registers, very far from
the "main register block".

It could be possible to access them by simply declare huge reserved
blocks inside the register struct (and this causes NO memory waste).
However, for various reasons, access to those "far" registers is
done with special dedicated macros, without declaring them in the
register struct.

This is done in an intricate manner, that makes code less readable
and caused static analisys tool to produce warnings.

This patch keeps the "macro" mechanism, but it changes its
implementation in a simplier and more straightforward way.

Signed-off-by: Andrea Merello <andrea.merello@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rtl818x/rtl818x.h