net: wireless: bcmdhd: Update to Version 5.90.195.22
Dmitry Shmidt [Tue, 24 Jan 2012 21:55:00 +0000 (13:55 -0800)]
- Disable Ad-hoc support for cfg80211
- dhd_linux.c: Fix incorrect pid check
- Merge Android changes from Android tree

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

drivers/net/wireless/bcmdhd/bcmsdh_linux.c
drivers/net/wireless/bcmdhd/bcmsdh_sdmmc_linux.c
drivers/net/wireless/bcmdhd/dhd_linux.c
drivers/net/wireless/bcmdhd/dhd_sdio.c
drivers/net/wireless/bcmdhd/hndpmu.c
drivers/net/wireless/bcmdhd/include/bcmdevs.h
drivers/net/wireless/bcmdhd/include/epivers.h
drivers/net/wireless/bcmdhd/siutils.c
drivers/net/wireless/bcmdhd/wl_cfg80211.c

index 8d38a9a..90f5548 100644 (file)
@@ -21,7 +21,7 @@
  * software in any way with any other Broadcom software provided under a license
  * other than the GPL, without Broadcom's express prior written consent.
  *
- * $Id: bcmsdh_linux.c 294990 2011-11-09 00:13:10Z $
+ * $Id: bcmsdh_linux.c 308641 2012-01-17 02:18:02Z $
  */
 
 /**
@@ -148,17 +148,6 @@ static int __devexit bcmsdh_remove_bcmdhd(struct device *dev);
 #endif /* BCMLXSDMMC */
 
 #ifndef BCMLXSDMMC
-static struct device_driver bcmsdh_driver = {
-       .name           = "pxa2xx-mci",
-       .bus            = &platform_bus_type,
-       .probe          = bcmsdh_probe_bcmdhd,
-       .remove         = bcmsdh_remove_bcmdhd,
-       .suspend        = NULL,
-       .resume         = NULL,
-       };
-#endif /* BCMLXSDMMC */
-
-#ifndef BCMLXSDMMC
 static
 #endif /* BCMLXSDMMC */
 int bcmsdh_probe_bcmdhd(struct device *dev)
@@ -534,13 +523,8 @@ bcmsdh_register(bcmsdh_driver_t *driver)
        drvinfo = *driver;
 
 #if defined(BCMPLATFORM_BUS)
-#if defined(BCMLXSDMMC)
        SDLX_MSG(("Linux Kernel SDIO/MMC Driver\n"));
        error = sdio_function_init();
-#else
-       SDLX_MSG(("Intel PXA270 SDIO Driver\n"));
-       error = driver_register(&bcmsdh_driver);
-#endif /* defined(BCMLXSDMMC) */
        return error;
 #endif /* defined(BCMPLATFORM_BUS) */
 
@@ -568,14 +552,12 @@ bcmsdh_unregister(void)
        if (bcmsdh_pci_driver.node.next)
 #endif
 
-#if defined(BCMPLATFORM_BUS) && !defined(BCMLXSDMMC)
-               driver_unregister(&bcmsdh_driver);
-#endif
 #if defined(BCMLXSDMMC)
        sdio_function_cleanup();
 #endif /* BCMLXSDMMC */
+
 #if !defined(BCMPLATFORM_BUS) && !defined(BCMLXSDMMC)
-               pci_unregister_driver(&bcmsdh_pci_driver);
+       pci_unregister_driver(&bcmsdh_pci_driver);
 #endif /* BCMPLATFORM_BUS */
 }
 
index 08b1f49..2234378 100644 (file)
@@ -21,7 +21,7 @@
  * software in any way with any other Broadcom software provided under a license
  * other than the GPL, without Broadcom's express prior written consent.
  *
- * $Id: bcmsdh_sdmmc_linux.c 300908 2011-12-06 10:32:01Z $
+ * $Id: bcmsdh_sdmmc_linux.c 308645 2012-01-17 02:33:26Z $
  */
 
 #include <typedefs.h>
 #if !defined(SDIO_DEVICE_ID_BROADCOM_4330)
 #define SDIO_DEVICE_ID_BROADCOM_4330   0x4330
 #endif /* !defined(SDIO_DEVICE_ID_BROADCOM_4330) */
+#if !defined(SDIO_DEVICE_ID_BROADCOM_4334)
+#define SDIO_DEVICE_ID_BROADCOM_4334    0x4334
+#endif /* !defined(SDIO_DEVICE_ID_BROADCOM_4334) */
+#if !defined(SDIO_DEVICE_ID_BROADCOM_43239)
+#define SDIO_DEVICE_ID_BROADCOM_43239    43239
+#endif /* !defined(SDIO_DEVICE_ID_BROADCOM_43239) */
 
 #include <bcmsdh_sdmmc.h>
 
@@ -153,9 +159,9 @@ static const struct sdio_device_id bcmsdh_sdmmc_ids[] = {
        { SDIO_DEVICE(SDIO_VENDOR_ID_BROADCOM, SDIO_DEVICE_ID_BROADCOM_4325) },
        { SDIO_DEVICE(SDIO_VENDOR_ID_BROADCOM, SDIO_DEVICE_ID_BROADCOM_4319) },
        { SDIO_DEVICE(SDIO_VENDOR_ID_BROADCOM, SDIO_DEVICE_ID_BROADCOM_4330) },
-#ifndef BOARD_PANDA
+       { SDIO_DEVICE(SDIO_VENDOR_ID_BROADCOM, SDIO_DEVICE_ID_BROADCOM_4334) },
+       { SDIO_DEVICE(SDIO_VENDOR_ID_BROADCOM, SDIO_DEVICE_ID_BROADCOM_43239) },
        { SDIO_DEVICE_CLASS(SDIO_CLASS_NONE)            },
-#endif
        { /* end: all zeroes */                         },
 };
 
@@ -170,11 +176,14 @@ static int bcmsdh_sdmmc_suspend(struct device *pdev)
 
        if (func->num != 2)
                return 0;
+
+       sd_trace(("%s Enter\n", __FUNCTION__));
+
        if (dhd_os_check_wakelock(bcmsdh_get_drvdata()))
                return -EBUSY;
 #if defined(OOB_INTR_ONLY)
        bcmsdh_oob_intr_set(0);
-#endif
+#endif /* defined(OOB_INTR_ONLY) */
        smp_mb();
 
        sdio_flags = sdio_get_host_pm_caps(func);
@@ -203,11 +212,13 @@ static int bcmsdh_sdmmc_resume(struct device *pdev)
 {
        struct sdio_func *func = dev_to_sdio_func(pdev);
 
+       sd_trace(("%s Enter\n", __FUNCTION__));
        dhd_mmc_suspend = FALSE;
 #if defined(OOB_INTR_ONLY)
        if ((func->num == 2) && dhd_os_check_if_up(bcmsdh_get_drvdata()))
                bcmsdh_oob_intr_set(1);
-#endif
+#endif /* (OOB_INTR_ONLY) */
+
        smp_mb();
        return 0;
 }
@@ -216,7 +227,7 @@ static const struct dev_pm_ops bcmsdh_sdmmc_pm_ops = {
        .suspend        = bcmsdh_sdmmc_suspend,
        .resume         = bcmsdh_sdmmc_resume,
 };
-#endif
+#endif  /* (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 39)) && defined(CONFIG_PM) */
 
 static struct sdio_driver bcmsdh_sdmmc_driver = {
        .probe          = bcmsdh_sdmmc_probe,
@@ -227,7 +238,7 @@ static struct sdio_driver bcmsdh_sdmmc_driver = {
        .drv = {
                .pm     = &bcmsdh_sdmmc_pm_ops,
        },
-#endif
+#endif /* (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 39)) && defined(CONFIG_PM) */
 };
 
 struct sdos_info {
index 0ebd4c2..4bd2e39 100644 (file)
@@ -1149,7 +1149,7 @@ dhd_set_mac_address(struct net_device *dev, void *addr)
        if (ifidx == DHD_BAD_IF)
                return -1;
 
-       ASSERT(&dhd->thr_sysioc_ctl.thr_pid >= 0);
+       ASSERT(dhd->thr_sysioc_ctl.thr_pid >= 0);
        memcpy(&dhd->macvalue, sa->sa_data, ETHER_ADDR_LEN);
        dhd->set_macaddress = TRUE;
        up(&dhd->thr_sysioc_ctl.sema);
@@ -1167,7 +1167,7 @@ dhd_set_multicast_list(struct net_device *dev)
        if (ifidx == DHD_BAD_IF)
                return;
 
-       ASSERT(&dhd->thr_sysioc_ctl.thr_pid >= 0);
+       ASSERT(dhd->thr_sysioc_ctl.thr_pid >= 0);
        dhd->iflist[ifidx]->set_multicast = TRUE;
        up(&dhd->thr_sysioc_ctl.sema);
 }
@@ -2509,7 +2509,7 @@ dhd_add_if(dhd_info_t *dhd, int ifidx, void *handle, char *name,
                ifp->state = DHD_IF_ADD;
                ifp->idx = ifidx;
                ifp->bssidx = bssidx;
-               ASSERT(&dhd->thr_sysioc_ctl.thr_pid >= 0);
+               ASSERT(dhd->thr_sysioc_ctl.thr_pid >= 0);
                up(&dhd->thr_sysioc_ctl.sema);
        } else
                ifp->net = (struct net_device *)handle;
@@ -2533,7 +2533,7 @@ dhd_del_if(dhd_info_t *dhd, int ifidx)
 
        ifp->state = DHD_IF_DEL;
        ifp->idx = ifidx;
-       ASSERT(&dhd->thr_sysioc_ctl.thr_pid >= 0);
+       ASSERT(dhd->thr_sysioc_ctl.thr_pid >= 0);
        up(&dhd->thr_sysioc_ctl.sema);
 }
 
@@ -3590,7 +3590,7 @@ void dhd_detach(dhd_pub_t *dhdp)
        }
 #endif /* defined(CONFIG_BCMDHD_WEXT) */
 
-       if (&dhd->thr_sysioc_ctl.thr_pid >= 0) {
+       if (dhd->thr_sysioc_ctl.thr_pid >= 0) {
                PROC_STOP(&dhd->thr_sysioc_ctl);
        }
 
index 5806c66..a89195a 100644 (file)
@@ -21,7 +21,7 @@
  * software in any way with any other Broadcom software provided under a license
  * other than the GPL, without Broadcom's express prior written consent.
  *
- * $Id: dhd_sdio.c 303389 2011-12-16 09:30:48Z $
+ * $Id: dhd_sdio.c 308574 2012-01-16 22:56:40Z $
  */
 
 #include <typedefs.h>
@@ -851,8 +851,10 @@ dhdsdio_bussleep(dhd_bus_t *bus, bool sleep)
                                 SBSDIO_FORCE_HW_CLKREQ_OFF, NULL);
 
                /* Isolate the bus */
-               bcmsdh_cfg_write(sdh, SDIO_FUNC_1, SBSDIO_DEVICE_CTL,
-                                SBSDIO_DEVCTL_PADS_ISO, NULL);
+               if (bus->sih->chip != BCM4329_CHIP_ID && bus->sih->chip != BCM4319_CHIP_ID) {
+                       bcmsdh_cfg_write(sdh, SDIO_FUNC_1, SBSDIO_DEVICE_CTL,
+                               SBSDIO_DEVCTL_PADS_ISO, NULL);
+               }
 
                /* Change state */
                bus->sleeping = TRUE;
@@ -5191,6 +5193,9 @@ dhdsdio_chipmatch(uint16 chipid)
                return TRUE;
        if (chipid == BCM4330_CHIP_ID)
                return TRUE;
+       if (chipid == BCM43239_CHIP_ID)
+               return TRUE;
+
        return FALSE;
 }
 
index 111b5be..0e49334 100644 (file)
@@ -140,11 +140,27 @@ si_sdiod_drive_strength_init(si_t *sih, osl_t *osh, uint32 drivestrength)
                str_mask = 0x00003800;
                str_shift = 11;
                break;
+       case SDIOD_DRVSTR_KEY(BCM4336_CHIP_ID, 8):
+       case SDIOD_DRVSTR_KEY(BCM4336_CHIP_ID, 11):
+               if (sih->pmurev == 8) {
+                       str_tab = (sdiod_drive_str_t *)&sdiod_drive_strength_tab3;
+               }
+               else if (sih->pmurev == 11) {
+                       str_tab = (sdiod_drive_str_t *)&sdiod_drive_strength_tab4_1v8;
+               }
+               str_mask = 0x00003800;
+               str_shift = 11;
+               break;
        case SDIOD_DRVSTR_KEY(BCM4330_CHIP_ID, 12):
                str_tab = (sdiod_drive_str_t *)&sdiod_drive_strength_tab4_1v8;
                str_mask = 0x00003800;
                str_shift = 11;
                break;
