diff -Nru broadcom-sta-6.30.223.271/debian/changelog broadcom-sta-6.30.223.271/debian/changelog --- broadcom-sta-6.30.223.271/debian/changelog 2018-02-13 18:45:18.000000000 -0200 +++ broadcom-sta-6.30.223.271/debian/changelog 2019-11-13 16:10:21.000000000 -0300 @@ -1,3 +1,11 @@ +broadcom-sta (6.30.223.271-8ubuntu0.1) bionic; urgency=medium + + * Fix build failures for i386 and 5.3 (LP: #1830042). + - Added d/p/22-linux51.patch + - Updated d/p/20-linux414.patch + + -- Marcelo Henrique Cerri Wed, 13 Nov 2019 16:10:21 -0300 + broadcom-sta (6.30.223.271-8) unstable; urgency=low [ Roger Shimizu ] diff -Nru broadcom-sta-6.30.223.271/debian/patches/20-linux414.patch broadcom-sta-6.30.223.271/debian/patches/20-linux414.patch --- broadcom-sta-6.30.223.271/debian/patches/20-linux414.patch 2018-02-13 18:45:18.000000000 -0200 +++ broadcom-sta-6.30.223.271/debian/patches/20-linux414.patch 2019-11-13 16:10:21.000000000 -0300 @@ -4,13 +4,13 @@ Origin: https://bugs.debian.org/885885 linux 4.14 changed the kernel_read function prototype. - --- amd64/src/shared/linux_osl.c | 12 +++++++++++- - 1 file changed, 11 insertions(+), 1 deletion(-) + i386/src/shared/linux_osl.c | 4 ++++ + 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/amd64/src/shared/linux_osl.c b/amd64/src/shared/linux_osl.c -index 9adc392..3aa48bf 100644 +index 9adc392..b24a973 100644 --- a/amd64/src/shared/linux_osl.c +++ b/amd64/src/shared/linux_osl.c @@ -1076,11 +1076,21 @@ osl_os_get_image_block(char *buf, int len, void *image) @@ -24,15 +24,31 @@ - rdlen = kernel_read(fp, fp->f_pos, buf, len); + pos = fp->f_pos; -+ rdlen = kernel_read(fp, ++ rdlen = kernel_read(fp, +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0) -+ pos, ++ pos, +#endif + buf, len +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0) -+ ,&pos ++ ,&pos +#endif + ); if (rdlen > 0) fp->f_pos += rdlen; +diff --git a/i386/src/shared/linux_osl.c b/i386/src/shared/linux_osl.c +index 6157d18..3188745 100644 +--- a/i386/src/shared/linux_osl.c ++++ b/i386/src/shared/linux_osl.c +@@ -1076,7 +1076,11 @@ osl_os_get_image_block(char *buf, int len, void *image) + if (!image) + return 0; + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0) ++ rdlen = kernel_read(fp, buf, len, &fp->f_pos); ++#else + rdlen = kernel_read(fp, fp->f_pos, buf, len); ++#endif + if (rdlen > 0) + fp->f_pos += rdlen; + diff -Nru broadcom-sta-6.30.223.271/debian/patches/22-linux51.patch broadcom-sta-6.30.223.271/debian/patches/22-linux51.patch --- broadcom-sta-6.30.223.271/debian/patches/22-linux51.patch 1969-12-31 21:00:00.000000000 -0300 +++ broadcom-sta-6.30.223.271/debian/patches/22-linux51.patch 2019-11-13 16:10:21.000000000 -0300 @@ -0,0 +1,49 @@ +From: Colin Ian King +Date: Thu, 6 Jun 2019 16:24:01 +0000 +Subject: Add Linux 5.1+ compat fix for deprecated get_ds call +Origin: https://bugs.debian.org/928754 https://bugs.debian.org/934677 +Bug-Ubuntu: https://bugs.launchpad.net/bugs/1830042 + + This adds a compat fix for the deprecated get_ds helper function. For + Linux 5.1 onwards this was replaced with KERNEL_DS, see Linux commit + commit 736706bee3298208343a76096370e4f6a5c55915 + ("get rid of legacy 'get_ds()' function") + . + Signed-off-by: Colin Ian King +--- + amd64/src/wl/sys/wl_cfg80211_hybrid.c | 4 ++++ + i386/src/wl/sys/wl_cfg80211_hybrid.c | 4 ++++ + 2 files changed, 8 insertions(+) + +diff --git a/amd64/src/wl/sys/wl_cfg80211_hybrid.c b/amd64/src/wl/sys/wl_cfg80211_hybrid.c +index 1ec2ef3..8e01841 100644 +--- a/amd64/src/wl/sys/wl_cfg80211_hybrid.c ++++ b/amd64/src/wl/sys/wl_cfg80211_hybrid.c +@@ -457,7 +457,11 @@ wl_dev_ioctl(struct net_device *dev, u32 cmd, void *arg, u32 len) + ifr.ifr_data = (caddr_t)&ioc; + + fs = get_fs(); ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 1, 0) + set_fs(get_ds()); ++#else ++ set_fs(KERNEL_DS); ++#endif + #if defined(WL_USE_NETDEV_OPS) + err = dev->netdev_ops->ndo_do_ioctl(dev, &ifr, SIOCDEVPRIVATE); + #else +diff --git a/i386/src/wl/sys/wl_cfg80211_hybrid.c b/i386/src/wl/sys/wl_cfg80211_hybrid.c +index 7b606e0..2489bbb 100644 +--- a/i386/src/wl/sys/wl_cfg80211_hybrid.c ++++ b/i386/src/wl/sys/wl_cfg80211_hybrid.c +@@ -450,7 +450,11 @@ wl_dev_ioctl(struct net_device *dev, u32 cmd, void *arg, u32 len) + ifr.ifr_data = (caddr_t)&ioc; + + fs = get_fs(); ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 1, 0) + set_fs(get_ds()); ++#else ++ set_fs(KERNEL_DS); ++#endif + #if defined(WL_USE_NETDEV_OPS) + err = dev->netdev_ops->ndo_do_ioctl(dev, &ifr, SIOCDEVPRIVATE); + #else diff -Nru broadcom-sta-6.30.223.271/debian/patches/series broadcom-sta-6.30.223.271/debian/patches/series --- broadcom-sta-6.30.223.271/debian/patches/series 2018-02-13 18:45:18.000000000 -0200 +++ broadcom-sta-6.30.223.271/debian/patches/series 2019-11-13 16:10:21.000000000 -0300 @@ -12,3 +12,4 @@ 19-linux412.patch 20-linux414.patch 21-linux415.patch +22-linux51.patch