summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorDong Aisheng <b29396@freescale.com>2015-04-09 16:36:06 +0800
committerDong Aisheng <b29396@freescale.com>2015-06-08 11:31:54 +0800
commitadb5c4679eef30af100ec3379530bb07f8ea4fa8 (patch)
tree5ed048e10de5743ea5a91aa28bfe008a45a3c573 /drivers
parent77261efaa267e173d01c12152a831371cb801a4e (diff)
MLK-11065-7 bcmdhd: call wifi_card_detect in wifi_platform_bus_enumerate
Without this, WiFi can not work when re-insmod module because the card is not reset in rmmod. Signed-off-by: Dong Aisheng <b29396@freescale.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/bcmdhd/dhd_linux_platdev.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/drivers/net/wireless/bcmdhd/dhd_linux_platdev.c b/drivers/net/wireless/bcmdhd/dhd_linux_platdev.c
index 5e8a57fb4780..a4bbb83695aa 100644
--- a/drivers/net/wireless/bcmdhd/dhd_linux_platdev.c
+++ b/drivers/net/wireless/bcmdhd/dhd_linux_platdev.c
@@ -201,6 +201,37 @@ int wifi_platform_set_power(wifi_adapter_info_t *adapter, bool on, unsigned long
return err;
}
+#if 1
+/* Murata debug: this function is re-worked because "wifi_plat_data" is NULL. */
+/* Need to investigate how this pointer/data is being passed into probe function. */
+/* "wifi_plat_data" used to be "wifi_ctrl". */
+/* All this code is done for only one reason -- calling mmc_detect_change() in /drivers/mmc/core/core.c. */
+extern void wifi_card_detect(void);
+int wifi_platform_bus_enumerate(wifi_adapter_info_t *adapter, bool device_present)
+{
+ int err = 0;
+ struct wifi_platform_data *plat_data;
+
+ if (!adapter) {
+ pr_err("!!!! %s: failed! adapter variable is NULL!!!!!\n", __FUNCTION__);
+ return -EINVAL;
+ }
+
+ DHD_ERROR(("%s device present %d\n", __FUNCTION__, device_present));
+
+ if (!adapter->wifi_plat_data) {
+ wifi_card_detect(); /* hook for card_detect */
+ } else {
+ plat_data = adapter->wifi_plat_data;
+ if (plat_data->set_carddetect)
+ err = plat_data->set_carddetect(device_present);
+ }
+
+ return 0; /* force success status returned */
+}
+
+#else
+
int wifi_platform_bus_enumerate(wifi_adapter_info_t *adapter, bool device_present)
{
int err = 0;
@@ -217,6 +248,7 @@ int wifi_platform_bus_enumerate(wifi_adapter_info_t *adapter, bool device_presen
return err;
}
+#endif
int wifi_platform_get_mac_addr(wifi_adapter_info_t *adapter, unsigned char *buf)
{