From: Tijs Van Buggenhout <tvb@able.be>
To: backports@vger.kernel.org, linux-wireless@vger.kernel.org
Cc: tvb@able.be
Subject: [wireless] [b43] [brcmsmac] [3.3.8]: backport bcma_core_pci_up/down from 3.12
Date: Fri, 14 Mar 2014 20:51:19 +0100 [thread overview]
Message-ID: <1423990.vA4A9XhDx1@tijs> (raw)
commit 6273720de27b0dbd278f823d9c99d40122f41d63
Author: Tijs Van Buggenhout <tijs.van.buggenhout@vasco.com>
Date: Fri Mar 14 20:42:21 2014 +0100
Backport bcma_core_pci_up/down from 3.12
Compiling module b43 from compat-wireless-2014-01-23.1 for 3.3.8 kernel
results in build errors like so:
...
CC [M] /compat-wireless-2014-01-23.1/compat/backport-3.13.o
CC [M] /compat-wireless-2014-01-23.1/compat/dma-shared-helpers.o
LD [M] /compat-wireless-2014-01-23.1/compat/compat.o
CC [M] /compat-wireless-2014-01-23.1/drivers/net/wireless/b43/main.o
/compat-wireless-2014-01-23.1/drivers/net/wireless/b43/main.c: In function
'b43_wireless_core_exit':
/compat-wireless-2014-01-23.1/drivers/net/wireless/b43/main.c:4680:3: error:
implicit declaration of function 'bcma_core_pci_down' [-Werror=implicit-
function-declaration]
/compat-wireless-2014-01-23.1/drivers/net/wireless/b43/main.c: In function
'b43_wireless_core_init':
/compat-wireless-2014-01-23.1/drivers/net/wireless/b43/main.c:4729:3: error:
implicit declaration of function 'bcma_core_pci_up' [-Werror=implicit-
function-declaration]
cc1: some warnings being treated as errors
make[9]: *** [/compat-wireless-2014-01-23.1/drivers/net/wireless/b43/main.o]
Error 1
make[8]: *** [/compat-wireless-2014-01-23.1/drivers/net/wireless/b43] Error 2
make[7]: *** [/compat-wireless-2014-01-23.1/drivers/net/wireless] Error 2
make[6]: *** [_module_/compat-wireless-2014-01-23.1] Error 2
make[5]: *** [modules] Error 2
make[4]: *** [modules] Error 2
make[3]: *** [modules] Error 2
make[3]: Leaving directory `/compat-wireless-2014-01-23.1'
make[2]: *** [/compat-wireless-2014-01-23.1/.built] Error 2
bcma_core_pci_up and bcma_core_pci_down are used in b43/main.c and
brcmsmac/main.c, but are only introduced in kernel 3.12.0. The following patch
adds a backport of these functions for earlier kernel versions. Tested patch
on b43 and ath9k driver.
Signed-off-by: Tijs Van Buggenhout <tvb@able.be>
--
diff --git a/backport/backport-include/linux/bcma/bcma_driver_pci.h b/backport/backport-include/linux/bcma/bcma_driver_pci.h
new file mode 100644
index 0000000..5e52f04
--- /dev/null
+++ b/backport/backport-include/linux/bcma/bcma_driver_pci.h
@@ -0,0 +1,14 @@
+#ifndef __BACKPORT_BCMA_DRIVER_PCI_H
+#define __BACKPORT_BCMA_DRIVER_PCI_H
+#include_next <linux/bcma/bcma_driver_pci.h>
+#include <linux/version.h>
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,12,0)
+struct bcma_bus;
+#define bcma_core_pci_up LINUX_BACKPORT(bcma_core_pci_up)
+extern void bcma_core_pci_up(struct bcma_bus *bus);
+#define bcma_core_pci_down LINUX_BACKPORT(bcma_core_pci_down)
+extern void bcma_core_pci_down(struct bcma_bus *bus);
+#endif
+
+#endif /* __BACKPORT_BCMA_DRIVER_PCI_H */
diff --git a/backport/compat/backport-3.12.c b/backport/compat/backport-3.12.c
index 7e3dc58..5f0edb2 100644
--- a/backport/compat/backport-3.12.c
+++ b/backport/compat/backport-3.12.c
@@ -27,3 +27,33 @@ u8 *hid_alloc_report_buf(struct hid_report *report, gfp_t flags)
return kmalloc(len, flags);
}
EXPORT_SYMBOL_GPL(hid_alloc_report_buf);
+
+#if defined(CONFIG_BCMA) || defined(CONFIG_BCMA_MODULE)
+#include <linux/bcma/bcma.h>
+
+void bcma_core_pci_up(struct bcma_bus *bus)
+{
+ struct bcma_drv_pci *pc;
+
+ if (bus->hosttype != BCMA_HOSTTYPE_PCI)
+ return;
+
+ pc = &bus->drv_pci[0];
+
+ bcma_core_pci_extend_L1timer(pc, true);
+}
+EXPORT_SYMBOL_GPL(bcma_core_pci_up);
+
+void bcma_core_pci_down(struct bcma_bus *bus)
+{
+ struct bcma_drv_pci *pc;
+
+ if (bus->hosttype != BCMA_HOSTTYPE_PCI)
+ return;
+
+ pc = &bus->drv_pci[0];
+
+ bcma_core_pci_extend_L1timer(pc, false);
+}
+EXPORT_SYMBOL_GPL(bcma_core_pci_down);
+#endif
next reply other threads:[~2014-03-14 19:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-14 19:51 Tijs Van Buggenhout [this message]
2014-04-02 2:33 ` [wireless] [b43] [brcmsmac] [3.3.8]: backport bcma_core_pci_up/down from 3.12 Luis R. Rodriguez
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1423990.vA4A9XhDx1@tijs \
--to=tvb@able.be \
--cc=backports@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox