Precisa de ajuda com Wifi, tentando ndiswrapper [duplicate]

2

Meu laptop tem um Qualcomm Atheros QCA9377.

Saída do lspci

03:00.0 Network controller: Qualcomm Atheros Device 0042 (rev 30)

que ainda não é suportado pelo Ubuntu (funciona no Windows). Relatório de bugs aqui

Como não tenho ideia de quando seria corrigido, tentei o ndiswrapper.

Instalar a partir do Centro de Software resultaria em

FATAL: Module ndiswrapper not found.

ambos via ndisgtk e sudo modprobe ndiswrapper

Então, eu compilei da fonte, mas sudo make deu

 /home/bhav/Downloads/ndiswrapper-1.59/driver/crt.c: In function ‘_win_srand’:
/home/bhav/Downloads/ndiswrapper-1.59/driver/crt.c:470:2: error: implicit declaration of function ‘net_srandom’ [-Werror=implicit-function-declaration]
  net_srandom(seed);
  ^
cc1: some warnings being treated as errors
scripts/Makefile.build:258: recipe for target '/home/bhav/Downloads/ndiswrapper-1.59/driver/crt.o' failed
make[3]: *** [/home/bhav/Downloads/ndiswrapper-1.59/driver/crt.o] Error 1
Makefile:1386: recipe for target '_module_/home/bhav/Downloads/ndiswrapper-1.59/driver' failed
make[2]: *** [_module_/home/bhav/Downloads/ndiswrapper-1.59/driver] Error 2
make[2]: Leaving directory '/usr/src/linux-headers-4.2.0-040200rc8-generic'
Makefile:183: recipe for target 'modules' failed
make[1]: *** [modules] Error 2
make[1]: Leaving directory '/home/bhav/Downloads/ndiswrapper-1.59/driver'
Makefile:23: recipe for target 'driver' failed
make: *** [driver] Error 2

Eu tentei 1.57, 1.58, 1.59. mesmo erro.

Então eu encontrei uma versão com patch para o kernel do Linux atualizado aqui

Mas também não consigo compilar essa

