~ubuntu-branches/ubuntu/trusty/ndiswrapper/trusty-proposed

« back to all changes in this revision

Viewing changes to driver/ndis.c

  • Committer: Package Import Robot
  • Author(s): Julian Andres Klode
  • Date: 2013-07-14 20:02:35 UTC
  • mfrom: (1.3.17)
  • Revision ID: package-import@ubuntu.com-20130714200235-ul4rjhzwojo2q2t1
Tags: 1.58-1
* Imported Upstream version 1.58 (Closes: #707665)
* Use $KERNELRELEASE as target kernel version (Closes: #693638)
* Add BUILT_MODULE_NAME to dkms config file (Workaround for: #690747)
* Add support for kernel 3.9
* Patch userland for 3.X kernels
* Set Standards-Version to 3.9.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
2654
2654
        (ULONG *idle, ULONG *kernel_user, ULONG *index)
2655
2655
{
2656
2656
        int cpu = smp_processor_id();
 
2657
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)
 
2658
        *idle = kcpustat_cpu(cpu).cpustat[CPUTIME_IDLE];
 
2659
        *kernel_user = kcpustat_cpu(cpu).cpustat[CPUTIME_SYSTEM] +
 
2660
                kcpustat_cpu(cpu).cpustat[CPUTIME_USER];
 
2661
#else
2657
2662
        *idle = kstat_cpu(cpu).cpustat.idle;
2658
2663
        *kernel_user = kstat_cpu(cpu).cpustat.system +
2659
2664
                kstat_cpu(cpu).cpustat.user;
 
2665
#endif
2660
2666
        *index = cpu;
2661
2667
}
2662
2668
 
2903
2909
        TODO();
2904
2910
}
2905
2911
 
 
2912
wstdcall NDIS_STATUS WIN_FUNC(NdisMOpenLog,3)
 
2913
        (struct ndis_device *wnd, UINT size, void *handle)
 
2914
{
 
2915
        if (size >= sizeof(int))
 
2916
                *((int *)handle) = 42;
 
2917
        return NDIS_STATUS_SUCCESS;
 
2918
}
 
2919
 
 
2920
wstdcall NDIS_STATUS WIN_FUNC(NdisMWriteLogData,3)
 
2921
        (void *handle, char *buffer, UINT buffer_size)
 
2922
{
 
2923
        TODO();
 
2924
        return NDIS_STATUS_SUCCESS;
 
2925
}
 
2926
 
 
2927
wstdcall void WIN_FUNC(NdisMFlushLog,1)
 
2928
        (void *handle)
 
2929
{
 
2930
        TODO();
 
2931
}
 
2932
 
 
2933
wstdcall void WIN_FUNC(NdisMCloseLog,1)
 
2934
        (void *handle)
 
2935
{
 
2936
        TODO();
 
2937
}
 
2938
 
2906
2939
static void *ndis_get_routine_address(char *name)
2907
2940
{
2908
2941
        int i;