• Gabor Juhos's avatar
    rt2x00: rt2x00pci: fix build error on Ralink RT3x5x SoCs · 69a2bac8
    Gabor Juhos authored
    The rt2800pci driver supports the built-in wireless
    MAC of the Ralink RT3x5x SoCs. However building the
    driver for these SoCs leads to the following error:
    
        LD      init/built-in.o
      drivers/built-in.o: In function `rt2800pci_rxdone_tasklet':
      <...>/drivers/net/wireless/rt2x00/rt2800pci.c:1012: undefined reference to `rt2x00pci_rxdone'
      drivers/built-in.o:(.rodata+0x4780): undefined reference to `rt2x00pci_initialize'
      drivers/built-in.o:(.rodata+0x4784): undefined reference to `rt2x00pci_uninitialize'
      drivers/built-in.o:(.rodata+0x47bc): undefined reference to `rt2x00pci_flush_queue'
      drivers/built-in.o:(.rodata+0x4818): undefined reference to `rt2x00pci_regbusy_read'
      make[5]: *** [vmlinux] Error 1
    
    The missing functions are provided by the rt2x00pci
    module. This module is only selected by the rt2800pci
    driver if PCI support is enabled in the kernel, because
    some parts of the rt2x00pci code depends on PCI support.
    
    PCI support is not available on the RT3x5x SoCs because
    those have no PCI host controller at all.
    
    Move the non PCI specific code from rt2x00pci into a
    separate module. This makes it possible to use that
    code even if PCI support is disabled. The affected
    functions are used by all of the rt2x00 PCI drivers
    so select the new module for those drivers.
    Signed-off-by: default avatarGabor Juhos <juhosg@openwrt.org>
    Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
    69a2bac8
rt2x00mmio.c 4.92 KB