]> rtime.felk.cvut.cz Git - hercules2020/nv-tegra/linux-4.4.git/commitdiff
net: wireless: bcmdhd: fix bcmdhd driver issues
authorManikanta <mmaddireddy@nvidia.com>
Thu, 5 May 2016 15:42:25 +0000 (21:12 +0530)
committerManikanta Maddireddy <mmaddireddy@nvidia.com>
Tue, 14 Jun 2016 11:38:12 +0000 (04:38 -0700)
- Support both SDIO & PCIE driver
- Fix skb processing in kernel version greater than 3.18
- Include errorno.h file to handle compilation error
if CONFIG_PM_SLEEP is disabled
- dhd_mmc_suspend is kept under CONFIG_PM except
during declaration. Correct this issue to fix
compilation error

bug 200195006

Change-Id: I4a961048aa2bb6b0bc6382b452da2ed66de47d1e
Signed-off-by: Manikanta <mmaddireddy@nvidia.com>
Reviewed-on: http://git-master/r/1163823
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
drivers/net/wireless/bcmdhd/Kconfig
drivers/net/wireless/bcmdhd/Makefile
drivers/net/wireless/bcmdhd/dhd_custom_sysfs_tegra.c
drivers/net/wireless/bcmdhd/dhd_linux.c
drivers/net/wireless/bcmdhd/dhd_wlfc.c
drivers/net/wireless/bcmdhd/hnd_pktq.c
drivers/net/wireless/bcmdhd_pcie/Kconfig

index c27f772b2f92af3aa345506924980647415aa3ef..62a80a154f1123022c584c314102b73d541351de 100644 (file)
@@ -13,7 +13,7 @@ config BCMDHD_SDIO
 
 config BCMDHD_PCIE
        bool "PCIe bus interface support"
-       depends on BCMDHD && PCI && !BCMDHD_SDIO
+       depends on BCMDHD && PCI
 
 config BCMDYNAMIC
        bool "Broadcom 43241/4352 wireless card support"
index 5259c1221c866a45543d99bde2725b88121564bb..edbfb979a70ded0a51960eaf45c3f76318f0020f 100755 (executable)
@@ -225,10 +225,6 @@ else
   DHDCFLAGS += -DSDIO_ISR_THREAD
 endif
 
-ifneq ($(CONFIG_BCMDHD_PCIE),)
-  DHDCFLAGS += -DPCIE_FULL_DONGLE -DBCMPCIE -DCUSTOM_DPC_PRIO_SETTING=-1
-endif
-
 #EXTRA_LDFLAGS += --strip-debug
 
 EXTRA_CFLAGS += -Wno-date-time
@@ -249,11 +245,6 @@ ifneq ($(CONFIG_BCMDHD_SDIO),)
   DHDOFILES += dhd_cdc.o dhd_wlfc.o dhd_sdio.o dhd_qmon.o
 endif
 
-ifneq ($(CONFIG_BCMDHD_PCIE),)
-  DHDOFILES += dhd_pcie.o dhd_pcie_linux.o dhd_msgbuf.o dhd_flowring.o
-  DHDOFILES += pcie_core.o
-endif
-
 ifneq ($(CONFIG_BCMDHD_CUSTOM_SYSFS_TEGRA),)
   DHDOFILES += dhd_custom_sysfs_tegra.o
   DHDOFILES += dhd_custom_sysfs_tegra_ping.o
index c73a67644d8e76a9ee2e3470ea61accad301197a..2b6a9e5bbbd2fa486e9a5dbef4bcfdfa1a79bfe3 100644 (file)
@@ -16,6 +16,7 @@
  *
  */
 
+#include <linux/errno.h>
 #include <linux/system-wakeup.h>
 #include "dhd_custom_sysfs_tegra.h"
 #include "dhd_custom_sysfs_tegra_scan.h"
index 8d6f238729e3b9d9edb146868ef183396518fb19..3706be7186981364c5d1966c5e42a90e6161d2b1 100644 (file)
@@ -230,11 +230,11 @@ static struct notifier_block dhd_inet6addr_notifier = {
 static bool dhd_inet6addr_notifier_registered = FALSE;
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)) && defined(CONFIG_PM_SLEEP)
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)) && defined(CONFIG_PM)
 #include <linux/suspend.h>
 volatile bool dhd_mmc_suspend = FALSE;
 DECLARE_WAIT_QUEUE_HEAD(dhd_dpc_wait);
-#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)) && defined(CONFIG_PM_SLEEP) */
+#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)) && defined(CONFIG_PM) */
 
 #if defined(OOB_INTR_ONLY)
 extern void dhd_enable_oob_intr(struct dhd_bus *bus, bool enable);
index cd8dc675e05c4a4a00adb0fc17d2ee69ce8aab8d..4e36bb12981df53b17bca19d17b80db2134a117c 100644 (file)
@@ -111,7 +111,8 @@ _dhd_wlfc_prec_enque(struct pktq *pq, int prec, void* p, bool qHead,
 
 
        ASSERT(prec >= 0 && prec < pq->num_prec);
-       ASSERT(PKTLINK(p) == NULL);         /* queueing chains not allowed */
+       /* queueing chains not allowed */
+       ASSERT(!((PKTLINK(p) != NULL) && (PKTLINK(p) != p)));
 
        ASSERT(!pktq_full(pq));
        ASSERT(!pktq_pfull(pq, prec));
index f4225b6c400e98a0a1596eedd5ebb127a7bfd19c..1cbd54a68e2c8ad1a310185cf5053736e9f8fc65 100644 (file)
@@ -39,10 +39,12 @@ pktq_penq(struct pktq *pq, int prec, void *p)
        struct pktq_prec *q;
 
        ASSERT(prec >= 0 && prec < pq->num_prec);
-       ASSERT(PKTLINK(p) == NULL);         /* queueing chains not allowed */
+       /* queueing chains not allowed */
+       ASSERT(!((PKTLINK(p) != NULL) && (PKTLINK(p) != p)));
 
        ASSERT(!pktq_full(pq));
        ASSERT(!pktq_pfull(pq, prec));
+       PKTSETLINK(p, NULL);
 
        q = &pq->q[prec];
 
@@ -68,10 +70,12 @@ pktq_penq_head(struct pktq *pq, int prec, void *p)
        struct pktq_prec *q;
 
        ASSERT(prec >= 0 && prec < pq->num_prec);
-       ASSERT(PKTLINK(p) == NULL);         /* queueing chains not allowed */
+       /* queueing chains not allowed */
+       ASSERT(!((PKTLINK(p) != NULL) && (PKTLINK(p) != p)));
 
        ASSERT(!pktq_full(pq));
        ASSERT(!pktq_pfull(pq, prec));
+       PKTSETLINK(p, NULL);
 
        q = &pq->q[prec];
 
index e52d67da615365470899b7dc5f8a38f0f0a4ab8e..b9162ba202643e80af4c1caabfecad6aaeeb461d 100644 (file)
@@ -9,7 +9,7 @@ config BCMDHD
 
 config BCMDHD_PCIE
        bool "PCIe bus interface support"
-       depends on BCMDHD && PCI && !BCMDHD_SDIO
+       depends on BCMDHD && PCI
 
 config BCM4359
        tristate "BCM4359 support"