2011-12-22 20:47:45

by Hauke Mehrtens

[permalink] [raw]
Subject: [PATCH 0/6] compat-wireless: various fixes

This make compat-wireless apply against current linux-next and build
with kernel version from 2.6.27 to 3.2. This series just contains some
patches handing some recent changes in linux-next nothing special.

Hauke Mehrtens (6):
compat-wireless: compile fix for commit patches/09-threaded-irq.patch
compat-wireless: remove platform_device_id for kernel < 2.6.30
compat-wireless: CONFIG_BT_L2CAP and CONFIG_BT_SCO removed
compat-wireless: make patches apply again
compat-wireless: use other workqueue
compat-wireless: no trans_start on netdev_queue

config.mk | 2 -
patches/08-rename-config-options.patch | 29 +------------
patches/09-threaded-irq.patch | 22 +++++-----
patches/29-sdio_no_suspend.patch | 47 +++++++++++++++-------
patches/31-backport-sk_add_backlog.patch | 24 ------------
patches/35-fix-makefile-includes.patch | 4 +-
patches/45-remove-platform-id-table.patch | 23 +++++++++++
patches/46-use_other_workqueue.patch | 15 +++++++
patches/47-no_trans_start_on_netdev_queue.patch | 13 ++++++
9 files changed, 99 insertions(+), 80 deletions(-)
delete mode 100644 patches/31-backport-sk_add_backlog.patch
create mode 100644 patches/45-remove-platform-id-table.patch
create mode 100644 patches/46-use_other_workqueue.patch
create mode 100644 patches/47-no_trans_start_on_netdev_queue.patch

--
1.7.5.4



2011-12-23 15:04:38

by Luciano Coelho

[permalink] [raw]
Subject: Re: [PATCH 2/6] compat-wireless: remove platform_device_id for kernel < 2.6.30

On Fri, 2011-12-23 at 07:00 -0800, Luis R. Rodriguez wrote:
> On Fri, Dec 23, 2011 at 12:58 AM, Luciano Coelho <[email protected]> wrote:
> > The question is, should we even bother compiling wl12xx if the kernel is
> > < .30?
>
> You would know better, what systems would even have the driver, etc. I
> welcome such patch. For now I'll apply this series.

Right, please go ahead and apply it. My comment was not meant to be a
NACK. :)

--
Cheers,
Luca.


2011-12-22 20:47:45

by Hauke Mehrtens

[permalink] [raw]
Subject: [PATCH 1/6] compat-wireless: compile fix for commit patches/09-threaded-irq.patch

This commit had some compile problem with kernel < 2.6.32

commit c486a4fcc5ddfb3232edfd0489fe63ffc1fa8aea
Author: Luis R. Rodriguez <[email protected]>
Date: Tue Dec 13 10:40:55 2011 -0800

compat-wireless: fix patches/09-threaded-irq.patch

There was a semicolon missing at the end of a line and wl1271_hardirq
has to be renamed to wl12xx_hardirq.
This is now compile tested with all maijor kernel version from 2.6.27.

Signed-off-by: Hauke Mehrtens <[email protected]>
---
patches/09-threaded-irq.patch | 22 +++++++++++-----------
1 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/patches/09-threaded-irq.patch b/patches/09-threaded-irq.patch
index 694dde9..83e6c7b 100644
--- a/patches/09-threaded-irq.patch
+++ b/patches/09-threaded-irq.patch
@@ -6,7 +6,7 @@ thread in process context as well.

--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
-@@ -4184,8 +4184,13 @@ redo:
+@@ -4201,8 +4201,13 @@ redo:
if (b43_bus_host_is_sdio(dev->dev)) {
b43_sdio_free_irq(dev);
} else {
@@ -20,7 +20,7 @@ thread in process context as well.
}
mutex_lock(&wl->mutex);
dev = wl->current_dev;
-@@ -4225,9 +4230,17 @@ static int b43_wireless_core_start(struc
+@@ -4244,9 +4249,17 @@ static int b43_wireless_core_start(struc
goto out;
}
} else {
@@ -38,7 +38,7 @@ thread in process context as well.
if (err) {
b43err(dev->wl, "Cannot request IRQ-%d\n",
dev->dev->irq);
-@@ -5016,6 +5029,10 @@ static int b43_setup_bands(struct b43_wl
+@@ -5035,6 +5048,10 @@ static int b43_setup_bands(struct b43_wl

static void b43_wireless_core_detach(struct b43_wldev *dev)
{
@@ -51,7 +51,7 @@ thread in process context as well.
b43_release_firmware(dev);
--- a/drivers/net/wireless/b43/b43.h
+++ b/drivers/net/wireless/b43/b43.h
-@@ -843,6 +843,9 @@ struct b43_wldev {
+@@ -844,6 +844,9 @@ struct b43_wldev {
unsigned int tx_count;
unsigned int rx_count;
#endif
@@ -63,22 +63,22 @@ thread in process context as well.
/* Data structure for the WLAN parts (802.11 cores) of the b43 chip. */
--- a/drivers/net/wireless/wl12xx/main.c
+++ b/drivers/net/wireless/wl12xx/main.c
-@@ -5183,14 +5183,25 @@ static int __devinit wl12xx_probe(struct
+@@ -5180,14 +5180,25 @@ static int __devinit wl12xx_probe(struct

platform_set_drvdata(pdev, wl);

+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32)
-+ irqflags = IRQF_TRIGGER_RISING
++ irqflags = IRQF_TRIGGER_RISING;
+#else
if (wl->platform_quirks & WL12XX_PLATFORM_QUIRK_EDGE_IRQ)
irqflags = IRQF_TRIGGER_RISING;
else
irqflags = IRQF_TRIGGER_HIGH | IRQF_ONESHOT;
-
+#endif
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
+ ret = compat_request_threaded_irq(&wl->irq_compat, wl->irq,
-+ wl1271_hardirq, wl1271_irq,
++ wl12xx_hardirq, wl1271_irq,
+ irqflags,
+ pdev->name, wl);
+#else
@@ -89,7 +89,7 @@ thread in process context as well.
if (ret < 0) {
wl1271_error("request_irq() failed: %d", ret);
goto out_free_hw;
-@@ -5244,7 +5255,11 @@ out_bt_coex_state:
+@@ -5241,7 +5252,11 @@ out_bt_coex_state:
device_remove_file(wl->dev, &dev_attr_bt_coex_state);

out_irq:
@@ -101,7 +101,7 @@ thread in process context as well.

out_free_hw:
wl1271_free_hw(wl);
-@@ -5262,7 +5277,12 @@ static int __devexit wl12xx_remove(struc
+@@ -5259,7 +5274,12 @@ static int __devexit wl12xx_remove(struc
disable_irq_wake(wl->irq);
}
wl1271_unregister_hw(wl);
@@ -116,7 +116,7 @@ thread in process context as well.
return 0;
--- a/drivers/net/wireless/wl12xx/wl12xx.h
+++ b/drivers/net/wireless/wl12xx/wl12xx.h
-@@ -484,6 +484,10 @@ struct wl1271 {
+@@ -477,6 +477,10 @@ struct wl1271 {

/* last wlvif we transmitted from */
struct wl12xx_vif *last_wlvif;
--
1.7.5.4


2011-12-22 20:47:52

by Hauke Mehrtens

[permalink] [raw]
Subject: [PATCH 4/6] compat-wireless: make patches apply again

* sk_add_backlog() is no longer used in net/bluetooth/l2cap_core.c so
the patch is not needed any more.
* ath6k got some now functions and the patches did not apply any more.

Signed-off-by: Hauke Mehrtens <[email protected]>
---
patches/29-sdio_no_suspend.patch | 47 ++++++++++++++++++++---------
patches/31-backport-sk_add_backlog.patch | 24 ---------------
patches/35-fix-makefile-includes.patch | 4 +-
3 files changed, 34 insertions(+), 41 deletions(-)
delete mode 100644 patches/31-backport-sk_add_backlog.patch

diff --git a/patches/29-sdio_no_suspend.patch b/patches/29-sdio_no_suspend.patch
index 1684bc5..9bb1b43 100644
--- a/patches/29-sdio_no_suspend.patch
+++ b/patches/29-sdio_no_suspend.patch
@@ -5,7 +5,7 @@ suspend and resume that are not backported.

--- a/drivers/net/wireless/ath/ath6kl/cfg80211.c
+++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
-@@ -1871,7 +1871,7 @@ int ath6kl_cfg80211_resume(struct ath6kl
+@@ -1963,7 +1963,7 @@ int ath6kl_cfg80211_resume(struct ath6kl
return 0;
}

@@ -14,7 +14,7 @@ suspend and resume that are not backported.

/* hif layer decides what suspend mode to use */
static int __ath6kl_cfg80211_suspend(struct wiphy *wiphy,
-@@ -2346,7 +2346,7 @@ static struct cfg80211_ops ath6kl_cfg802
+@@ -2554,7 +2554,7 @@ static struct cfg80211_ops ath6kl_cfg802
.del_pmksa = ath6kl_del_pmksa,
.flush_pmksa = ath6kl_flush_pmksa,
CFG80211_TESTMODE_CMD(ath6kl_tm_cmd)
@@ -33,7 +33,22 @@ suspend and resume that are not backported.
static inline int ath6kl_hif_suspend(struct ath6kl *ar,
struct cfg80211_wowlan *wow)
{
-@@ -97,6 +98,7 @@ static inline int ath6kl_hif_resume(stru
+@@ -90,6 +91,7 @@ static inline int ath6kl_hif_suspend(str
+
+ return ar->hif_ops->suspend(ar, wow);
+ }
++#endif
+
+ /*
+ * Read from the ATH6KL through its diagnostic window. No cooperation from
+@@ -121,12 +123,14 @@ static inline int ath6kl_hif_bmi_write(s
+ return ar->hif_ops->bmi_write(ar, buf, len);
+ }
+
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34))
+ static inline int ath6kl_hif_resume(struct ath6kl *ar)
+ {
+ ath6kl_dbg(ATH6KL_DBG_HIF, "hif resume\n");

return ar->hif_ops->resume(ar);
}
@@ -43,7 +58,7 @@ suspend and resume that are not backported.
{
--- a/drivers/net/wireless/ath/ath6kl/sdio.c
+++ b/drivers/net/wireless/ath/ath6kl/sdio.c
-@@ -774,6 +774,7 @@ out:
+@@ -782,6 +782,7 @@ out:
return ret;
}

@@ -51,15 +66,15 @@ suspend and resume that are not backported.
static int ath6kl_sdio_suspend(struct ath6kl *ar, struct cfg80211_wowlan *wow)
{
struct ath6kl_sdio *ar_sdio = ath6kl_sdio_priv(ar);
-@@ -845,6 +846,7 @@ static int ath6kl_sdio_resume(struct ath
+@@ -877,6 +878,7 @@ static int ath6kl_sdio_resume(struct ath

return 0;
}
+#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) */

- static void ath6kl_sdio_stop(struct ath6kl *ar)
- {
-@@ -888,14 +890,16 @@ static const struct ath6kl_hif_ops ath6k
+ /* set the window address register (using 4-byte register access ). */
+ static int ath6kl_set_addrwin_reg(struct ath6kl *ar, u32 reg_addr, u32 addr)
+@@ -1178,8 +1180,10 @@ static const struct ath6kl_hif_ops ath6k
.enable_scatter = ath6kl_sdio_enable_scatter,
.scat_req_rw = ath6kl_sdio_async_rw_scatter,
.cleanup_scatter = ath6kl_sdio_cleanup_scatter,
@@ -67,8 +82,10 @@ suspend and resume that are not backported.
.suspend = ath6kl_sdio_suspend,
.resume = ath6kl_sdio_resume,
+#endif
- .power_on = ath6kl_sdio_power_on,
- .power_off = ath6kl_sdio_power_off,
+ .diag_read32 = ath6kl_sdio_diag_read32,
+ .diag_write32 = ath6kl_sdio_diag_write32,
+ .bmi_read = ath6kl_sdio_bmi_read,
+@@ -1189,7 +1193,7 @@ static const struct ath6kl_hif_ops ath6k
.stop = ath6kl_sdio_stop,
};

@@ -77,7 +94,7 @@ suspend and resume that are not backported.

/*
* Empty handlers so that mmc subsystem doesn't remove us entirely during
-@@ -1037,7 +1041,9 @@ static struct sdio_driver ath6kl_sdio_dr
+@@ -1336,7 +1340,9 @@ static struct sdio_driver ath6kl_sdio_dr
.id_table = ath6kl_sdio_devices,
.probe = ath6kl_sdio_probe,
.remove = ath6kl_sdio_remove,
@@ -170,7 +187,7 @@ suspend and resume that are not backported.

--- a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c
-@@ -55,7 +55,7 @@ static bool
+@@ -56,7 +56,7 @@ static bool
brcmf_pm_resume_error(struct brcmf_sdio_dev *sdiodev)
{
bool is_err = false;
@@ -179,7 +196,7 @@ suspend and resume that are not backported.
is_err = atomic_read(&sdiodev->suspend);
#endif
return is_err;
-@@ -64,7 +64,7 @@ brcmf_pm_resume_error(struct brcmf_sdio_
+@@ -65,7 +65,7 @@ brcmf_pm_resume_error(struct brcmf_sdio_
static void
brcmf_pm_resume_wait(struct brcmf_sdio_dev *sdiodev, wait_queue_head_t *wq)
{
@@ -188,7 +205,7 @@ suspend and resume that are not backported.
int retry = 0;
while (atomic_read(&sdiodev->suspend) && retry++ != 30)
wait_event_timeout(*wq, false, HZ/100);
-@@ -530,7 +530,7 @@ static void brcmf_ops_sdio_remove(struct
+@@ -536,7 +536,7 @@ static void brcmf_ops_sdio_remove(struct
}
}

@@ -197,7 +214,7 @@ suspend and resume that are not backported.
static int brcmf_sdio_suspend(struct device *dev)
{
mmc_pm_flag_t sdio_flags;
-@@ -585,7 +585,7 @@ static struct sdio_driver brcmf_sdmmc_dr
+@@ -586,7 +586,7 @@ static struct sdio_driver brcmf_sdmmc_dr
.remove = brcmf_ops_sdio_remove,
.name = "brcmfmac",
.id_table = brcmf_sdmmc_ids,
diff --git a/patches/31-backport-sk_add_backlog.patch b/patches/31-backport-sk_add_backlog.patch
deleted file mode 100644
index eb2be15..0000000
--- a/patches/31-backport-sk_add_backlog.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-
-v2.6.34-rc2~48 got 8eae939f net: add limit for socket backlog
-This adds sk_add_backlog_limitted() which makes the backlog
-have a size, and therefore adding an skb to the backlog can
-fail, a later patch changed all non-limitted calls to use the
-limitted caller via a3a858ff. The older kernels don't have a
-size and as such always are successfull when adding to the
-backlog.
-
---- a/net/bluetooth/l2cap_core.c
-+++ b/net/bluetooth/l2cap_core.c
-@@ -4240,8 +4240,12 @@ static inline int l2cap_data_channel(str
- if (!sock_owned_by_user(sk)) {
- l2cap_ertm_data_rcv(sk, skb);
- } else {
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34))
- if (sk_add_backlog(sk, skb))
- goto drop;
-+#else
-+ sk_add_backlog(sk, skb);
-+#endif
- }
-
- goto done;
diff --git a/patches/35-fix-makefile-includes.patch b/patches/35-fix-makefile-includes.patch
index f9fa1c2..43bbcb1 100644
--- a/patches/35-fix-makefile-includes.patch
+++ b/patches/35-fix-makefile-includes.patch
@@ -29,8 +29,8 @@ path the make process will search in the kernel tree for the headers.
+ -I$(obj) \
+ -I$(obj)/../include

- DHDOFILES = \
- wl_cfg80211.o \
+ obj-$(CONFIG_BRCMFMAC) += brcmfmac.o
+ brcmfmac-objs += \
--- a/drivers/net/wireless/brcm80211/brcmsmac/Makefile
+++ b/drivers/net/wireless/brcm80211/brcmsmac/Makefile
@@ -17,9 +17,9 @@
--
1.7.5.4


2011-12-23 08:58:20

by Luciano Coelho

[permalink] [raw]
Subject: Re: [PATCH 2/6] compat-wireless: remove platform_device_id for kernel < 2.6.30

On Thu, 2011-12-22 at 21:47 +0100, Hauke Mehrtens wrote:
> Kernel < 2.6.30 do not support struct platform_device_id, so remove it
> for them and hope that the probing will reject an invalid device.
>
> Signed-off-by: Hauke Mehrtens <[email protected]>
> ---

This is not going to work. The only way the wl12xx module gets probed
is when a "wl12xx" platform device is added to the system. The
wl12xx_sdio or wl12xx_spi module instantiates a platform device with
"wl12xx" as the name, which causes the wl12xx module to be probed.

I don't know how modules handling platform devices were probed pre-.30.
Does anyone know?

Anything before 2.6.30 is *ancient*, and anyway, even before this change
we already needed changes in the "outer" kernel to get wl12xx to work.

The question is, should we even bother compiling wl12xx if the kernel is
< .30?

I'll update our wikipage to say athat starting from compat-wireless 3.2,
additional changes are required for < 2.6.30.

--
Cheers,
Luca.


2011-12-23 15:01:17

by Luis R. Rodriguez

[permalink] [raw]
Subject: Re: [PATCH 2/6] compat-wireless: remove platform_device_id for kernel < 2.6.30

On Fri, Dec 23, 2011 at 12:58 AM, Luciano Coelho <[email protected]> wrote:
> The question is, should we even bother compiling wl12xx if the kernel is
> < .30?

You would know better, what systems would even have the driver, etc. I
welcome such patch. For now I'll apply this series.

Luis

2011-12-22 20:47:53

by Hauke Mehrtens

[permalink] [raw]
Subject: [PATCH 5/6] compat-wireless: use other workqueue

Old kernel versions do not support WQ_HIGHPRI and WQ_MEM_RECLAIM so we
should use create_singlethread_workqueue() which was used at this
position before.

Signed-off-by: Hauke Mehrtens <[email protected]>
---
patches/46-use_other_workqueue.patch | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
create mode 100644 patches/46-use_other_workqueue.patch

diff --git a/patches/46-use_other_workqueue.patch b/patches/46-use_other_workqueue.patch
new file mode 100644
index 0000000..4cfe4f6
--- /dev/null
+++ b/patches/46-use_other_workqueue.patch
@@ -0,0 +1,15 @@
+--- a/net/bluetooth/hci_core.c
++++ b/net/bluetooth/hci_core.c
+@@ -1534,8 +1534,12 @@ int hci_register_dev(struct hci_dev *hde
+
+ write_unlock_bh(&hci_dev_list_lock);
+
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
+ hdev->workqueue = alloc_workqueue(hdev->name, WQ_HIGHPRI | WQ_UNBOUND |
+ WQ_MEM_RECLAIM, 1);
++#else
++ hdev->workqueue = create_singlethread_workqueue(hdev->name);
++#endif
+ if (!hdev->workqueue) {
+ error = -ENOMEM;
+ goto err;
--
1.7.5.4


2011-12-22 20:47:55

by Hauke Mehrtens

[permalink] [raw]
Subject: [PATCH 6/6] compat-wireless: no trans_start on netdev_queue

struct netdev_queue does not have the attribute trans_start in kernel <
2.6.31. trans_start on struct net_device does the same on older kernels.

Signed-off-by: Hauke Mehrtens <[email protected]>
---
patches/47-no_trans_start_on_netdev_queue.patch | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
create mode 100644 patches/47-no_trans_start_on_netdev_queue.patch

diff --git a/patches/47-no_trans_start_on_netdev_queue.patch b/patches/47-no_trans_start_on_netdev_queue.patch
new file mode 100644
index 0000000..c9e3345
--- /dev/null
+++ b/patches/47-no_trans_start_on_netdev_queue.patch
@@ -0,0 +1,13 @@
+--- a/drivers/net/wireless/mwifiex/init.c
++++ b/drivers/net/wireless/mwifiex/init.c
+@@ -289,8 +289,10 @@ void mwifiex_set_trans_start(struct net_
+ {
+ int i;
+
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31))
+ for (i = 0; i < dev->num_tx_queues; i++)
+ netdev_get_tx_queue(dev, i)->trans_start = jiffies;
++#endif
+
+ dev->trans_start = jiffies;
+ }
--
1.7.5.4


2011-12-22 20:47:50

by Hauke Mehrtens

[permalink] [raw]
Subject: [PATCH 3/6] compat-wireless: CONFIG_BT_L2CAP and CONFIG_BT_SCO removed

The config options CONFIG_BT_L2CAP and CONFIG_BT_SCO were removed from
the kernel and this patch removes them from compat-wireless.

commit f1e91e1640d808d332498a6b09b2bcd01462eff9
Author: Ulisses Furquim <[email protected]>
Date: Wed Dec 21 01:32:09 2011 -0200

Bluetooth: Always compile SCO and L2CAP in Bluetooth Core

The handling of SCO audio links and the L2CAP protocol are essential to
any system with Bluetooth thus are always compiled in from now on.

Signed-off-by: Hauke Mehrtens <[email protected]>
---
config.mk | 2 --
patches/08-rename-config-options.patch | 29 +++--------------------------
2 files changed, 3 insertions(+), 28 deletions(-)

diff --git a/config.mk b/config.mk
index f09d16d..e44b814 100644
--- a/config.mk
+++ b/config.mk
@@ -211,8 +211,6 @@ CONFIG_LIB80211_CRYPT_TKIP=m
# CONFIG_LIB80211_DEBUG=y

CONFIG_BT=m
-CONFIG_COMPAT_BT_L2CAP=y
-CONFIG_COMPAT_BT_SCO=y
CONFIG_BT_RFCOMM=m
CONFIG_BT_RFCOMM_TTY=y
CONFIG_BT_BNEP=m
diff --git a/patches/08-rename-config-options.patch b/patches/08-rename-config-options.patch
index 2f73276..249d471 100644
--- a/patches/08-rename-config-options.patch
+++ b/patches/08-rename-config-options.patch
@@ -61,40 +61,17 @@ CONFIG_BT_HIDP does not build with older kernel versions.

zd1211rw-objs := zd_chip.o zd_mac.o \
zd_rf_al2230.o zd_rf_rf2959.o \
---- a/include/net/bluetooth/bluetooth.h
-+++ b/include/net/bluetooth/bluetooth.h
-@@ -250,7 +250,7 @@ extern void bt_sysfs_cleanup(void);
-
- extern struct dentry *bt_debugfs;
-
--#ifdef CONFIG_BT_L2CAP
-+#ifdef CONFIG_COMPAT_BT_L2CAP
- int l2cap_init(void);
- void l2cap_exit(void);
- #else
-@@ -264,7 +264,7 @@ static inline void l2cap_exit(void)
- }
- #endif
-
--#ifdef CONFIG_BT_SCO
-+#ifdef CONFIG_COMPAT_BT_SCO
- int sco_init(void);
- void sco_exit(void);
- #else
--- a/net/bluetooth/Makefile
+++ b/net/bluetooth/Makefile
-@@ -6,8 +6,8 @@ obj-$(CONFIG_BT) += bluetooth.o
+@@ -6,7 +6,7 @@ obj-$(CONFIG_BT) += bluetooth.o
obj-$(CONFIG_BT_RFCOMM) += rfcomm/
obj-$(CONFIG_BT_BNEP) += bnep/
obj-$(CONFIG_BT_CMTP) += cmtp/
-obj-$(CONFIG_BT_HIDP) += hidp/
+obj-$(CONFIG_COMPAT_BT_HIDP) += hidp/

- bluetooth-y := af_bluetooth.o hci_core.o hci_conn.o hci_event.o mgmt.o hci_sock.o hci_sysfs.o lib.o
--bluetooth-$(CONFIG_BT_L2CAP) += l2cap_core.o l2cap_sock.o smp.o
--bluetooth-$(CONFIG_BT_SCO) += sco.o
-+bluetooth-$(CONFIG_COMPAT_BT_L2CAP) += l2cap_core.o l2cap_sock.o smp.o
-+bluetooth-$(CONFIG_COMPAT_BT_SCO) += sco.o
+ bluetooth-y := af_bluetooth.o hci_core.o hci_conn.o hci_event.o mgmt.o \
+ hci_sock.o hci_sysfs.o l2cap_core.o l2cap_sock.o smp.o sco.o lib.o
--- a/net/bluetooth/hidp/Makefile
+++ b/net/bluetooth/hidp/Makefile
@@ -2,6 +2,6 @@
--
1.7.5.4


2011-12-22 20:47:47

by Hauke Mehrtens

[permalink] [raw]
Subject: [PATCH 2/6] compat-wireless: remove platform_device_id for kernel < 2.6.30

Kernel < 2.6.30 do not support struct platform_device_id, so remove it
for them and hope that the probing will reject an invalid device.

Signed-off-by: Hauke Mehrtens <[email protected]>
---
patches/45-remove-platform-id-table.patch | 23 +++++++++++++++++++++++
1 files changed, 23 insertions(+), 0 deletions(-)
create mode 100644 patches/45-remove-platform-id-table.patch

diff --git a/patches/45-remove-platform-id-table.patch b/patches/45-remove-platform-id-table.patch
new file mode 100644
index 0000000..aa96ecb
--- /dev/null
+++ b/patches/45-remove-platform-id-table.patch
@@ -0,0 +1,23 @@
+--- a/drivers/net/wireless/wl12xx/main.c
++++ b/drivers/net/wireless/wl12xx/main.c
+@@ -5321,16 +5321,20 @@ static int __devexit wl12xx_remove(struc
+ return 0;
+ }
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,30)
+ static const struct platform_device_id wl12xx_id_table[] __devinitconst = {
+ { "wl12xx", 0 },
+ { } /* Terminating Entry */
+ };
+ MODULE_DEVICE_TABLE(platform, wl12xx_id_table);
++#endif
+
+ static struct platform_driver wl12xx_driver = {
+ .probe = wl12xx_probe,
+ .remove = __devexit_p(wl12xx_remove),
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,30)
+ .id_table = wl12xx_id_table,
++#endif
+ .driver = {
+ .name = "wl12xx_driver",
+ .owner = THIS_MODULE,
--
1.7.5.4


2011-12-23 15:17:11

by Luis R. Rodriguez

[permalink] [raw]
Subject: Re: [PATCH 0/6] compat-wireless: various fixes

On Thu, Dec 22, 2011 at 12:47 PM, Hauke Mehrtens <[email protected]> wrote:
> This make compat-wireless apply against current linux-next and build
> with kernel version from 2.6.27 to 3.2. This series just contains some
> patches handing some recent changes in linux-next nothing special.

Thanks so much, applied and pushed!

In the future please provide a description of the patches added to
patches/, I've added your description this time. This helps other
driver writers who need such functionality understand why this is done
but also sets a bar for adding patches into compat-wireless vs adding
something to the generic compat module.

Luis