From 84d6642e4d1609562abb421341c9a90c023247a1 Mon Sep 17 00:00:00 2001 From: Dominik Sliwa Date: Tue, 4 Jul 2017 11:53:51 +0200 Subject: backports:fix compilation with toradex kernels Signed-off-by: Dominik Sliwa --- drivers/net/wireless/ath/ath10k/mac.c | 8 +++++++- drivers/net/wireless/ath/ath6kl/usb.c | 2 ++ drivers/net/wireless/ath/ath9k/hif_usb.c | 2 ++ drivers/net/wireless/ath/carl9170/usb.c | 2 ++ 4 files changed, 13 insertions(+), 1 deletion(-) (limited to 'drivers/net/wireless/ath') diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index 2c7bfa0..c0efde1 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -7902,7 +7902,7 @@ struct ath10k_vif *ath10k_get_arvif(struct ath10k *ar, u32 vdev_id) #define WRD_METHOD "WRDD" #define WRDD_WIFI (0x07) - +#ifdef CONFIG_ACPI static u32 ath10k_mac_wrdd_get_mcc(struct ath10k *ar, union acpi_object *wrdd) { union acpi_object *mcc_pkg; @@ -7986,6 +7986,12 @@ static int ath10k_mac_get_wrdd_regulatory(struct ath10k *ar, u16 *rd) *rd |= COUNTRY_ERD_FLAG; return 0; } +#else +static int ath10k_mac_get_wrdd_regulatory(struct ath10k *ar, u16 *rd) +{ + return -EOPNOTSUPP; +} +#endif static int ath10k_mac_init_rd(struct ath10k *ar) { diff --git a/drivers/net/wireless/ath/ath6kl/usb.c b/drivers/net/wireless/ath/ath6kl/usb.c index 9da3594..b164d00 100644 --- a/drivers/net/wireless/ath/ath6kl/usb.c +++ b/drivers/net/wireless/ath/ath6kl/usb.c @@ -1217,7 +1217,9 @@ static struct usb_driver ath6kl_usb_driver = { .disconnect = ath6kl_usb_remove, .id_table = ath6kl_usb_ids, .supports_autosuspend = true, +#if LINUX_VERSION_IS_GEQ(3,5,0) .disable_hub_initiated_lpm = 1, +#endif }; module_usb_driver(ath6kl_usb_driver); diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c index f6922e9..2f05cf5 100644 --- a/drivers/net/wireless/ath/ath9k/hif_usb.c +++ b/drivers/net/wireless/ath/ath9k/hif_usb.c @@ -1428,7 +1428,9 @@ static struct usb_driver ath9k_hif_usb_driver = { #endif .id_table = ath9k_hif_usb_ids, .soft_unbind = 1, +#if LINUX_VERSION_IS_GEQ(3,5,0) .disable_hub_initiated_lpm = 1, +#endif }; int ath9k_hif_usb_init(void) diff --git a/drivers/net/wireless/ath/carl9170/usb.c b/drivers/net/wireless/ath/carl9170/usb.c index 99ab203..b3bb548 100644 --- a/drivers/net/wireless/ath/carl9170/usb.c +++ b/drivers/net/wireless/ath/carl9170/usb.c @@ -1194,7 +1194,9 @@ static struct usb_driver carl9170_driver = { .resume = carl9170_usb_resume, .reset_resume = carl9170_usb_resume, #endif /* CONFIG_PM */ +#if LINUX_VERSION_IS_GEQ(3,5,0) .disable_hub_initiated_lpm = 1, +#endif }; module_usb_driver(carl9170_driver); -- cgit v1.2.3