memcpy(netdev_priv(net), &dhd, sizeof(dhd));
dhd->pub.osh = osh;
+ mutex_init(&dhd->proto_sem);
+ mutex_init(&dhd->sdsem);
+ /* Initialize other structure content */
+ init_waitqueue_head(&dhd->ioctl_resp_wait);
+ init_waitqueue_head(&dhd->ctrl_wait);
+
+ /* Initialize the spinlocks */
+ spin_lock_init(&dhd->sdlock);
+ spin_lock_init(&dhd->txqlock);
+ spin_lock_init(&dhd->dhd_lock);
+
/* Set network interface name if it was provided as module parameter */
if (iface_name[0]) {
int len;
net->netdev_ops = NULL;
#endif
- mutex_init(&dhd->proto_sem);
- /* Initialize other structure content */
- init_waitqueue_head(&dhd->ioctl_resp_wait);
- init_waitqueue_head(&dhd->ctrl_wait);
-
- /* Initialize the spinlocks */
- spin_lock_init(&dhd->sdlock);
- spin_lock_init(&dhd->txqlock);
- spin_lock_init(&dhd->dhd_lock);
-
/* Initialize Wakelock stuff */
spin_lock_init(&dhd->wl_lock);
dhd->wl_count = 0;
dhd->timer.function = dhd_watchdog;
/* Initialize thread based operation and lock */
- mutex_init(&dhd->sdsem);
if ((dhd_watchdog_prio >= 0) && (dhd_dpc_prio >= 0)) {
dhd->threads_only = TRUE;
}