More fall-out from the refactoring of iwlegacy...
Signed-off-by: John W. Linville <[email protected]>
---
patches/11-dev-pm-ops.patch | 180 +++++++++++++++++++++---------------------
1 files changed, 90 insertions(+), 90 deletions(-)
diff --git a/patches/11-dev-pm-ops.patch b/patches/11-dev-pm-ops.patch
index 294aaba..7166a28 100644
--- a/patches/11-dev-pm-ops.patch
+++ b/patches/11-dev-pm-ops.patch
@@ -9,7 +9,7 @@ calls on compat code with only slight modifications.
--- a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
+++ b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
-@@ -2897,6 +2897,9 @@ static struct pci_error_handlers atl1c_e
+@@ -2897,6 +2897,9 @@ static struct pci_error_handlers atl1c_err_handler = {
static SIMPLE_DEV_PM_OPS(atl1c_pm_ops, atl1c_suspend, atl1c_resume);
@@ -19,7 +19,7 @@ calls on compat code with only slight modifications.
static struct pci_driver atl1c_driver = {
.name = atl1c_driver_name,
.id_table = atl1c_pci_tbl,
-@@ -2904,7 +2907,12 @@ static struct pci_driver atl1c_driver =
+@@ -2904,7 +2907,12 @@ static struct pci_driver atl1c_driver = {
.remove = __devexit_p(atl1c_remove),
.shutdown = atl1c_shutdown,
.err_handler = &atl1c_err_handler,
@@ -34,7 +34,7 @@ calls on compat code with only slight modifications.
/*
--- a/drivers/net/ethernet/atheros/atlx/atl1.c
+++ b/drivers/net/ethernet/atheros/atlx/atl1.c
-@@ -2833,6 +2833,9 @@ static int atl1_resume(struct device *de
+@@ -2833,6 +2833,9 @@ static int atl1_resume(struct device *dev)
return 0;
}
@@ -59,7 +59,7 @@ calls on compat code with only slight modifications.
/*
--- a/drivers/net/wireless/ath/ath5k/pci.c
+++ b/drivers/net/wireless/ath/ath5k/pci.c
-@@ -323,6 +323,9 @@ static int ath5k_pci_resume(struct devic
+@@ -323,6 +323,9 @@ static int ath5k_pci_resume(struct device *dev)
return 0;
}
@@ -69,7 +69,7 @@ calls on compat code with only slight modifications.
static SIMPLE_DEV_PM_OPS(ath5k_pm_ops, ath5k_pci_suspend, ath5k_pci_resume);
#define ATH5K_PM_OPS (&ath5k_pm_ops)
#else
-@@ -334,7 +337,12 @@ static struct pci_driver ath5k_pci_drive
+@@ -334,7 +337,12 @@ static struct pci_driver ath5k_pci_driver = {
.id_table = ath5k_pci_id_table,
.probe = ath5k_pci_probe,
.remove = __devexit_p(ath5k_pci_remove),
@@ -84,7 +84,7 @@ calls on compat code with only slight modifications.
/*
--- a/drivers/net/wireless/ath/ath9k/pci.c
+++ b/drivers/net/wireless/ath/ath9k/pci.c
-@@ -353,14 +353,10 @@ static int ath_pci_resume(struct device
+@@ -353,14 +353,10 @@ static int ath_pci_resume(struct device *device)
return 0;
}
@@ -103,7 +103,7 @@ calls on compat code with only slight modifications.
#define ATH9K_PM_OPS (&ath9k_pm_ops)
-@@ -378,7 +374,12 @@ static struct pci_driver ath_pci_driver
+@@ -378,7 +374,12 @@ static struct pci_driver ath_pci_driver = {
.id_table = ath_pci_id_table,
.probe = ath_pci_probe,
.remove = ath_pci_remove,
@@ -116,110 +116,82 @@ calls on compat code with only slight modifications.
};
int ath_pci_init(void)
---- a/drivers/net/wireless/libertas/if_spi.c
-+++ b/drivers/net/wireless/libertas/if_spi.c
-@@ -1251,6 +1251,7 @@ static int __devexit libertas_spi_remove
- return 0;
- }
-
+--- a/drivers/net/wireless/iwlegacy/3945-mac.c
++++ b/drivers/net/wireless/iwlegacy/3945-mac.c
+@@ -3920,7 +3920,12 @@ static struct pci_driver il3945_driver = {
+ .id_table = il3945_hw_card_ids,
+ .probe = il3945_pci_probe,
+ .remove = __devexit_p(il3945_pci_remove),
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29))
- static int if_spi_suspend(struct device *dev)
- {
- struct spi_device *spi = to_spi_device(dev);
-@@ -1284,6 +1285,7 @@ static const struct dev_pm_ops if_spi_pm
- .suspend = if_spi_suspend,
- .resume = if_spi_resume,
- };
+ .driver.pm = IL_LEGACY_PM_OPS,
++#elif defined(CONFIG_PM)
++ .suspend = il_pci_suspend_compat,
++ .resume = il_pci_resume_compat,
+#endif
+ };
- static struct spi_driver libertas_spi_driver = {
- .probe = if_spi_probe,
-@@ -1292,7 +1294,9 @@ static struct spi_driver libertas_spi_dr
- .name = "libertas_spi",
- .bus = &spi_bus_type,
- .owner = THIS_MODULE,
+ static int __init
+--- a/drivers/net/wireless/iwlegacy/4965-mac.c
++++ b/drivers/net/wireless/iwlegacy/4965-mac.c
+@@ -6478,7 +6478,12 @@ static struct pci_driver il4965_driver = {
+ .id_table = il4965_hw_card_ids,
+ .probe = il4965_pci_probe,
+ .remove = __devexit_p(il4965_pci_remove),
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29))
- .pm = &if_spi_pm_ops,
+ .driver.pm = IL_LEGACY_PM_OPS,
++#elif defined(CONFIG_PM)
++ .suspend = il_pci_suspend_compat,
++ .resume = il_pci_resume_compat,
+#endif
- },
};
---- a/drivers/net/wireless/iwlegacy/iwl-core.c
-+++ b/drivers/net/wireless/iwlegacy/iwl-core.c
-@@ -2016,15 +2016,17 @@ int iwl_legacy_pci_resume(struct device
+ static int __init
+--- a/drivers/net/wireless/iwlegacy/common.c
++++ b/drivers/net/wireless/iwlegacy/common.c
+@@ -5079,15 +5079,17 @@ il_pci_resume(struct device *device)
}
- EXPORT_SYMBOL(iwl_legacy_pci_resume);
-
--const struct dev_pm_ops iwl_legacy_pm_ops = {
-- .suspend = iwl_legacy_pci_suspend,
-- .resume = iwl_legacy_pci_resume,
-- .freeze = iwl_legacy_pci_suspend,
-- .thaw = iwl_legacy_pci_resume,
-- .poweroff = iwl_legacy_pci_suspend,
-- .restore = iwl_legacy_pci_resume,
+ EXPORT_SYMBOL(il_pci_resume);
+
+-const struct dev_pm_ops il_pm_ops = {
+- .suspend = il_pci_suspend,
+- .resume = il_pci_resume,
+- .freeze = il_pci_suspend,
+- .thaw = il_pci_resume,
+- .poweroff = il_pci_suspend,
+- .restore = il_pci_resume,
-};
-+const SIMPLE_DEV_PM_OPS(iwl_legacy_pm_ops, iwl_legacy_pci_suspend, iwl_legacy_pci_resume);
++const SIMPLE_DEV_PM_OPS(il_pm_ops, il_pci_suspend, il_pci_resume);
+
-+compat_pci_suspend(iwl_legacy_pci_suspend)
-+compat_pci_resume(iwl_legacy_pci_resume)
++compat_pci_suspend(il_pci_suspend)
++compat_pci_resume(il_pci_resume)
+
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29))
- EXPORT_SYMBOL(iwl_legacy_pm_ops);
+ EXPORT_SYMBOL(il_pm_ops);
+#else
-+EXPORT_SYMBOL(iwl_legacy_pci_suspend_compat);
-+EXPORT_SYMBOL(iwl_legacy_pci_resume_compat);
++EXPORT_SYMBOL(il_pci_suspend_compat);
++EXPORT_SYMBOL(il_pci_resume_compat);
+#endif
#endif /* CONFIG_PM */
---- a/drivers/net/wireless/iwlegacy/iwl-core.h
-+++ b/drivers/net/wireless/iwlegacy/iwl-core.h
-@@ -499,7 +499,12 @@ __le32 iwl_legacy_add_beacon_time(struct
+--- a/drivers/net/wireless/iwlegacy/common.h
++++ b/drivers/net/wireless/iwlegacy/common.h
+@@ -2027,7 +2027,12 @@ __le32 il_add_beacon_time(struct il_priv *il, u32 base, u32 addon,
#ifdef CONFIG_PM
- int iwl_legacy_pci_suspend(struct device *device);
- int iwl_legacy_pci_resume(struct device *device);
+ int il_pci_suspend(struct device *device);
+ int il_pci_resume(struct device *device);
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29))
-+int iwl_legacy_pci_suspend_compat(struct pci_dev *pdev, pm_message_t state);
-+int iwl_legacy_pci_resume_compat(struct pci_dev *pdev);
++int il_pci_suspend_compat(struct pci_dev *pdev, pm_message_t state);
++int il_pci_resume_compat(struct pci_dev *pdev);
+#else
- extern const struct dev_pm_ops iwl_legacy_pm_ops;
+ extern const struct dev_pm_ops il_pm_ops;
+#endif
- #define IWL_LEGACY_PM_OPS (&iwl_legacy_pm_ops)
-
---- a/drivers/net/wireless/iwlegacy/iwl3945-base.c
-+++ b/drivers/net/wireless/iwlegacy/iwl3945-base.c
-@@ -3960,7 +3960,12 @@ static struct pci_driver iwl3945_driver
- .id_table = iwl3945_hw_card_ids,
- .probe = iwl3945_pci_probe,
- .remove = __devexit_p(iwl3945_pci_remove),
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29))
- .driver.pm = IWL_LEGACY_PM_OPS,
-+#elif defined(CONFIG_PM)
-+ .suspend = iwl_legacy_pci_suspend_compat,
-+ .resume = iwl_legacy_pci_resume_compat,
-+#endif
- };
-
- static int __init iwl3945_init(void)
---- a/drivers/net/wireless/iwlegacy/iwl4965-base.c
-+++ b/drivers/net/wireless/iwlegacy/iwl4965-base.c
-@@ -3225,7 +3225,12 @@ static struct pci_driver iwl4965_driver
- .id_table = iwl4965_hw_card_ids,
- .probe = iwl4965_pci_probe,
- .remove = __devexit_p(iwl4965_pci_remove),
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29))
- .driver.pm = IWL_LEGACY_PM_OPS,
-+#elif defined(CONFIG_PM)
-+ .suspend = iwl_legacy_pci_suspend_compat,
-+ .resume = iwl_legacy_pci_resume_compat,
-+#endif
- };
+ #define IL_LEGACY_PM_OPS (&il_pm_ops)
- static int __init iwl4965_init(void)
--- a/drivers/net/wireless/iwlwifi/iwl-pci.c
+++ b/drivers/net/wireless/iwlwifi/iwl-pci.c
-@@ -536,6 +536,9 @@ static int iwl_pci_resume(struct device
+@@ -520,6 +520,9 @@ static int iwl_pci_resume(struct device *device)
static SIMPLE_DEV_PM_OPS(iwl_dev_pm_ops, iwl_pci_suspend, iwl_pci_resume);
@@ -229,7 +201,7 @@ calls on compat code with only slight modifications.
#define IWL_PM_OPS (&iwl_dev_pm_ops)
#else
-@@ -549,7 +552,12 @@ static struct pci_driver iwl_pci_driver
+@@ -533,7 +536,12 @@ static struct pci_driver iwl_pci_driver = {
.id_table = iwl_hw_card_ids,
.probe = iwl_pci_probe,
.remove = __devexit_p(iwl_pci_remove),
@@ -242,9 +214,37 @@ calls on compat code with only slight modifications.
};
int __must_check iwl_pci_register_driver(void)
+--- a/drivers/net/wireless/libertas/if_spi.c
++++ b/drivers/net/wireless/libertas/if_spi.c
+@@ -1252,6 +1252,7 @@ static int __devexit libertas_spi_remove(struct spi_device *spi)
+ return 0;
+ }
+
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29))
+ static int if_spi_suspend(struct device *dev)
+ {
+ struct spi_device *spi = to_spi_device(dev);
+@@ -1285,6 +1286,7 @@ static const struct dev_pm_ops if_spi_pm_ops = {
+ .suspend = if_spi_suspend,
+ .resume = if_spi_resume,
+ };
++#endif
+
+ static struct spi_driver libertas_spi_driver = {
+ .probe = if_spi_probe,
+@@ -1292,7 +1294,9 @@ static struct spi_driver libertas_spi_driver = {
+ .driver = {
+ .name = "libertas_spi",
+ .owner = THIS_MODULE,
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29))
+ .pm = &if_spi_pm_ops,
++#endif
+ },
+ };
+
--- a/drivers/net/wireless/rtlwifi/rtl8192ce/sw.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192ce/sw.c
-@@ -381,21 +381,22 @@ MODULE_PARM_DESC(swlps, "Set to 1 to use
+@@ -381,21 +381,22 @@ MODULE_PARM_DESC(swlps, "Set to 1 to use SW control power save (default 0)\n");
MODULE_PARM_DESC(fwlps, "Set to 1 to use FW control power save (default 1)\n");
MODULE_PARM_DESC(debug, "Set debug level (0-5) (default 0)");
@@ -277,7 +277,7 @@ calls on compat code with only slight modifications.
static int __init rtl92ce_module_init(void)
--- a/drivers/net/wireless/rtlwifi/rtl8192de/sw.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192de/sw.c
-@@ -391,21 +391,22 @@ MODULE_PARM_DESC(swlps, "Set to 1 to use
+@@ -391,21 +391,22 @@ MODULE_PARM_DESC(swlps, "Set to 1 to use SW control power save (default 0)\n");
MODULE_PARM_DESC(fwlps, "Set to 1 to use FW control power save (default 1)\n");
MODULE_PARM_DESC(debug, "Set debug level (0-5) (default 0)");
@@ -310,7 +310,7 @@ calls on compat code with only slight modifications.
/* add global spin lock to solve the problem that
--- a/drivers/net/wireless/rtlwifi/rtl8192se/sw.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192se/sw.c
-@@ -403,21 +403,22 @@ MODULE_PARM_DESC(swlps, "Set to 1 to use
+@@ -403,21 +403,22 @@ MODULE_PARM_DESC(swlps, "Set to 1 to use SW control power save (default 0)\n");
MODULE_PARM_DESC(fwlps, "Set to 1 to use FW control power save (default 1)\n");
MODULE_PARM_DESC(debug, "Set debug level (0-5) (default 0)");
--
1.7.4.4
More fall-out from the refactoring of iwlegacy...
Signed-off-by: John W. Linville <[email protected]>
---
patches/38-led-max-brightness.patch | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/patches/38-led-max-brightness.patch b/patches/38-led-max-brightness.patch
index 64ecc9c..c34d979 100644
--- a/patches/38-led-max-brightness.patch
+++ b/patches/38-led-max-brightness.patch
@@ -1,18 +1,18 @@
---- a/drivers/net/wireless/iwlegacy/iwl-led.c
-+++ b/drivers/net/wireless/iwlegacy/iwl-led.c
-@@ -166,7 +166,9 @@ void iwl_legacy_leds_init(struct iwl_pri
- wiphy_name(priv->hw->wiphy));
- priv->led.brightness_set = iwl_legacy_led_brightness_set;
- priv->led.blink_set = iwl_legacy_led_blink_set;
+--- a/drivers/net/wireless/iwlegacy/common.c
++++ b/drivers/net/wireless/iwlegacy/common.c
+@@ -402,7 +402,9 @@ il_leds_init(struct il_priv *il)
+ kasprintf(GFP_KERNEL, "%s-led", wiphy_name(il->hw->wiphy));
+ il->led.brightness_set = il_led_brightness_set;
+ il->led.blink_set = il_led_blink_set;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,30)
- priv->led.max_brightness = 1;
+ il->led.max_brightness = 1;
+#endif
switch (mode) {
- case IWL_LED_DEFAULT:
+ case IL_LED_DEFAULT:
--- a/drivers/net/wireless/iwlwifi/iwl-led.c
+++ b/drivers/net/wireless/iwlwifi/iwl-led.c
-@@ -184,7 +184,9 @@ void iwl_leds_init(struct iwl_priv *priv
+@@ -184,7 +184,9 @@ void iwl_leds_init(struct iwl_priv *priv)
wiphy_name(priv->hw->wiphy));
priv->led.brightness_set = iwl_led_brightness_set;
priv->led.blink_set = iwl_led_blink_set;
--
1.7.4.4
On Tue, Nov 29, 2011 at 4:45 PM, John W. Linville
<[email protected]> wrote:
> More fall-out from the refactoring of iwlegacy...
>
> Signed-off-by: John W. Linville <[email protected]>
Thanks so much! Applied all and pushed, will kick a new tarball right away.
Luis
More fall-out from the refactoring of iwlegacy...
Signed-off-by: John W. Linville <[email protected]>
---
patches/39-remove_blink_set.patch | 40 ++++++++++++++++++------------------
1 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/patches/39-remove_blink_set.patch b/patches/39-remove_blink_set.patch
index a39b634..54527bd 100644
--- a/patches/39-remove_blink_set.patch
+++ b/patches/39-remove_blink_set.patch
@@ -1,34 +1,34 @@
---- a/drivers/net/wireless/iwlegacy/iwl-led.c
-+++ b/drivers/net/wireless/iwlegacy/iwl-led.c
-@@ -145,6 +145,7 @@ static void iwl_legacy_led_brightness_se
- iwl_legacy_led_cmd(priv, on, 0);
+--- a/drivers/net/wireless/iwlegacy/common.c
++++ b/drivers/net/wireless/iwlegacy/common.c
+@@ -380,6 +380,7 @@ il_led_brightness_set(struct led_classdev *led_cdev,
+ il_led_cmd(il, on, 0);
}
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25))
- static int iwl_legacy_led_blink_set(struct led_classdev *led_cdev,
- unsigned long *delay_on,
- unsigned long *delay_off)
-@@ -153,6 +154,7 @@ static int iwl_legacy_led_blink_set(stru
+ static int
+ il_led_blink_set(struct led_classdev *led_cdev, unsigned long *delay_on,
+ unsigned long *delay_off)
+@@ -388,6 +389,7 @@ il_led_blink_set(struct led_classdev *led_cdev, unsigned long *delay_on,
- return iwl_legacy_led_cmd(priv, *delay_on, *delay_off);
+ return il_led_cmd(il, *delay_on, *delay_off);
}
+#endif
- void iwl_legacy_leds_init(struct iwl_priv *priv)
- {
-@@ -165,7 +167,9 @@ void iwl_legacy_leds_init(struct iwl_pri
- priv->led.name = kasprintf(GFP_KERNEL, "%s-led",
- wiphy_name(priv->hw->wiphy));
- priv->led.brightness_set = iwl_legacy_led_brightness_set;
+ void
+ il_leds_init(struct il_priv *il)
+@@ -401,7 +403,9 @@ il_leds_init(struct il_priv *il)
+ il->led.name =
+ kasprintf(GFP_KERNEL, "%s-led", wiphy_name(il->hw->wiphy));
+ il->led.brightness_set = il_led_brightness_set;
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25))
- priv->led.blink_set = iwl_legacy_led_blink_set;
+ il->led.blink_set = il_led_blink_set;
+#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,30)
- priv->led.max_brightness = 1;
+ il->led.max_brightness = 1;
#endif
--- a/drivers/net/wireless/iwlwifi/iwl-led.c
+++ b/drivers/net/wireless/iwlwifi/iwl-led.c
-@@ -163,6 +163,7 @@ static void iwl_led_brightness_set(struc
+@@ -163,6 +163,7 @@ static void iwl_led_brightness_set(struct led_classdev *led_cdev,
iwl_led_cmd(priv, on, 0);
}
@@ -36,7 +36,7 @@
static int iwl_led_blink_set(struct led_classdev *led_cdev,
unsigned long *delay_on,
unsigned long *delay_off)
-@@ -171,6 +172,7 @@ static int iwl_led_blink_set(struct led_
+@@ -171,6 +172,7 @@ static int iwl_led_blink_set(struct led_classdev *led_cdev,
return iwl_led_cmd(priv, *delay_on, *delay_off);
}
@@ -44,7 +44,7 @@
void iwl_leds_init(struct iwl_priv *priv)
{
-@@ -183,7 +185,9 @@ void iwl_leds_init(struct iwl_priv *priv
+@@ -183,7 +185,9 @@ void iwl_leds_init(struct iwl_priv *priv)
priv->led.name = kasprintf(GFP_KERNEL, "%s-led",
wiphy_name(priv->hw->wiphy));
priv->led.brightness_set = iwl_led_brightness_set;
--
1.7.4.4