Update BCM4329 Wifi drivers to the glacier version
/drivers/net/wireless/bcm4329_204/dhd_linux.c
blob:44da2c7c1244ec903a3821a143f30d30133ca0e6 -> blob:ab4382205cb92d1a052ce5bb450bef220e117801
--- drivers/net/wireless/bcm4329_204/dhd_linux.c
+++ drivers/net/wireless/bcm4329_204/dhd_linux.c
@@ -99,6 +99,14 @@ int wifi_get_dot11n_enable(void)
return 0;
}
+int wifi_get_cscan_enable(void)
+{
+ if (wifi_control_data && wifi_control_data->cscan_enable) {
+ return wifi_control_data->cscan_enable;
+ }
+ return 0;
+}
+
int wifi_set_carddetect(int on)
{
myprintf("%s = %d\n", __FUNCTION__, on);
@@ -853,6 +861,8 @@ _dhd_sysioc_thread(void *data)
}
dhd_os_wake_unlock(&dhd->pub);
}
+
+ myprintf("%s exit\n", __func__);
complete_and_exit(&dhd->sysioc_exited, 0);
}
@@ -865,6 +875,14 @@ dhd_set_mac_address(struct net_device *d
struct sockaddr *sa = (struct sockaddr *)addr;
int ifidx;
+ myprintf("enter %s\n", __func__);
+
+ /* BRCM: anthony, add for debug, reject if down */
+ if ( !dhd->pub.up || (dhd->pub.busstate == DHD_BUS_DOWN)) {
+ printk("%s: dhd is down. skip it.\n", __func__);
+ return -ENODEV;
+ }
+
ifidx = dhd_net2idx(dhd, dev);
if (ifidx == DHD_BAD_IF)
return -1;
@@ -883,6 +901,15 @@ dhd_set_multicast_list(struct net_device
dhd_info_t *dhd = *(dhd_info_t **)netdev_priv(dev);
int ifidx;
+
+ myprintf("enter %s\n", __func__);
+
+ /* BRCM: anthoy, add for debug, reject if down */
+ if ( !dhd->pub.up || (dhd->pub.busstate == DHD_BUS_DOWN) ) {
+ printk("%s: dhd is down. skip it.\n", __func__);
+ return;
+ }
+
ifidx = dhd_net2idx(dhd, dev);
if (ifidx == DHD_BAD_IF)
return;
@@ -1208,7 +1235,7 @@ dhd_watchdog_thread(void *data)
else
break;
}
-
+ myprintf("%s exit\n", __func__);
complete_and_exit(&dhd->watchdog_exited, 0);
}
@@ -1277,7 +1304,7 @@ dhd_dpc_thread(void *data)
else
break;
}
-
+ myprintf("%s exit\n", __func__);
complete_and_exit(&dhd->dpc_exited, 0);
}
@@ -1525,6 +1552,13 @@ dhd_ioctl_entry(struct net_device *net,
int ifidx;
bool is_set_key_cmd;
+
+ /* BRCM: anthoy, add for debug, reject if down */
+ if ( !dhd->pub.up || (dhd->pub.busstate == DHD_BUS_DOWN)){
+ myprintf("%s: dhd is down. skip it.\n", __func__);
+ return -ENODEV;
+ }
+
ifidx = dhd_net2idx(dhd, net);
DHD_TRACE(("%s: ifidx %d, cmd 0x%04x\n", __FUNCTION__, ifidx, cmd));
@@ -2418,6 +2452,11 @@ dhd_os_wd_timer(void *bus, uint wdtick)
dhd_info_t *dhd = (dhd_info_t *)pub->info;
static uint save_dhd_watchdog_ms = 0;
+ /* BRCM: anthony: stop timer, if bus down. */
+ if (pub->busstate == DHD_BUS_DOWN) {
+ return;
+ }
+
/* Totally stop the timer */
if (!wdtick && dhd->wd_timer_valid == TRUE) {
del_timer_sync(&dhd->timer);