/home/bhav/Downloads/nd/driver/loader.c: In function ‘load_sys_files’:
/home/bhav/Downloads/nd/driver/loader.c:157:4: error: implicit declaration of function ‘__vmalloc’ [-Werror=implicit-function-declaration]
    __vmalloc(load_driver->sys_files[i].size,
    ^
/home/bhav/Downloads/nd/driver/loader.c:156:19: warning: assignment makes pointer from integer without a cast
   pe_image->image =
                   ^
/home/bhav/Downloads/nd/driver/loader.c:207:5: error: implicit declaration of function ‘vfree’ [-Werror=implicit-function-declaration]
     vfree(driver->pe_images[i].image);
     ^
/home/bhav/Downloads/nd/driver/loader.c: In function ‘add_bin_file’:
/home/bhav/Downloads/nd/driver/loader.c:298:2: error: implicit declaration of function ‘vmalloc’ [-Werror=implicit-function-declaration]
  bin_file->data = vmalloc(driver_file->size);
  ^
/home/bhav/Downloads/nd/driver/loader.c:298:17: warning: assignment makes pointer from integer without a cast
  bin_file->data = vmalloc(driver_file->size);
                 ^
/home/bhav/Downloads/nd/driver/loader.c: In function ‘wrapper_ioctl’:
/home/bhav/Downloads/nd/driver/loader.c:789:15: warning: assignment makes pointer from integer without a cast
   load_driver = vmalloc(sizeof(*load_driver));
               ^
/home/bhav/Downloads/nd/driver/loader.c: In function ‘wrapper_ioctl_compat’:
/home/bhav/Downloads/nd/driver/loader.c:884:11: warning: assignment makes pointer from integer without a cast
   kdriver = vmalloc(sizeof(*kdriver));
           ^
cc1: some warnings being treated as errors
scripts/Makefile.build:258: recipe for target '/home/bhav/Downloads/nd/driver/loader.o' failed
make[3]: *** [/home/bhav/Downloads/nd/driver/loader.o] Error 1
Makefile:1386: recipe for target '_module_/home/bhav/Downloads/nd/driver' failed
make[2]: *** [_module_/home/bhav/Downloads/nd/driver] Error 2
make[2]: Leaving directory '/usr/src/linux-headers-4.2.0-040200rc8-generic'
Makefile:183: recipe for target 'modules' failed
make[1]: *** [modules] Error 2
make[1]: Leaving directory '/home/bhav/Downloads/nd/driver'
Makefile:23: recipe for target 'driver' failed
make: *** [driver] Error 2

Preciso de ajuda.

P.S. Recentemente atualizado para 15,04 a partir de 14,04

bhav@kal-el:~/Downloads/nd$ uname -r
4.2.0-040200rc8-generic

EDIT-1:

Saída de lspci -knn | grep Net -A2

03:00.0 Network controller [0280]: Qualcomm Atheros Device [168c:0042] (rev 30)
    Subsystem: Foxconn International, Inc. Device [105b:e09a]
    
por Bhav 09.10.2015 / 18:17

1 resposta

0

Eu tentei a versão do github com o gcc 4.9.2

git clone https://github.com/Schwartz/ndiswrapper-patched-3.14.git
cd ndiswrapper-patched-3.14
make

Saída

make -C utils
make[1]: Entering directory '/home/aboettger/tmp/ndiswrapper-patched-3.14/utils'
gcc -g -Wall -I../driver  -o loadndisdriver loadndisdriver.c
make[1]: Leaving directory '/home/aboettger/tmp/ndiswrapper-patched-3.14/utils'
make -C driver
make[1]: Entering directory '/home/aboettger/tmp/ndiswrapper-patched-3.14/driver'
make -C /usr/src/linux-headers-3.19.0-30-generic M=/home/aboettger/tmp/ndiswrapper-patched-3.14/driver
make[2]: Entering directory '/usr/src/linux-headers-3.19.0-30-generic'
  LD      /home/aboettger/tmp/ndiswrapper-patched-3.14/driver/built-in.o
  MKEXPORT /home/aboettger/tmp/ndiswrapper-patched-3.14/driver/crt_exports.h
  MKEXPORT /home/aboettger/tmp/ndiswrapper-patched-3.14/driver/hal_exports.h
  MKEXPORT /home/aboettger/tmp/ndiswrapper-patched-3.14/driver/ndis_exports.h
  MKEXPORT /home/aboettger/tmp/ndiswrapper-patched-3.14/driver/ntoskernel_exports.h
  MKEXPORT /home/aboettger/tmp/ndiswrapper-patched-3.14/driver/ntoskernel_io_exports.h
  MKEXPORT /home/aboettger/tmp/ndiswrapper-patched-3.14/driver/rtl_exports.h
  MKEXPORT /home/aboettger/tmp/ndiswrapper-patched-3.14/driver/usb_exports.h
  MKSTUBS /home/aboettger/tmp/ndiswrapper-patched-3.14/driver/win2lin_stubs.h
  CC [M]  /home/aboettger/tmp/ndiswrapper-patched-3.14/driver/crt.o
  CC [M]  /home/aboettger/tmp/ndiswrapper-patched-3.14/driver/hal.o
  CC [M]  /home/aboettger/tmp/ndiswrapper-patched-3.14/driver/iw_ndis.o
  CC [M]  /home/aboettger/tmp/ndiswrapper-patched-3.14/driver/loader.o
  CC [M]  /home/aboettger/tmp/ndiswrapper-patched-3.14/driver/ndis.o
  CC [M]  /home/aboettger/tmp/ndiswrapper-patched-3.14/driver/ntoskernel.o
  CC [M]  /home/aboettger/tmp/ndiswrapper-patched-3.14/driver/ntoskernel_io.o
  CC [M]  /home/aboettger/tmp/ndiswrapper-patched-3.14/driver/pe_linker.o
  CC [M]  /home/aboettger/tmp/ndiswrapper-patched-3.14/driver/pnp.o
  CC [M]  /home/aboettger/tmp/ndiswrapper-patched-3.14/driver/proc.o
  CC [M]  /home/aboettger/tmp/ndiswrapper-patched-3.14/driver/rtl.o
  CC [M]  /home/aboettger/tmp/ndiswrapper-patched-3.14/driver/wrapmem.o
  CC [M]  /home/aboettger/tmp/ndiswrapper-patched-3.14/driver/wrapndis.o
  CC [M]  /home/aboettger/tmp/ndiswrapper-patched-3.14/driver/wrapper.o
  CC [M]  /home/aboettger/tmp/ndiswrapper-patched-3.14/driver/usb.o
  AS [M]  /home/aboettger/tmp/ndiswrapper-patched-3.14/driver/win2lin_stubs.o
  AS [M]  /home/aboettger/tmp/ndiswrapper-patched-3.14/driver/lin2win.o
  LD [M]  /home/aboettger/tmp/ndiswrapper-patched-3.14/driver/ndiswrapper.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /home/aboettger/tmp/ndiswrapper-patched-3.14/driver/ndiswrapper.mod.o
  LD [M]  /home/aboettger/tmp/ndiswrapper-patched-3.14/driver/ndiswrapper.ko
make[2]: Leaving directory '/usr/src/linux-headers-3.19.0-30-generic'
make[1]: Leaving directory '/home/aboettger/tmp/ndiswrapper-patched-3.14/driver
    
por A.B. 09.10.2015 / 20:01