I just found out when upgraded rt73 device drivers that the old Linux kernel and the new version they changed the mutex to semaphore with extra parameter (A mutex is essentially the same thing as a binary semaphore that allows multiple program threads to share the same resource) I could not even grep for the name because the name is totally different. The name before is half Java and half C but now it is C (all low cases sema_init). So the device driver could fail after upgrade to a new Linux kernel and this is the case.
#ifndef init_MUTEX_LOCKED sema_init(&(pAd->usbdev_semaphore), 1); // linux kernel 2.6.38 sema_init(&(pAd->mlme_semaphore), 1); sema_init(&(pAd->RTUSBCmd_semaphore), 1); #else init_MUTEX_LOCKED(&(pAd->usbdev_semaphore)); // linux kernel 2.6.37 init_MUTEX_LOCKED(&(pAd->mlme_semaphore)); init_MUTEX_LOCKED(&(pAd->RTUSBCmd_semaphore)); #endif
No comments:
Post a Comment