"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "driver/ntoskernel.c" between
ndiswrapper-1.62.tar.gz and ndiswrapper-1.63.tar.gz

About: ndiswrapper is a linux kernel module that loads and runs NDIS (Windows network driver API) drivers supplied by wireless network card vendors.

ntoskernel.c  (ndiswrapper-1.62):ntoskernel.c  (ndiswrapper-1.63)
skipping to change at line 80 skipping to change at line 80
static struct nt_slist wrap_timer_slist; static struct nt_slist wrap_timer_slist;
CCHAR cpu_count; CCHAR cpu_count;
/* compute ticks (100ns) since 1601 until when system booted into /* compute ticks (100ns) since 1601 until when system booted into
* wrap_ticks_to_boot */ * wrap_ticks_to_boot */
u64 wrap_ticks_to_boot; u64 wrap_ticks_to_boot;
#if defined(CONFIG_X86_64) #if defined(CONFIG_X86_64)
static struct timer_list shared_data_timer; static struct timer_list shared_data_timer;
struct kuser_shared_data kuser_shared_data; struct kuser_shared_data kuser_shared_data;
/* static void update_user_shared_data_proc(unsigned long data); */
#endif #endif
WIN_SYMBOL_MAP("KeTickCount", &jiffies) WIN_SYMBOL_MAP("KeTickCount", &jiffies)
WIN_SYMBOL_MAP("KeNumberProcessors", &cpu_count) WIN_SYMBOL_MAP("KeNumberProcessors", &cpu_count)
struct workqueue_struct *ntos_wq; struct workqueue_struct *ntos_wq;
DEFINE_PER_CPU(struct irql_info, irql_info); DEFINE_PER_CPU(struct irql_info, irql_info);
skipping to change at line 1765 skipping to change at line 1764
* to check if this card is installed in IBM thinkpads; we can * to check if this card is installed in IBM thinkpads; we can
* probably get this device to work if we create a buffer with the * probably get this device to work if we create a buffer with the
* strings as required by the driver and return virtual address for * strings as required by the driver and return virtual address for
* that address instead */ * that address instead */
wstdcall void __iomem *WIN_FUNC(MmMapIoSpace,3) wstdcall void __iomem *WIN_FUNC(MmMapIoSpace,3)
(PHYSICAL_ADDRESS phys_addr, SIZE_T size, (PHYSICAL_ADDRESS phys_addr, SIZE_T size,
enum memory_caching_type cache) enum memory_caching_type cache)
{ {
void __iomem *virt; void __iomem *virt;
ENTER1("cache type: %d", cache); ENTER1("cache type: %d", cache);
if (cache == MmCached) if (cache == MmCached) {
virt = ioremap_cache(phys_addr, size);
virt = ioremap(phys_addr, size); virt = ioremap(phys_addr, size);
else #endif
} else {
virt = ioremap(phys_addr, size);
virt = ioremap_nocache(phys_addr, size); virt = ioremap_nocache(phys_addr, size);
TRACE1("%llx, %zu, %p", phys_addr, size, virt); TRACE1("%llx, %zu, %p", phys_addr, size, virt);
return virt; return virt;
} }
wstdcall void WIN_FUNC(MmUnmapIoSpace,2) wstdcall void WIN_FUNC(MmUnmapIoSpace,2)
(void __iomem *addr, SIZE_T size) (void __iomem *addr, SIZE_T size)
{ {
ENTER1("%p, %zu", addr, size); ENTER1("%p, %zu", addr, size);
iounmap(addr); iounmap(addr);
return; return;
skipping to change at line 2504 skipping to change at line 2512
} }
struct worker_init_struct { struct worker_init_struct {
struct work_struct work; struct work_struct work;
struct completion completion; struct completion completion;
struct nt_thread *nt_thread; struct nt_thread *nt_thread;
}; };
int ntoskernel_init(void) int ntoskernel_init(void)
{ {
struct timeval now;
spin_lock_init(&dispatcher_lock); spin_lock_init(&dispatcher_lock);
spin_lock_init(&ntoskernel_lock); spin_lock_init(&ntoskernel_lock);
spin_lock_init(&ntos_work_lock); spin_lock_init(&ntos_work_lock);
spin_lock_init(&kdpc_list_lock); spin_lock_init(&kdpc_list_lock);
spin_lock_init(&irp_cancel_lock); spin_lock_init(&irp_cancel_lock);
InitializeListHead(&wrap_mdl_list); InitializeListHead(&wrap_mdl_list);
InitializeListHead(&kdpc_list); InitializeListHead(&kdpc_list);
InitializeListHead(&callback_objects); InitializeListHead(&callback_objects);
InitializeListHead(&bus_driver_list); InitializeListHead(&bus_driver_list);
InitializeListHead(&object_list); InitializeListHead(&object_list);
InitializeListHead(&ntos_work_list); InitializeListHead(&ntos_work_list);
nt_spin_lock_init(&nt_list_lock); nt_spin_lock_init(&nt_list_lock);
INIT_WORK(&kdpc_work, kdpc_worker); INIT_WORK(&kdpc_work, kdpc_worker);
INIT_WORK(&ntos_work, ntos_work_worker); INIT_WORK(&ntos_work, ntos_work_worker);
wrap_timer_slist.next = NULL; wrap_timer_slist.next = NULL;
wrap_ticks_to_boot = TICKS_1601_TO_1970; wrap_ticks_to_boot = TICKS_1601_TO_1970;
do_gettimeofday(&now); do {
wrap_ticks_to_boot += (u64)now.tv_sec * TICKSPERSEC; u64 now;
wrap_ticks_to_boot += now.tv_usec * 10; now = ktime_get_real_ns();
wrap_ticks_to_boot += now * 10;
} while (0);
#else #else
wrap_ticks_to_boot += ktime_to_us(ktime_get_real()) * 10; do {
struct timeval now;
wrap_ticks_to_boot += (u64)now.tv_sec * TICKSPERSEC;
wrap_ticks_to_boot += now.tv_usec * 10;
} while (0);
#endif #endif
TRACE2("%llu", wrap_ticks_to_boot);
wrap_ticks_to_boot -= jiffies * TICKSPERJIFFY; wrap_ticks_to_boot -= jiffies * TICKSPERJIFFY;
TRACE2("%llu", wrap_ticks_to_boot); TRACE2("%llu", wrap_ticks_to_boot);
cpu_count = num_online_cpus(); cpu_count = num_online_cpus();
do { do {
int cpu; int cpu;
for_each_possible_cpu(cpu) { for_each_possible_cpu(cpu) {
struct irql_info *info; struct irql_info *info;
info = &per_cpu(irql_info, cpu); info = &per_cpu(irql_info, cpu);
mutex_init(&(info->lock)); mutex_init(&(info->lock));
info->task = NULL; info->task = NULL;
info->count = 0; info->count = 0;
cpumask_setall(&info->cpus_allowed); cpumask_setall(tsk_cpus_allowed(info));
#endif #endif
} }
} while (0); } while (0);
#endif #endif
ntos_wq = create_singlethread_workqueue("ntos_wq"); ntos_wq = create_singlethread_workqueue("ntos_wq");
if (!ntos_wq) { if (!ntos_wq) {
WARNING("couldn't create ntos_wq thread"); WARNING("couldn't create ntos_wq thread");
return -ENOMEM; return -ENOMEM;
} }
 End of changes. 9 change blocks. 
14 lines changed or deleted 27 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)