Search Linux Wireless

[RFC] rtlwifi: Fix build failures due to raw port access

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When rtlwifi is built for the sh4 architecture, build errors of the following
type occur. As these raw port accesses are specific to the X86 architecture,
their usage is restricted and dummy routines are substituted for all other
platforms.

    v3.0/sh4/sh-allmodconfig v3.0/sh4/sh-allyesconfig
src/drivers/net/wireless/rtlwifi/rtl8192c/../pci.h:290: error: implicit declaration of function 'outl': 4 errors in 2 logs
    v3.0/sh4/sh-allmodconfig v3.0/sh4/sh-allyesconfig
src/drivers/net/wireless/rtlwifi/rtl8192c/../pci.h:295: error: implicit declaration of function 'outb': 4 errors in 2 logs
    v3.0/sh4/sh-allmodconfig v3.0/sh4/sh-allyesconfig
src/drivers/net/wireless/rtlwifi/rtl8192c/../pci.h:300: error: implicit declaration of function 'inb': 4 errors in 2 logs
    v3.0/sh4/sh-allmodconfig v3.0/sh4/sh-allyesconfig
src/drivers/net/wireless/rtlwifi/rtl8192c/../pci.h:305: error: implicit declaration of function 'inw': 4 errors in 2 logs

Signed-off-by: Larry Finger <Larry.Finger@xxxxxxxxxxxx>
---

Index: wireless-testing-new/drivers/net/wireless/rtlwifi/pci.h
===================================================================
--- wireless-testing-new.orig/drivers/net/wireless/rtlwifi/pci.h
+++ wireless-testing-new/drivers/net/wireless/rtlwifi/pci.h
@@ -273,6 +273,7 @@ static inline void pci_write32_async(str
 	writel(val, (u8 __iomem *) rtlpriv->io.pci_mem_start + addr);
 }
 
+#ifdef CONFIG_X86
 static inline void rtl_pci_raw_write_port_ulong(u32 port, u32 val)
 {
 	outl(val, port);
@@ -288,14 +289,29 @@ static inline void rtl_pci_raw_read_port
 	*pval = inb(port);
 }
 
-static inline void rtl_pci_raw_read_port_ushort(u32 port, u16 *pval)
+static inline void rtl_pci_raw_read_port_ulong(u32 port, u32 *pval)
+{
+	*pval = inl(port);
+}
+#else
+/* define dummy routines if not X86 architecture */
+static inline void rtl_pci_raw_write_port_ulong(u32 port, u32 val)
+{
+}
+
+static inline void rtl_pci_raw_write_port_uchar(u32 port, u8 val)
 {
-	*pval = inw(port);
+}
+
+static inline void rtl_pci_raw_read_port_uchar(u32 port, u8 *pval)
+{
+	*pval = 0;
 }
 
 static inline void rtl_pci_raw_read_port_ulong(u32 port, u32 *pval)
 {
-	*pval = inl(port);
+	*pval = 0;
 }
+#endif /* ifdef CONFIG_X86 */
 
 #endif
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux