diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2013-10-17 03:42:33 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-10-18 14:07:00 -0400 |
commit | 0b0ee990f402b357422cc7c5cc12915490610e3e (patch) | |
tree | 611850d76ee0615f27dd203e66afee8c30cff674 /drivers/net/wireless | |
parent | 3ccdcd515d651943658e812eb8f8ff2a5b5113fc (diff) |
rt2x00: rt2800pci: use separate hwcrypt_disabled callback for SoC devices
The 'rt2800pci_hwcrypt_disabled' function is the
only PCI specific callback which is used by the
SoC driver. Create a clone of that to get rid of
the dependency.
Even though the two functions are using the same
variable, but the SoC specific code will be moved
into a separate module which will have its own
'modparam_nohwcrypt' variable.
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2800pci.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2800pci.c b/drivers/net/wireless/rt2x00/rt2800pci.c index 77ddd1a97732..488d1c449349 100644 --- a/drivers/net/wireless/rt2x00/rt2800pci.c +++ b/drivers/net/wireless/rt2x00/rt2800pci.c | |||
@@ -56,12 +56,12 @@ static bool modparam_nohwcrypt = false; | |||
56 | module_param_named(nohwcrypt, modparam_nohwcrypt, bool, S_IRUGO); | 56 | module_param_named(nohwcrypt, modparam_nohwcrypt, bool, S_IRUGO); |
57 | MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption."); | 57 | MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption."); |
58 | 58 | ||
59 | #ifdef CONFIG_PCI | ||
59 | static bool rt2800pci_hwcrypt_disabled(struct rt2x00_dev *rt2x00dev) | 60 | static bool rt2800pci_hwcrypt_disabled(struct rt2x00_dev *rt2x00dev) |
60 | { | 61 | { |
61 | return modparam_nohwcrypt; | 62 | return modparam_nohwcrypt; |
62 | } | 63 | } |
63 | 64 | ||
64 | #ifdef CONFIG_PCI | ||
65 | static void rt2800pci_mcu_status(struct rt2x00_dev *rt2x00dev, const u8 token) | 65 | static void rt2800pci_mcu_status(struct rt2x00_dev *rt2x00dev, const u8 token) |
66 | { | 66 | { |
67 | unsigned int i; | 67 | unsigned int i; |
@@ -462,6 +462,11 @@ MODULE_DEVICE_TABLE(pci, rt2800pci_device_table); | |||
462 | MODULE_LICENSE("GPL"); | 462 | MODULE_LICENSE("GPL"); |
463 | 463 | ||
464 | #if defined(CONFIG_SOC_RT288X) || defined(CONFIG_SOC_RT305X) | 464 | #if defined(CONFIG_SOC_RT288X) || defined(CONFIG_SOC_RT305X) |
465 | static bool rt2800soc_hwcrypt_disabled(struct rt2x00_dev *rt2x00dev) | ||
466 | { | ||
467 | return modparam_nohwcrypt; | ||
468 | } | ||
469 | |||
465 | static void rt2800soc_disable_radio(struct rt2x00_dev *rt2x00dev) | 470 | static void rt2800soc_disable_radio(struct rt2x00_dev *rt2x00dev) |
466 | { | 471 | { |
467 | rt2800_disable_radio(rt2x00dev); | 472 | rt2800_disable_radio(rt2x00dev); |
@@ -585,7 +590,7 @@ static const struct rt2800_ops rt2800soc_rt2800_ops = { | |||
585 | .register_multiwrite = rt2x00mmio_register_multiwrite, | 590 | .register_multiwrite = rt2x00mmio_register_multiwrite, |
586 | .regbusy_read = rt2x00mmio_regbusy_read, | 591 | .regbusy_read = rt2x00mmio_regbusy_read, |
587 | .read_eeprom = rt2800soc_read_eeprom, | 592 | .read_eeprom = rt2800soc_read_eeprom, |
588 | .hwcrypt_disabled = rt2800pci_hwcrypt_disabled, | 593 | .hwcrypt_disabled = rt2800soc_hwcrypt_disabled, |
589 | .drv_write_firmware = rt2800soc_write_firmware, | 594 | .drv_write_firmware = rt2800soc_write_firmware, |
590 | .drv_init_registers = rt2800mmio_init_registers, | 595 | .drv_init_registers = rt2800mmio_init_registers, |
591 | .drv_get_txwi = rt2800mmio_get_txwi, | 596 | .drv_get_txwi = rt2800mmio_get_txwi, |