diff options
author | Mateusz Kulikowski <mateusz.kulikowski@gmail.com> | 2015-07-14 22:04:13 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-07-14 22:43:30 -0700 |
commit | 1e16cb17d59c9aafe8cc3dfc912050b1c4dddca7 (patch) | |
tree | ddc447d900677deeee6eecff4f8d308e22ec489b /drivers/staging/rtl8192e | |
parent | 632751b5290a70c094bdcabf5f9266f7f0a8fadd (diff) |
staging: rtl8192e: Remove read|write_nic_io_(d)word|byte()
None of this functions was used.
Also remove PlatformIOCheckPageLegalAndGetRegMask() used by them.
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8192e')
-rw-r--r-- | drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 158 | ||||
-rw-r--r-- | drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 7 |
2 files changed, 0 insertions, 165 deletions
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c index 32bf4754f612..813435988db5 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c @@ -90,164 +90,6 @@ static struct pci_driver rtl8192_pci_driver = { /**************************************************************************** -----------------------------IO STUFF------------------------- *****************************************************************************/ -static bool PlatformIOCheckPageLegalAndGetRegMask(u32 u4bPage, u8 *pu1bPageMask) -{ - bool bReturn = false; - - *pu1bPageMask = 0xfe; - - switch (u4bPage) { - case 1: case 2: case 3: case 4: - case 8: case 9: case 10: case 12: case 13: - bReturn = true; - *pu1bPageMask = 0xf0; - break; - - default: - bReturn = false; - break; - } - - return bReturn; -} - -void write_nic_io_byte(struct net_device *dev, int x, u8 y) -{ - u32 u4bPage = x >> 8; - u8 u1PageMask = 0; - bool bIsLegalPage = false; - - if (u4bPage == 0) { - outb(y&0xff, dev->base_addr + x); - - } else { - bIsLegalPage = PlatformIOCheckPageLegalAndGetRegMask(u4bPage, - &u1PageMask); - if (bIsLegalPage) { - u8 u1bPsr = read_nic_io_byte(dev, PSR); - - write_nic_io_byte(dev, PSR, ((u1bPsr & u1PageMask) | - (u8)u4bPage)); - write_nic_io_byte(dev, (x & 0xff), y); - write_nic_io_byte(dev, PSR, (u1bPsr & u1PageMask)); - } - } -} - -void write_nic_io_word(struct net_device *dev, int x, u16 y) -{ - u32 u4bPage = x >> 8; - u8 u1PageMask = 0; - bool bIsLegalPage = false; - - if (u4bPage == 0) { - outw(y, dev->base_addr + x); - } else { - bIsLegalPage = PlatformIOCheckPageLegalAndGetRegMask(u4bPage, - &u1PageMask); - if (bIsLegalPage) { - u8 u1bPsr = read_nic_io_byte(dev, PSR); - - write_nic_io_byte(dev, PSR, ((u1bPsr & u1PageMask) | - (u8)u4bPage)); - write_nic_io_word(dev, (x & 0xff), y); - write_nic_io_byte(dev, PSR, (u1bPsr & u1PageMask)); - - } - } -} - -void write_nic_io_dword(struct net_device *dev, int x, u32 y) -{ - u32 u4bPage = x >> 8; - u8 u1PageMask = 0; - bool bIsLegalPage = false; - - if (u4bPage == 0) { - outl(y, dev->base_addr + x); - } else { - bIsLegalPage = PlatformIOCheckPageLegalAndGetRegMask(u4bPage, - &u1PageMask); - if (bIsLegalPage) { - u8 u1bPsr = read_nic_io_byte(dev, PSR); - - write_nic_io_byte(dev, PSR, ((u1bPsr & u1PageMask) | - (u8)u4bPage)); - write_nic_io_dword(dev, (x & 0xff), y); - write_nic_io_byte(dev, PSR, (u1bPsr & u1PageMask)); - } - } -} - -u8 read_nic_io_byte(struct net_device *dev, int x) -{ - u32 u4bPage = x >> 8; - u8 u1PageMask = 0; - bool bIsLegalPage = false; - u8 Data = 0; - - if (u4bPage == 0) - return 0xff&inb(dev->base_addr + x); - - bIsLegalPage = PlatformIOCheckPageLegalAndGetRegMask(u4bPage, - &u1PageMask); - if (bIsLegalPage) { - u8 u1bPsr = read_nic_io_byte(dev, PSR); - - write_nic_io_byte(dev, PSR, ((u1bPsr & u1PageMask) | - (u8)u4bPage)); - Data = read_nic_io_byte(dev, (x & 0xff)); - write_nic_io_byte(dev, PSR, (u1bPsr & u1PageMask)); - } - - return Data; -} - -u16 read_nic_io_word(struct net_device *dev, int x) -{ - u32 u4bPage = x >> 8; - u8 u1PageMask = 0; - bool bIsLegalPage = false; - u16 Data = 0; - - if (u4bPage == 0) - return inw(dev->base_addr + x); - bIsLegalPage = PlatformIOCheckPageLegalAndGetRegMask(u4bPage, - &u1PageMask); - if (bIsLegalPage) { - u8 u1bPsr = read_nic_io_byte(dev, PSR); - - write_nic_io_byte(dev, PSR, ((u1bPsr & u1PageMask) | - (u8)u4bPage)); - Data = read_nic_io_word(dev, (x & 0xff)); - write_nic_io_byte(dev, PSR, (u1bPsr & u1PageMask)); - } - - return Data; -} - -u32 read_nic_io_dword(struct net_device *dev, int x) -{ - u32 u4bPage = x >> 8; - u8 u1PageMask = 0; - bool bIsLegalPage = false; - u32 Data = 0; - - if (u4bPage == 0) - return inl(dev->base_addr + x); - bIsLegalPage = PlatformIOCheckPageLegalAndGetRegMask(u4bPage, - &u1PageMask); - if (bIsLegalPage) { - u8 u1bPsr = read_nic_io_byte(dev, PSR); - - write_nic_io_byte(dev, PSR, ((u1bPsr & u1PageMask) | - (u8)u4bPage)); - Data = read_nic_io_dword(dev, (x & 0xff)); - write_nic_io_byte(dev, PSR, (u1bPsr & u1PageMask)); - } - - return Data; -} u8 read_nic_byte(struct net_device *dev, int x) { diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h index 776d950655cb..cb7af04f4db1 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h @@ -581,13 +581,6 @@ extern const struct ethtool_ops rtl819x_ethtool_ops; void rtl8192_tx_cmd(struct net_device *dev, struct sk_buff *skb); short rtl8192_tx(struct net_device *dev, struct sk_buff *skb); -u8 read_nic_io_byte(struct net_device *dev, int x); -u32 read_nic_io_dword(struct net_device *dev, int x); -u16 read_nic_io_word(struct net_device *dev, int x); -void write_nic_io_byte(struct net_device *dev, int x, u8 y); -void write_nic_io_word(struct net_device *dev, int x, u16 y); -void write_nic_io_dword(struct net_device *dev, int x, u32 y); - u8 read_nic_byte(struct net_device *dev, int x); u32 read_nic_dword(struct net_device *dev, int x); u16 read_nic_word(struct net_device *dev, int x); |