* [PATCH 1/4] compat-wireless: fix power managemnet backport
@ 2011-01-01 14:26 Hauke Mehrtens
2011-01-01 14:26 ` [PATCH 2/4] compat-wireless: remove patches applied mainline Hauke Mehrtens
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Hauke Mehrtens @ 2011-01-01 14:26 UTC (permalink / raw)
To: lrodriguez; +Cc: linux-wireless, mcgrof, Hauke Mehrtens
Include backported power management support under the same condition as
the new one is integrated.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
patches/11-dev-pm-ops.patch | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/patches/11-dev-pm-ops.patch b/patches/11-dev-pm-ops.patch
index f30baf8..dea121a 100644
--- a/patches/11-dev-pm-ops.patch
+++ b/patches/11-dev-pm-ops.patch
@@ -60,7 +60,7 @@ calls on compat code with only slight modifications.
.remove = ath_pci_remove,
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29))
.driver.pm = ATH9K_PM_OPS,
-+#elif defined(CONFIG_PM_SLEEP)
++#elif defined(CONFIG_PM)
+ .suspend = ath_pci_suspend_compat,
+ .resume = ath_pci_resume_compat,
+#endif
@@ -75,7 +75,7 @@ calls on compat code with only slight modifications.
.remove = __devexit_p(iwl_pci_remove),
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29))
.driver.pm = IWL_PM_OPS,
-+#elif defined(CONFIG_PM_SLEEP)
++#elif defined(CONFIG_PM)
+ .suspend = iwl_pci_suspend_compat,
+ .resume = iwl_pci_resume_compat,
+#endif
@@ -158,7 +158,7 @@ calls on compat code with only slight modifications.
.remove = __devexit_p(iwl3945_pci_remove),
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29))
.driver.pm = IWL_PM_OPS,
-+#elif defined(CONFIG_PM_SLEEP)
++#elif defined(CONFIG_PM)
+ .suspend = iwl_pci_suspend_compat,
+ .resume = iwl_pci_resume_compat,
+#endif
--
1.7.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/4] compat-wireless: remove patches applied mainline
2011-01-01 14:26 [PATCH 1/4] compat-wireless: fix power managemnet backport Hauke Mehrtens
@ 2011-01-01 14:26 ` Hauke Mehrtens
2011-01-01 14:26 ` [PATCH 3/4] compat-wireless: rtl8187 and rtl8180 moved Hauke Mehrtens
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Hauke Mehrtens @ 2011-01-01 14:26 UTC (permalink / raw)
To: lrodriguez; +Cc: linux-wireless, mcgrof, Hauke Mehrtens
The removed parts are now in mainline and do not have to be backported
any more.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
| 20 ---------
patches/20-pcidev.patch | 83 ---------------------------------------
2 files changed, 0 insertions(+), 103 deletions(-)
delete mode 100644 patches/20-pcidev.patch
--git a/patches/06-header-changes.patch b/patches/06-header-changes.patch
index 0b90d4c..6e4ae56 100644
--- a/patches/06-header-changes.patch
+++ b/patches/06-header-changes.patch
@@ -26,16 +26,6 @@ cases.
#include "wifi.h"
#include "rc.h"
#include "base.h"
---- a/drivers/net/wireless/wl1251/boot.c
-+++ b/drivers/net/wireless/wl1251/boot.c
-@@ -19,7 +19,6 @@
- *
- */
-
--#include <linux/gpio.h>
- #include <linux/slab.h>
-
- #include "reg.h"
--- a/drivers/net/wireless/wl1251/main.c
+++ b/drivers/net/wireless/wl1251/main.c
@@ -24,6 +24,9 @@
@@ -60,16 +50,6 @@ cases.
#include <linux/spi/spi.h>
#include <linux/wl12xx.h>
---- a/drivers/net/wireless/wl12xx/boot.c
-+++ b/drivers/net/wireless/wl12xx/boot.c
-@@ -21,7 +21,6 @@
- *
- */
-
--#include <linux/gpio.h>
- #include <linux/slab.h>
-
- #include "acx.h"
--- a/net/mac80211/key.c
+++ b/net/mac80211/key.c
@@ -22,6 +22,9 @@
diff --git a/patches/20-pcidev.patch b/patches/20-pcidev.patch
deleted file mode 100644
index d576ce8..0000000
--- a/patches/20-pcidev.patch
+++ /dev/null
@@ -1,83 +0,0 @@
-Older kernels than 2.6.24 do not have the is_pcie member as part of
-the struct pci_dev, to help with that we use the compat-2.6.24.c supplied
-compat_is_pcie() when needed.
-
---- a/drivers/net/wireless/ath/ath5k/attach.c
-+++ b/drivers/net/wireless/ath/ath5k/attach.c
-@@ -276,7 +276,7 @@ int ath5k_hw_init(struct ath5k_softc *sc
- /*
- * Write PCI-E power save settings
- */
-- if ((ah->ah_version == AR5K_AR5212) && pdev && (pdev->is_pcie)) {
-+ if ((ah->ah_version == AR5K_AR5212) && pdev && (pci_is_pcie(pdev))) {
- ath5k_hw_reg_write(ah, 0x9248fc00, AR5K_PCIE_SERDES);
- ath5k_hw_reg_write(ah, 0x24924924, AR5K_PCIE_SERDES);
-
---- a/drivers/net/wireless/ath/ath5k/reset.c
-+++ b/drivers/net/wireless/ath/ath5k/reset.c
-@@ -537,7 +537,7 @@ int ath5k_hw_on_hold(struct ath5k_hw *ah
- * we ingore that flag for PCI-E cards. On PCI cards
- * this flag gets cleared after 64 PCI clocks.
- */
-- bus_flags = (pdev && pdev->is_pcie) ? 0 : AR5K_RESET_CTL_PCI;
-+ bus_flags = (pdev && pci_is_pcie(pdev)) ? 0 : AR5K_RESET_CTL_PCI;
-
- if (ah->ah_version == AR5K_AR5210) {
- ret = ath5k_hw_nic_reset(ah, AR5K_RESET_CTL_PCU |
-@@ -594,7 +594,7 @@ int ath5k_hw_nic_wakeup(struct ath5k_hw
- * we ingore that flag for PCI-E cards. On PCI cards
- * this flag gets cleared after 64 PCI clocks.
- */
-- bus_flags = (pdev && pdev->is_pcie) ? 0 : AR5K_RESET_CTL_PCI;
-+ bus_flags = (pdev && pci_is_pcie(pdev)) ? 0 : AR5K_RESET_CTL_PCI;
-
- if (ah->ah_version == AR5K_AR5210) {
- ret = ath5k_hw_nic_reset(ah, AR5K_RESET_CTL_PCU |
---- a/drivers/net/wireless/ath/ath9k/pci.c
-+++ b/drivers/net/wireless/ath/ath9k/pci.c
-@@ -96,7 +96,7 @@ static void ath_pci_bt_coex_prep(struct
- struct pci_dev *pdev = to_pci_dev(sc->dev);
- u8 aspm;
-
-- if (!pdev->is_pcie)
-+ if (!pci_is_pcie(pdev))
- return;
-
- pci_read_config_byte(pdev, ATH_PCIE_CAP_LINK_CTRL, &aspm);
---- a/drivers/net/wireless/rt2x00/rt2x00pci.c
-+++ b/drivers/net/wireless/rt2x00/rt2x00pci.c
-@@ -301,7 +301,7 @@ int rt2x00pci_probe(struct pci_dev *pci_
- rt2x00dev->irq = pci_dev->irq;
- rt2x00dev->name = pci_name(pci_dev);
-
-- if (pci_dev->is_pcie)
-+ if (pci_is_pcie(pci_dev))
- rt2x00_set_chip_intf(rt2x00dev, RT2X00_CHIP_INTF_PCIE);
- else
- rt2x00_set_chip_intf(rt2x00dev, RT2X00_CHIP_INTF_PCI);
---- a/drivers/net/wireless/rtlwifi/pci.c
-+++ b/drivers/net/wireless/rtlwifi/pci.c
-@@ -1608,7 +1608,7 @@ static bool _rtl_pci_find_adapter(struct
- pcipriv->ndis_adapter.pcibridge_funcnum =
- PCI_FUNC(bridge_pdev->devfn);
- pcipriv->ndis_adapter.pcibridge_pciehdr_offset =
-- bridge_pdev->pcie_cap;
-+ pci_pcie_cap(bridge_pdev);
- pcipriv->ndis_adapter.pcicfg_addrport =
- (pcipriv->ndis_adapter.pcibridge_busnum << 16) |
- (pcipriv->ndis_adapter.pcibridge_devnum << 11) |
---- a/drivers/ssb/scan.c
-+++ b/drivers/ssb/scan.c
-@@ -405,10 +405,10 @@ int ssb_bus_scan(struct ssb_bus *bus,
- /* Ignore PCI cores on PCI-E cards.
- * Ignore PCI-E cores on PCI cards. */
- if (dev->id.coreid == SSB_DEV_PCI) {
-- if (bus->host_pci->is_pcie)
-+ if (pci_is_pcie(bus->host_pci))
- continue;
- } else {
-- if (!bus->host_pci->is_pcie)
-+ if (!pci_is_pcie(bus->host_pci))
- continue;
- }
- }
--
1.7.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/4] compat-wireless: rtl8187 and rtl8180 moved
2011-01-01 14:26 [PATCH 1/4] compat-wireless: fix power managemnet backport Hauke Mehrtens
2011-01-01 14:26 ` [PATCH 2/4] compat-wireless: remove patches applied mainline Hauke Mehrtens
@ 2011-01-01 14:26 ` Hauke Mehrtens
2011-01-01 14:26 ` [PATCH 4/4] compat-wireless: use generic suspend resume Hauke Mehrtens
2011-01-05 23:21 ` [PATCH 1/4] compat-wireless: fix power managemnet backport Luis R. Rodriguez
3 siblings, 0 replies; 5+ messages in thread
From: Hauke Mehrtens @ 2011-01-01 14:26 UTC (permalink / raw)
To: lrodriguez; +Cc: linux-wireless, mcgrof, Hauke Mehrtens
The rtl8187 and rtl8180 modules moved to an other subdirectory and the
filenames were changed. The makefile includes some header, where the
path has to be changed.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
patches/25-multicast-list_head.patch | 22 +++++-----
patches/35-backport-brcm80211-Makefile.patch | 32 ----------------
patches/35-fix-makefile-includes.patch | 52 ++++++++++++++++++++++++++
scripts/admin-update.sh | 2 +
4 files changed, 65 insertions(+), 43 deletions(-)
delete mode 100644 patches/35-backport-brcm80211-Makefile.patch
create mode 100644 patches/35-fix-makefile-includes.patch
diff --git a/patches/25-multicast-list_head.patch b/patches/25-multicast-list_head.patch
index 8ad8391..3d8632e 100644
--- a/patches/25-multicast-list_head.patch
+++ b/patches/25-multicast-list_head.patch
@@ -162,7 +162,7 @@ This also backport commit 2f787b0b76bf5de2eaa3ca3a29d89123ae03c856
}
--- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/drivers/net/wireless/ath/ath5k/base.c
-@@ -3131,20 +3131,42 @@ unlock:
+@@ -3135,20 +3135,42 @@ unlock:
}
static u64 ath5k_prepare_multicast(struct ieee80211_hw *hw,
@@ -205,7 +205,7 @@ This also backport commit 2f787b0b76bf5de2eaa3ca3a29d89123ae03c856
pos ^= (val >> 18) ^ (val >> 12) ^ (val >> 6) ^ val;
pos &= 0x3f;
mfilt[pos / 32] |= (1 << (pos % 32));
-@@ -3153,6 +3175,9 @@ static u64 ath5k_prepare_multicast(struc
+@@ -3157,6 +3179,9 @@ static u64 ath5k_prepare_multicast(struc
* neet to inform below to not reset the mcast */
/* ath5k_hw_set_mcast_filterindex(ah,
* ha->addr[5]); */
@@ -445,7 +445,7 @@ This also backport commit 2f787b0b76bf5de2eaa3ca3a29d89123ae03c856
size_t fw_name_len, u32 *hw_ver);
--- a/drivers/net/wireless/rndis_wlan.c
+++ b/drivers/net/wireless/rndis_wlan.c
-@@ -1609,7 +1609,11 @@ static void set_multicast_list(struct us
+@@ -1629,7 +1629,11 @@ static void set_multicast_list(struct us
netdev_for_each_mc_addr(ha, usbdev->net)
memcpy(mc_addrs + i++ * ETH_ALEN,
@@ -457,8 +457,8 @@ This also backport commit 2f787b0b76bf5de2eaa3ca3a29d89123ae03c856
}
netif_addr_unlock_bh(usbdev->net);
---- a/drivers/net/wireless/rtl818x/rtl8180_dev.c
-+++ b/drivers/net/wireless/rtl818x/rtl8180_dev.c
+--- a/drivers/net/wireless/rtl818x/rtl8180/dev.c
++++ b/drivers/net/wireless/rtl818x/rtl8180/dev.c
@@ -815,10 +815,19 @@ static void rtl8180_bss_info_changed(str
}
}
@@ -479,8 +479,8 @@ This also backport commit 2f787b0b76bf5de2eaa3ca3a29d89123ae03c856
}
static void rtl8180_configure_filter(struct ieee80211_hw *dev,
---- a/drivers/net/wireless/rtl818x/rtl8187_dev.c
-+++ b/drivers/net/wireless/rtl818x/rtl8187_dev.c
+--- a/drivers/net/wireless/rtl818x/rtl8187/dev.c
++++ b/drivers/net/wireless/rtl818x/rtl8187/dev.c
@@ -1194,9 +1194,17 @@ static void rtl8187_bss_info_changed(str
}
@@ -677,7 +677,7 @@ This also backport commit 2f787b0b76bf5de2eaa3ca3a29d89123ae03c856
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
-@@ -719,7 +719,12 @@ struct ieee80211_local {
+@@ -734,7 +734,12 @@ struct ieee80211_local {
struct work_struct recalc_smps;
/* aggregated multicast list */
@@ -692,7 +692,7 @@ This also backport commit 2f787b0b76bf5de2eaa3ca3a29d89123ae03c856
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
-@@ -433,8 +433,13 @@ static void ieee80211_do_stop(struct iee
+@@ -435,8 +435,13 @@ static void ieee80211_do_stop(struct iee
netif_addr_lock_bh(sdata->dev);
spin_lock_bh(&local->filter_lock);
@@ -706,7 +706,7 @@ This also backport commit 2f787b0b76bf5de2eaa3ca3a29d89123ae03c856
spin_unlock_bh(&local->filter_lock);
netif_addr_unlock_bh(sdata->dev);
-@@ -593,7 +598,12 @@ static void ieee80211_set_multicast_list
+@@ -595,7 +600,12 @@ static void ieee80211_set_multicast_list
sdata->flags ^= IEEE80211_SDATA_PROMISC;
}
spin_lock_bh(&local->filter_lock);
@@ -733,7 +733,7 @@ This also backport commit 2f787b0b76bf5de2eaa3ca3a29d89123ae03c856
spin_unlock_bh(&local->filter_lock);
/* be a bit nasty */
-@@ -555,9 +559,11 @@ struct ieee80211_hw *ieee80211_alloc_hw(
+@@ -559,9 +563,11 @@ struct ieee80211_hw *ieee80211_alloc_hw(
local->uapsd_max_sp_len = IEEE80211_DEFAULT_MAX_SP_LEN;
INIT_LIST_HEAD(&local->interfaces);
diff --git a/patches/35-backport-brcm80211-Makefile.patch b/patches/35-backport-brcm80211-Makefile.patch
deleted file mode 100644
index bc57367..0000000
--- a/patches/35-backport-brcm80211-Makefile.patch
+++ /dev/null
@@ -1,32 +0,0 @@
---- a/drivers/staging/brcm80211/Makefile
-+++ b/drivers/staging/brcm80211/Makefile
-@@ -24,10 +24,10 @@ ccflags-y := \
- -DDBAND \
- -DBCMDMA32 \
- -DBCMNVRAMR \
-- -Idrivers/staging/brcm80211/sys \
-- -Idrivers/staging/brcm80211/phy \
-- -Idrivers/staging/brcm80211/util \
-- -Idrivers/staging/brcm80211/include
-+ -I$(obj)/sys \
-+ -I$(obj)/phy \
-+ -I$(obj)/util \
-+ -I$(obj)/include
-
- PCI_CFLAGS := -DWLC_LOW
-
---- a/drivers/staging/brcm80211/brcmfmac/Makefile
-+++ b/drivers/staging/brcm80211/brcmfmac/Makefile
-@@ -33,9 +33,9 @@ ccflags-y := \
- -DPKT_FILTER_SUPPORT \
- -DSHOW_EVENTS \
- -DTOE \
-- -Idrivers/staging/brcm80211/brcmfmac \
-- -Idrivers/staging/brcm80211/include \
-- -Idrivers/staging/brcm80211/util
-+ -I$(obj) \
-+ -I$(obj)/../include \
-+ -I$(obj)/../util
-
- DHDOFILES = dhd_linux.o ../util/linux_osl.o ../util/bcmutils.o dhd_common.o dhd_custom_gpio.o \
- wl_iw.o wl_cfg80211.o ../util/siutils.o ../util/sbutils.o ../util/aiutils.o ../util/hndpmu.o ../util/bcmwifi.o dhd_sdio.o \
diff --git a/patches/35-fix-makefile-includes.patch b/patches/35-fix-makefile-includes.patch
new file mode 100644
index 0000000..c80e11f
--- /dev/null
+++ b/patches/35-fix-makefile-includes.patch
@@ -0,0 +1,52 @@
+When some other headers are included in some makefile it must be
+relative to the current object file processed. When giving the full
+path the make process will search in the kernel tree for the headers.
+
+--- a/drivers/net/wireless/rtl818x/rtl8180/Makefile
++++ b/drivers/net/wireless/rtl818x/rtl8180/Makefile
+@@ -2,4 +2,4 @@ rtl8180-objs := dev.o rtl8225.o sa2400.
+
+ obj-$(CONFIG_RTL8180) += rtl8180.o
+
+-ccflags-y += -Idrivers/net/wireless/rtl818x
++ccflags-y += -I$(obj)/..
+--- a/drivers/net/wireless/rtl818x/rtl8187/Makefile
++++ b/drivers/net/wireless/rtl818x/rtl8187/Makefile
+@@ -2,4 +2,4 @@ rtl8187-objs := dev.o rtl8225.o leds.o
+
+ obj-$(CONFIG_RTL8187) += rtl8187.o
+
+-ccflags-y += -Idrivers/net/wireless/rtl818x
++ccflags-y += -I$(obj)/..
+--- a/drivers/staging/brcm80211/Makefile
++++ b/drivers/staging/brcm80211/Makefile
+@@ -24,10 +24,10 @@ ccflags-y := \
+ -DDBAND \
+ -DBCMDMA32 \
+ -DBCMNVRAMR \
+- -Idrivers/staging/brcm80211/sys \
+- -Idrivers/staging/brcm80211/phy \
+- -Idrivers/staging/brcm80211/util \
+- -Idrivers/staging/brcm80211/include
++ -I$(obj)/sys \
++ -I$(obj)/phy \
++ -I$(obj)/util \
++ -I$(obj)/include
+
+ PCI_CFLAGS := -DWLC_LOW
+
+--- a/drivers/staging/brcm80211/brcmfmac/Makefile
++++ b/drivers/staging/brcm80211/brcmfmac/Makefile
+@@ -33,9 +33,9 @@ ccflags-y := \
+ -DPKT_FILTER_SUPPORT \
+ -DSHOW_EVENTS \
+ -DTOE \
+- -Idrivers/staging/brcm80211/brcmfmac \
+- -Idrivers/staging/brcm80211/include \
+- -Idrivers/staging/brcm80211/util
++ -I$(obj) \
++ -I$(obj)/../include \
++ -I$(obj)/../util
+
+ DHDOFILES = dhd_linux.o ../util/linux_osl.o ../util/bcmutils.o dhd_common.o dhd_custom_gpio.o \
+ wl_iw.o wl_cfg80211.o ../util/siutils.o ../util/sbutils.o ../util/aiutils.o ../util/hndpmu.o ../util/bcmwifi.o dhd_sdio.o \
diff --git a/scripts/admin-update.sh b/scripts/admin-update.sh
index b93761e..f23c33c 100755
--- a/scripts/admin-update.sh
+++ b/scripts/admin-update.sh
@@ -229,6 +229,8 @@ DRIVERS="$DRIVERS drivers/net/wireless/zd1211rw"
DRIVERS="$DRIVERS drivers/net/wireless/libertas"
DRIVERS="$DRIVERS drivers/net/wireless/p54"
DRIVERS="$DRIVERS drivers/net/wireless/rtl818x"
+DRIVERS="$DRIVERS drivers/net/wireless/rtl818x/rtl8180"
+DRIVERS="$DRIVERS drivers/net/wireless/rtl818x/rtl8187"
DRIVERS="$DRIVERS drivers/net/wireless/rtlwifi"
DRIVERS="$DRIVERS drivers/net/wireless/rtlwifi/rtl8192ce"
DRIVERS="$DRIVERS drivers/net/wireless/libertas_tf"
--
1.7.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 4/4] compat-wireless: use generic suspend resume
2011-01-01 14:26 [PATCH 1/4] compat-wireless: fix power managemnet backport Hauke Mehrtens
2011-01-01 14:26 ` [PATCH 2/4] compat-wireless: remove patches applied mainline Hauke Mehrtens
2011-01-01 14:26 ` [PATCH 3/4] compat-wireless: rtl8187 and rtl8180 moved Hauke Mehrtens
@ 2011-01-01 14:26 ` Hauke Mehrtens
2011-01-05 23:21 ` [PATCH 1/4] compat-wireless: fix power managemnet backport Luis R. Rodriguez
3 siblings, 0 replies; 5+ messages in thread
From: Hauke Mehrtens @ 2011-01-01 14:26 UTC (permalink / raw)
To: lrodriguez; +Cc: linux-wireless, mcgrof, Hauke Mehrtens
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
patches/11-dev-pm-ops.patch | 173 +++++++++++++++----------------------------
1 files changed, 61 insertions(+), 112 deletions(-)
diff --git a/patches/11-dev-pm-ops.patch b/patches/11-dev-pm-ops.patch
index dea121a..4aa257f 100644
--- a/patches/11-dev-pm-ops.patch
+++ b/patches/11-dev-pm-ops.patch
@@ -7,9 +7,59 @@ calls on compat code with only slight modifications.
[1] http://lxr.linux.no/#linux+v2.6.29/include/linux/pm.h#L170
+--- a/drivers/net/atl1c/atl1c_main.c
++++ b/drivers/net/atl1c/atl1c_main.c
+@@ -2879,6 +2879,9 @@ static struct pci_error_handlers atl1c_e
+
+ static SIMPLE_DEV_PM_OPS(atl1c_pm_ops, atl1c_suspend, atl1c_resume);
+
++compat_pci_suspend(atl1c_suspend)
++compat_pci_resume(atl1c_resume)
++
+ static struct pci_driver atl1c_driver = {
+ .name = atl1c_driver_name,
+ .id_table = atl1c_pci_tbl,
+@@ -2886,7 +2889,12 @@ static struct pci_driver atl1c_driver =
+ .remove = __devexit_p(atl1c_remove),
+ .shutdown = atl1c_shutdown,
+ .err_handler = &atl1c_err_handler,
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29))
+ .driver.pm = &atl1c_pm_ops,
++#elif defined(CONFIG_PM_SLEEP)
++ .suspend = atl1c_suspend_compat,
++ .resume = atl1c_resume_compat,
++#endif
+ };
+
+ /*
+--- a/drivers/net/wireless/ath/ath5k/pci.c
++++ b/drivers/net/wireless/ath/ath5k/pci.c
+@@ -286,6 +286,9 @@ static int ath5k_pci_resume(struct devic
+ return 0;
+ }
+
++compat_pci_suspend(ath5k_pci_suspend)
++compat_pci_resume(ath5k_pci_resume)
++
+ static SIMPLE_DEV_PM_OPS(ath5k_pm_ops, ath5k_pci_suspend, ath5k_pci_resume);
+ #define ATH5K_PM_OPS (&ath5k_pm_ops)
+ #else
+@@ -297,7 +300,12 @@ static struct pci_driver ath5k_pci_drive
+ .id_table = ath5k_pci_id_table,
+ .probe = ath5k_pci_probe,
+ .remove = __devexit_p(ath5k_pci_remove),
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29))
+ .driver.pm = ATH5K_PM_OPS,
++#elif defined(CONFIG_PM_SLEEP)
++ .suspend = ath5k_pci_suspend_compat,
++ .resume = ath5k_pci_resume_compat,
++#endif
+ };
+
+ /*
--- a/drivers/net/wireless/ath/ath9k/pci.c
+++ b/drivers/net/wireless/ath/ath9k/pci.c
-@@ -315,14 +315,36 @@ static int ath_pci_resume(struct device
+@@ -326,14 +326,11 @@ static int ath_pci_resume(struct device
return 0;
}
@@ -21,40 +71,15 @@ calls on compat code with only slight modifications.
- .poweroff = ath_pci_suspend,
- .restore = ath_pci_resume,
-};
-+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29))
-+static int ath_pci_suspend_compat(struct pci_dev *pdev, pm_message_t state)
-+{
-+ int r;
+
-+ r = ath_pci_suspend(&pdev->dev);
-+ if (r)
-+ return r;
-+
-+ pci_save_state(pdev);
-+ pci_disable_device(pdev);
-+ pci_set_power_state(pdev, PCI_D3hot);
-+
-+ return 0;
-+}
-+
-+static int ath_pci_resume_compat(struct pci_dev *pdev)
-+{
-+ int r;
-+
-+ pci_restore_state(pdev);
-+ r = pci_enable_device(pdev);
-+ if (r)
-+ return r;
-+
-+ return ath_pci_resume(&pdev->dev);
-+}
-+#endif
++compat_pci_suspend(ath_pci_suspend)
++compat_pci_resume(ath_pci_resume)
+
+static SIMPLE_DEV_PM_OPS(ath9k_pm_ops, ath_pci_suspend, ath_pci_resume);
#define ATH9K_PM_OPS (&ath9k_pm_ops)
-@@ -340,7 +362,12 @@ static struct pci_driver ath_pci_driver
+@@ -351,7 +348,12 @@ static struct pci_driver ath_pci_driver
.id_table = ath_pci_id_table,
.probe = ath_pci_probe,
.remove = ath_pci_remove,
@@ -84,7 +109,7 @@ calls on compat code with only slight modifications.
static int __init iwl_init(void)
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
-@@ -2098,14 +2098,42 @@ int iwl_pci_resume(struct device *device
+@@ -2098,14 +2098,16 @@ int iwl_pci_resume(struct device *device
}
EXPORT_SYMBOL(iwl_pci_resume);
@@ -96,42 +121,16 @@ calls on compat code with only slight modifications.
- .poweroff = iwl_pci_suspend,
- .restore = iwl_pci_resume,
-};
-+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29))
-+int iwl_pci_suspend_compat(struct pci_dev *pdev, pm_message_t state)
-+{
-+ int r;
-+
-+ r = iwl_pci_suspend(&pdev->dev);
-+ if (r)
-+ return r;
-+
-+ pci_save_state(pdev);
-+ pci_disable_device(pdev);
-+ pci_set_power_state(pdev, PCI_D3hot);
-+
-+ return 0;
-+}
-+EXPORT_SYMBOL(iwl_pci_suspend_compat);
-+
-+int iwl_pci_resume_compat(struct pci_dev *pdev)
-+{
-+ int r;
-+
-+ pci_set_power_state(pdev, PCI_D0);
-+ r = pci_enable_device(pdev);
-+ if (r)
-+ return r;
-+ pci_restore_state(pdev);
-+
-+ return iwl_pci_resume(&pdev->dev);
-+}
-+EXPORT_SYMBOL(iwl_pci_resume_compat);
-+#endif
-+
+const SIMPLE_DEV_PM_OPS(iwl_pm_ops, iwl_pci_suspend, iwl_pci_resume);
+
++compat_pci_suspend(iwl_pci_suspend)
++compat_pci_resume(iwl_pci_resume)
++
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29))
EXPORT_SYMBOL(iwl_pm_ops);
++#else
++EXPORT_SYMBOL(iwl_pci_suspend_compat);
++EXPORT_SYMBOL(iwl_pci_resume_compat);
+#endif
#endif /* CONFIG_PM */
@@ -165,53 +164,3 @@ calls on compat code with only slight modifications.
};
static int __init iwl3945_init(void)
---- a/drivers/net/wireless/ath/ath5k/pci.c
-+++ b/drivers/net/wireless/ath/ath5k/pci.c
-@@ -286,6 +286,34 @@ static int ath5k_pci_resume(struct devic
- return 0;
- }
-
-+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29))
-+static int ath5k_pci_suspend_compat(struct pci_dev *pdev, pm_message_t state)
-+{
-+ int r;
-+
-+ r = ath5k_pci_suspend(&pdev->dev);
-+ if (r)
-+ return r;
-+
-+ pci_save_state(pdev);
-+ pci_disable_device(pdev);
-+ pci_set_power_state(pdev, PCI_D3hot);
-+ return 0;
-+}
-+
-+static int ath5k_pci_resume_compat(struct pci_dev *pdev)
-+{
-+ int r;
-+
-+ pci_restore_state(pdev);
-+ r = pci_enable_device(pdev);
-+ if (r)
-+ return r;
-+
-+ return ath5k_pci_resume(&pdev->dev);
-+}
-+#endif
-+
- static SIMPLE_DEV_PM_OPS(ath5k_pm_ops, ath5k_pci_suspend, ath5k_pci_resume);
- #define ATH5K_PM_OPS (&ath5k_pm_ops)
- #else
-@@ -297,7 +325,12 @@ static struct pci_driver ath5k_pci_drive
- .id_table = ath5k_pci_id_table,
- .probe = ath5k_pci_probe,
- .remove = __devexit_p(ath5k_pci_remove),
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29))
- .driver.pm = ATH5K_PM_OPS,
-+#elif defined(CONFIG_PM_SLEEP)
-+ .suspend = ath5k_pci_suspend_compat,
-+ .resume = ath5k_pci_resume_compat,
-+#endif
- };
-
- /*
--
1.7.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/4] compat-wireless: fix power managemnet backport
2011-01-01 14:26 [PATCH 1/4] compat-wireless: fix power managemnet backport Hauke Mehrtens
` (2 preceding siblings ...)
2011-01-01 14:26 ` [PATCH 4/4] compat-wireless: use generic suspend resume Hauke Mehrtens
@ 2011-01-05 23:21 ` Luis R. Rodriguez
3 siblings, 0 replies; 5+ messages in thread
From: Luis R. Rodriguez @ 2011-01-05 23:21 UTC (permalink / raw)
To: Hauke Mehrtens
Cc: Luis Rodriguez, linux-wireless@vger.kernel.org,
mcgrof@infradead.org
On Sat, Jan 01, 2011 at 06:26:18AM -0800, Hauke Mehrtens wrote:
> Include backported power management support under the same condition as
> the new one is integrated.
>
> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Applied and pushed all, thanks!
Luis
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-01-05 23:21 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-01 14:26 [PATCH 1/4] compat-wireless: fix power managemnet backport Hauke Mehrtens
2011-01-01 14:26 ` [PATCH 2/4] compat-wireless: remove patches applied mainline Hauke Mehrtens
2011-01-01 14:26 ` [PATCH 3/4] compat-wireless: rtl8187 and rtl8180 moved Hauke Mehrtens
2011-01-01 14:26 ` [PATCH 4/4] compat-wireless: use generic suspend resume Hauke Mehrtens
2011-01-05 23:21 ` [PATCH 1/4] compat-wireless: fix power managemnet backport Luis R. Rodriguez
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).