Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm attempting to patch my wifi driver to fix the fixed channel -1 error, but I always get make errors when I try to compile the source... I'm running Ubuntu x64 13.04 on an AMD box. Any help would be appreciated...

$ sudo make
make -C /lib/modules/3.8.0-19-generic/build M=/usr/src/compat-wireless-3.4-rc3-1 modules
make[1]: Entering directory `/usr/src/linux-headers-3.8.0-19-generic'
CC [M]  /usr/src/compat-wireless-3.4-rc3-1/drivers/bcma/main.o
In file included from /usr/src/compat-wireless-3.4-rc3-1/include/linux/bcma/bcma.h:8:0,
             from /usr/src/compat-wireless-3.4-rc3-1/drivers/bcma/bcma_private.h:9,
             from /usr/src/compat-wireless-3.4-rc3-1/drivers/bcma/main.c:8:
/usr/src/compat-wireless-3.4-rc3-1/include/linux/bcma/bcma_driver_pci.h:207:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘bcma_core_pci_init’
In file included from /usr/src/compat-wireless-3.4-rc3-1/drivers/bcma/main.c:8:0:
/usr/src/compat-wireless-3.4-rc3-1/drivers/bcma/bcma_private.h:17:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘bcma_bus_register’
/usr/src/compat-wireless-3.4-rc3-1/drivers/bcma/main.c:142:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘bcma_bus_register’
/usr/src/compat-wireless-3.4-rc3-1/drivers/bcma/main.c:17:21: warning: ‘bcma_bus_next_num’ defined but not used [-Wunused-variable]
/usr/src/compat-wireless-3.4-rc3-1/drivers/bcma/main.c:86:12: warning: ‘bcma_register_cores’ defined but not used [-Wunused-function]
make[3]: *** [/usr/src/compat-wireless-3.4-rc3-1/drivers/bcma/main.o] Error 1
make[2]: *** [/usr/src/compat-wireless-3.4-rc3-1/drivers/bcma] Error 2
make[1]: *** [_module_/usr/src/compat-wireless-3.4-rc3-1] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.8.0-19-generic'
make: *** [modules] Error 2
share|improve this question
    
sudo apt-get install build-essential –  Qasim May 7 '13 at 3:56
    
try it if it work then i will post my aswer –  Qasim May 7 '13 at 3:56
    
Already got it :(. "build-essential is already the newest version." –  user1123530 May 7 '13 at 20:15

2 Answers 2

Using Ubuntu 12.04 AMD64 and a "0bda:8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN" I have not found a solution (yet), albeit I can try to point you in the right direction.

Compilation errors: The package compact-wireless (http: //wireless.kernel.org/en/users/Download/stable/) is for kernels before 3.7. You're using kernel 3.8.0-19 so you need to use compact-driver. The channel-negative-one-maxim patch does not work on compact-driver due to significant changes in "net/wireless/chan.c". According to aircrack wiki the channel-negative-one-maxim patch only needs to be applied to "compat-wireless versions before v3.3-rc1-2" so you do not need to apply it. I can only assume the problem should not exist in newer versions.

My suggestion: Using the aircrack wiki instructions download the compact-driver for the 3.8 kernel (https: //www.kernel.org/pub/linux/kernel/projects/backports/stable/), apply the mac80211.compat08082009.wl_frag+ack_v1.patch and compile regardless of whether the patch passed or not. After installation if it still does not work. If all else fails try another disto e.g. Kali live, possibly in a virtual machine while exposing the wireless card to the VM (should be relatively easy if you have a USB wireless module).

Additional information: I tried installing linux-backports-modules-cw-3.8-3.2.0-41-generic via apt, since I have 12.04 with 3.2.0-41-generic kernel. It did not work, note these precompiled modules does not contain the mac80211.compat08082009.wl_frag+ack_v1.patch. I also found https:// bugs.launchpad.net/ubuntu/+source/linux/+bug/1024568 was filed for ubuntu 12.04, but no activity since 2012-07-31.

PS: If only aireplay had a parameter to force the channel it would save a lot of people o lot of trouble, advising noobs like me to fix the broken drivers with random unsupported patches is terrible. It's even worse on Raspbian (tried kernel 3.2 and 3.6). Sorry about the broken links, this is my first post. Good luck!

share|improve this answer

Did you select your driver via ./scripts/driver-select in the compat-wireless-3.* directory? If not, run bare ./scripts/driver-select to see the supported drivers and choose one with ./scripts/driver-select driver_name. After which you'll most probably be able to make && sudo make install.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.