+       case SDIOD_DRVSTR_KEY(BCM43362_CHIP_ID, 13):
+               str_tab = (sdiod_drive_str_t *)&sdiod_drive_strength_tab5_1v8;
+               str_mask = 0x00003800;
+               str_shift = 11;
+               break;
        default:
                PMU_MSG(("No SDIO Drive strength init done for chip %s rev %d pmurev %d\n",
                         bcm_chipname(sih->chip, chn, 8), sih->chiprev, sih->pmurev));
index f0542f2..ee01d8b 100644 (file)
 #define BCM_DNGL_BL_PID_4328   0xbd12
 #define BCM_DNGL_BL_PID_4322   0xbd13
 #define BCM_DNGL_BL_PID_4319    0xbd16
+#define BCM_DNGL_BL_PID_43236   0xbd17
 #define BCM_DNGL_BL_PID_4332   0xbd18
 #define BCM_DNGL_BL_PID_4330   0xbd19
+#define BCM_DNGL_BL_PID_43239   0xbd1b
 #define BCM_DNGL_BDC_PID       0x0bdc
 #define BCM_DNGL_JTAG_PID      0x4a44
 
index a0e9ed1..f82ee10 100644 (file)
 
 #define        EPI_RC_NUMBER           195
 
-#define        EPI_INCREMENTAL_NUMBER  19
+#define        EPI_INCREMENTAL_NUMBER  22
 
 #define        EPI_BUILD_NUMBER        0
 
-#define        EPI_VERSION             5, 90, 195, 19
+#define        EPI_VERSION             5, 90, 195, 22
 
-#define        EPI_VERSION_NUM         0x055ac313
+#define        EPI_VERSION_NUM         0x055ac316
 
 #define EPI_VERSION_DEV                5.90.195
 
 
-#define        EPI_VERSION_STR         "5.90.195.19"
+#define        EPI_VERSION_STR         "5.90.195.22"
 
 #endif 
index 4b71563..1cc977f 100644 (file)
@@ -1901,6 +1901,9 @@ si_is_sprom_available(si_t *sih)
                return (sih->chipst & CST4330_SPROM_PRESENT) != 0;
        case BCM4313_CHIP_ID:
                return (sih->chipst & CST4313_SPROM_PRESENT) != 0;
+       case BCM43239_CHIP_ID:
+               return ((sih->chipst & CST43239_SPROM_MASK) &&
+                       !(sih->chipst & CST43239_SFLASH_MASK));
        default:
                return TRUE;
        }
index b84d1e8..79016b5 100644 (file)
@@ -4213,8 +4213,8 @@ static s32 wl_setup_wiphy(struct wireless_dev *wdev, struct device *sdiofunc_dev
        wdev->wiphy->max_scan_ssids = WL_SCAN_PARAMS_SSID_MAX;
        wdev->wiphy->max_num_pmkids = WL_NUM_PMKIDS_MAX;
        wdev->wiphy->interface_modes =
-           BIT(NL80211_IFTYPE_STATION) | BIT(NL80211_IFTYPE_ADHOC)
-           | BIT(NL80211_IFTYPE_AP) | BIT(NL80211_IFTYPE_MONITOR);
+               BIT(NL80211_IFTYPE_STATION)
+               | BIT(NL80211_IFTYPE_AP) | BIT(NL80211_IFTYPE_MONITOR);
 
        wdev->wiphy->bands[IEEE80211_BAND_2GHZ] = &__wl_band_2ghz;
        wdev->wiphy->bands[IEEE80211_BAND_5GHZ] = &__wl_band_5ghz_a;
@@ -5615,6 +5615,13 @@ static s32 wl_escan_handler(struct wl_priv *wl,
                        goto exit;
                }
 
+               if (!(wl_to_wiphy(wl)->interface_modes & BIT(NL80211_IFTYPE_ADHOC))) {
+                       if (dtoh16(bi->capability) & DOT11_CAP_IBSS) {
+                               WL_ERR(("Ignoring IBSS result\n"));
+                               goto exit;
+                       }
+               }
+
                if (wl_get_drv_status_all(wl, SENDING_ACT_FRM)) {
                        p2p_dev_addr = wl_cfgp2p_retreive_p2p_dev_addr(bi, bi_length);
                        if (p2p_dev_addr && !memcmp(p2p_dev_addr,