Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 69a2bac8 authored by Gabor Juhos's avatar Gabor Juhos Committed by John W. Linville
Browse files

rt2x00: rt2x00pci: fix build error on Ralink RT3x5x SoCs



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>
parent 83589b30
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ if RT2X00
config RT2400PCI
	tristate "Ralink rt2400 (PCI/PCMCIA) support"
	depends on PCI
	select RT2X00_LIB_MMIO
	select RT2X00_LIB_PCI
	select EEPROM_93CX6
	---help---
@@ -31,6 +32,7 @@ config RT2400PCI
config RT2500PCI
	tristate "Ralink rt2500 (PCI/PCMCIA) support"
	depends on PCI
	select RT2X00_LIB_MMIO
	select RT2X00_LIB_PCI
	select EEPROM_93CX6
	---help---
@@ -43,6 +45,7 @@ config RT61PCI
	tristate "Ralink rt2501/rt61 (PCI/PCMCIA) support"
	depends on PCI
	select RT2X00_LIB_PCI
	select RT2X00_LIB_MMIO
	select RT2X00_LIB_FIRMWARE
	select RT2X00_LIB_CRYPTO
	select CRC_ITU_T
@@ -57,6 +60,7 @@ config RT2800PCI
	tristate "Ralink rt27xx/rt28xx/rt30xx (PCI/PCIe/PCMCIA) support"
	depends on PCI || SOC_RT288X || SOC_RT305X
	select RT2800_LIB
	select RT2X00_LIB_MMIO
	select RT2X00_LIB_PCI if PCI
	select RT2X00_LIB_SOC if SOC_RT288X || SOC_RT305X
	select RT2X00_LIB_FIRMWARE
@@ -185,6 +189,9 @@ endif
config RT2800_LIB
	tristate

config RT2X00_LIB_MMIO
	tristate

config RT2X00_LIB_PCI
	tristate
	select RT2X00_LIB
+1 −0
Original line number Diff line number Diff line
@@ -9,6 +9,7 @@ rt2x00lib-$(CONFIG_RT2X00_LIB_FIRMWARE) += rt2x00firmware.o
rt2x00lib-$(CONFIG_RT2X00_LIB_LEDS)	+= rt2x00leds.o

obj-$(CONFIG_RT2X00_LIB)		+= rt2x00lib.o
obj-$(CONFIG_RT2X00_LIB_MMIO)		+= rt2x00mmio.o
obj-$(CONFIG_RT2X00_LIB_PCI)		+= rt2x00pci.o
obj-$(CONFIG_RT2X00_LIB_SOC)		+= rt2x00soc.o
obj-$(CONFIG_RT2X00_LIB_USB)		+= rt2x00usb.o
+1 −0
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@
#include <linux/slab.h>

#include "rt2x00.h"
#include "rt2x00mmio.h"
#include "rt2x00pci.h"
#include "rt2400pci.h"

+1 −0
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@
#include <linux/slab.h>

#include "rt2x00.h"
#include "rt2x00mmio.h"
#include "rt2x00pci.h"
#include "rt2500pci.h"

+1 −0
Original line number Diff line number Diff line
@@ -41,6 +41,7 @@
#include <linux/eeprom_93cx6.h>

#include "rt2x00.h"
#include "rt2x00mmio.h"
#include "rt2x00pci.h"
#include "rt2x00soc.h"
#include "rt2800lib.h"
Loading