You are not logged in.

#1 2009-02-23 04:10:34

arew264
Member
From: Friendswood, Texas, US
Registered: 2006-07-01
Posts: 394
Website

b43 Master Mode

Okay, this has been somewhat of a holy grail project for me, but I think it's finally completely feasible.

I've been trying to get my bcm4318 to run in master mode for quite some time. The b43 driver supports it, and hostapd supports it through libnl, but the mac80211 wireless stack in the kernel apparantly doesn't expose support (although most of the code is there). I know there are patches somewhere that make this work and I've been searching mailing lists trying to find them, but so far I've had no luck.

Has anyone gotten master mode working using the mac80211 stack, and if so, how?

Offline

#2 2009-02-23 22:28:53

arew264
Member
From: Friendswood, Texas, US
Registered: 2006-07-01
Posts: 394
Website

Re: b43 Master Mode

I'm building wireless-compat, and I'm pretty sure it'll do all I want. The package in the AUR, however, is out of date, so I had to change a few things about it.

Offline

#3 2009-02-24 04:30:55

arew264
Member
From: Friendswood, Texas, US
Registered: 2006-07-01
Posts: 394
Website

Re: b43 Master Mode

IT WORKS!
I followed this: http://wireless.erley.org/stable.html
I had to bump the package versions in a few places and rewrite quite a bit of the compat-wireless PKGBUILD from the AUR, but everything started working. I'll get more detailed instructions (should I do a wiki writeup?) later this week after I've cleaned up my PKGBUILD's and switched back to packages in a few places (my wireless firmware and wireless-compat).

After a brief email conversation with the author, the addendum at the bottom, "iwconfig wlan0 mode master fails," was added, and when I followed that, everything started working. w00t.

Offline

#4 2009-02-24 04:59:15

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: b43 Master Mode

Cool!

Chuck the instructions on the wiki. compat-wireless on the AUR is orphaned if you'd like to adopt it and maintain it.

Offline

#5 2009-02-24 19:51:50

jacko
Member
Registered: 2007-11-23
Posts: 840

Re: b43 Master Mode

iphitus wrote:

Cool!

Chuck the instructions on the wiki. compat-wireless on the AUR is orphaned if you'd like to adopt it and maintain it.

no it's not, I adopted it and wanted to update it, but I am stuck on the PKGBUILD. OP let me know if you want the AUR package, or you can help me get PKGBUILD working. http://bbs.archlinux.org/viewtopic.php?id=66161

Offline

#6 2009-02-25 01:27:32

arew264
Member
From: Friendswood, Texas, US
Registered: 2006-07-01
Posts: 394
Website

Re: b43 Master Mode

I wondered about that. What you have is pretty good, actually, but I had to bump it up to work with the latest release. I ended up remaking your patch for the Makefile (although I basically did what you did, just to a newer version of the file).

What exactly was broken about it before? All I've done besides the patch is update the versions.

EDIT:
I'm building the package right now (it takes about an hour), and if everything works, I'll post up a tarball of everything. My PKGBUILD is basically the same as yours with the versions changed, and the patch command changed because I made the patch a little differently.

Last edited by arew264 (2009-02-25 01:30:55)

Offline

#7 2009-02-26 18:34:03

jacko
Member
Registered: 2007-11-23
Posts: 840

Re: b43 Master Mode

arew264 wrote:

I wondered about that. What you have is pretty good, actually, but I had to bump it up to work with the latest release. I ended up remaking your patch for the Makefile (although I basically did what you did, just to a newer version of the file).

What exactly was broken about it before? All I've done besides the patch is update the versions.

EDIT:
I'm building the package right now (it takes about an hour), and if everything works, I'll post up a tarball of everything. My PKGBUILD is basically the same as yours with the versions changed, and the patch command changed because I made the patch a little differently.

By all means, post the stuff you have so we can work together on this. Forget about the patch, I can't even get a modified Makefile to work so I can even compile the package. If you can post a modified working Makefile for arch then I can see about finishing the PKGBUILD.

But none the less, post what you have so we can work together. Else, I am just gonna abandon this PKGBUILD again and leave it as is. But, I don't see how that helps anyone who needs compat wireless in arch for outdated kernels...

Offline

#8 2009-02-26 22:18:08

arew264
Member
From: Friendswood, Texas, US
Registered: 2006-07-01
Posts: 394
Website

Re: b43 Master Mode

Well, here's what I have right now. I didn't change compat-wireless.install from the AUR, but I changed the PKGBUILD and remade the patch.
Here's the PKGBUILD:

pkgname=compat-wireless
_kernver=2.6.28-ARCH
pkgver=2009_02_23
_realver=${pkgver//_/-}
pkgrel=1
pkgdesc="Snapshots of the wireless-testing tree ported to older kernels"
url="http://linuxwireless.org"
depends=('kernel26=2.6.28.7')
makedepends=('patch' 'gcc' 'make')
arch=('i686' 'x86_64')
license=('GPL')
install=$pkgname.install
source=(http://www.orbit-lab.org/kernel/compat-wireless-2.6/2009/02/${pkgname}-${_realver}.tar.bz2
    makefile.patch)
md5sums=()
build() {
  cd ${startdir}/src/${pkgname}-${_realver}
  patch -p0 -i ../makefile.patch || return 1
  echo -ne "CONFIG_IWL3945_LEDS=y\nCONFIG_IWLWIFI_LEDS=y\nCONFIG_MAC80211_LEDS=y\n" >> config.mk
  make || return 1
  make KLIB=/lib/modules/${_kernver} DESTDIR=${startdir}/pkg install || return 1
  sed -i -e "s/KERNEL_VERSION='.*'/KERNEL_VERSION='${_kernver}'/" $startdir/*.install
}

And here's the patch:

*** Makefile.orig    2009-02-23 15:54:32.202077091 +0000
--- Makefile    2009-02-23 15:54:42.408922157 +0000
***************
*** 1,10 ****
  export KMODDIR?=       updates
  KMODDIR_ARG:=   "INSTALL_MOD_DIR=$(KMODDIR)"
! ifneq ($(origin $(KLIB)), undefined)
! KMODPATH_ARG:=  "INSTALL_MOD_PATH=$(KLIB)"
! else
  export KLIB:=          /lib/modules/$(shell uname -r)
  endif
  export KLIB_BUILD ?=    $(KLIB)/build
  # Sometimes not available in the path
  MODPROBE := /sbin/modprobe
--- 1,9 ----
  export KMODDIR?=       updates
  KMODDIR_ARG:=   "INSTALL_MOD_DIR=$(KMODDIR)"
! ifeq ($(origin $(KLIB)), undefined)
  export KLIB:=          /lib/modules/$(shell uname -r)
  endif
+ KMODPATH_ARG:=  "INSTALL_MOD_PATH=$(DESTDIR)"
  export KLIB_BUILD ?=    $(KLIB)/build
  # Sometimes not available in the path
  MODPROBE := /sbin/modprobe
***************
*** 58,150 ****
      @touch $@
      @md5sum $(COMPAT_CONFIG) > $(CONFIG_CHECK)
  
! install: uninstall modules
      $(MAKE) -C $(KLIB_BUILD) M=$(PWD) $(KMODDIR_ARG) $(KMODPATH_ARG) \
          modules_install
      @# All the scripts we can use
!     @mkdir -p /usr/lib/compat-wireless/
!     @install scripts/modlib.sh    /usr/lib/compat-wireless/
!     @install scripts/madwifi-unload    /usr/sbin/
      @# This is to allow switching between drivers without blacklisting
!     @install scripts/athenable    /usr/sbin/
!     @install scripts/b43enable    /usr/sbin/
!     @install scripts/iwl-enable    /usr/sbin/
!     @install scripts/athload    /usr/sbin/
!     @install scripts/b43load    /usr/sbin/
!     @install scripts/iwl-load    /usr/sbin/
!     @if [ ! -z $(MADWIFI) ]; then \
!         echo ;\
!         echo -n "Note: madwifi detected, we're going to disable it. "  ;\
!         echo "If you would like to enable it later you can run:"  ;\
!         echo "    sudo athenable madwifi"  ;\
!         echo ;\
!         echo Running athenable ath5k...;\
!         /usr/sbin/athenable ath5k ;\
!     fi
!     @if [ ! -z $(OLD_IWL) ]; then \
!         echo ;\
!         echo -n "Note: iwl4965 detected, we're going to disable it. "  ;\
!         echo "If you would like to enable it later you can run:"  ;\
!         echo "    sudo iwl-load iwl4965"  ;\
!         echo ;\
!         echo Running iwl-enable iwlagn...;\
!         /usr/sbin/iwl-enable iwlagn ;\
!     fi
!     @# If on distributions like Mandriva which like to
!     @# compress their modules this will find out and do
!     @# it for you. Reason is some old version of modutils
!     @# won't know mac80211.ko should be used instead of
!     @# mac80211.ko.gz
!     @./scripts/compress_modules
!     @/sbin/depmod -ae
!     @echo
!     @echo "Currently detected wireless subsystem modules:"
!     @echo 
!     @$(MODPROBE) -l mac80211
!     @$(MODPROBE) -l cfg80211
!     @$(MODPROBE) -l lib80211
!     @$(MODPROBE) -l adm8211
!     @$(MODPROBE) -l at76c50x-usb
!     @$(MODPROBE) -l ath5k
!     @$(MODPROBE) -l ath9k
!     @$(MODPROBE) -l b43
!     @$(MODPROBE) -l b43legacy
!     @$(MODPROBE) -l b44
!     @$(MODPROBE) -l ssb
!     @$(MODPROBE) -l rc80211_simple
!     @$(MODPROBE) -l iwlcore
!     @$(MODPROBE) -l iwl3945
!     @$(MODPROBE) -l iwlagn
!     @$(MODPROBE) -l ipw2100
!     @$(MODPROBE) -l ipw2200
!     @$(MODPROBE) -l libipw
!     @$(MODPROBE) -l lib80211
!     @$(MODPROBE) -l lib80211_crypt
!     @$(MODPROBE) -l libertas_cs
!     @$(MODPROBE) -l libertas_tf
!     @$(MODPROBE) -l libertas_tf_usb
!     @$(MODPROBE) -l ub8xxx
!     @$(MODPROBE) -l p54pci
!     @$(MODPROBE) -l p54usb
!     @$(MODPROBE) -l rt2400pci
!     @$(MODPROBE) -l rt2500pci
!     @$(MODPROBE) -l rt2500usb
!     @$(MODPROBE) -l rt61pci
!     @$(MODPROBE) -l rt73usb
!     @$(MODPROBE) -l usbnet
!     @$(MODPROBE) -l cdc_ether
!     @$(MODPROBE) -l rndis_host
!     @$(MODPROBE) -l rndis_wlan
!     @$(MODPROBE) -l rtl8180
!     @$(MODPROBE) -l rtl8187
!     @$(MODPROBE) -l zd1211rw
!     @echo 
!     @echo Now run:
!     @echo 
!     @echo make unload
!     @echo
!     @echo And then load the wireless module you need. If unsure reboot.
!     @echo
  
  uninstall:
      @# New location, matches upstream
--- 57,78 ----
      @touch $@
      @md5sum $(COMPAT_CONFIG) > $(CONFIG_CHECK)
  
! install: modules
      $(MAKE) -C $(KLIB_BUILD) M=$(PWD) $(KMODDIR_ARG) $(KMODPATH_ARG) \
          modules_install
      @# All the scripts we can use
!     @mkdir -p $(DESTDIR)/usr/lib/compat-wireless/
!     @mkdir -p $(DESTDIR)/usr/sbin/
!     @install scripts/modlib.sh      $(DESTDIR)/usr/lib/compat-wireless/
!     @install scripts/madwifi-unload $(DESTDIR)/usr/sbin/
      @# This is to allow switching between drivers without blacklisting
!     @install scripts/athenable    $(DESTDIR)/usr/sbin/
!     @install scripts/b43enable    $(DESTDIR)/usr/sbin/
!     @install scripts/iwl-enable    $(DESTDIR)/usr/sbin/
!     @install scripts/athload    $(DESTDIR)/usr/sbin/
!     @install scripts/b43load    $(DESTDIR)/usr/sbin/
!     @install scripts/iwl-load    $(DESTDIR)/usr/sbin/
! 
  
  uninstall:
      @# New location, matches upstream

The patch is basically the same.



As you can see, I've hardcoded it to use the build from February 23. Ideally, we would just download the daily build and build that, which is possible, but we would probably have to update the patch periodically as the Makefile changed.

Offline

#9 2009-03-04 00:34:07

buddabrod
Member
From: Germany
Registered: 2007-02-25
Posts: 220

Re: b43 Master Mode

As you can see, I've hardcoded it to use the build from February 23. Ideally, we would just download the daily build and build that, which is possible, but we would probably have to update the patch periodically as the Makefile changed.

I once provided a PKGBUILD which does exactly that, but the AUR system couldnt handle it ;P
Maybe I adopt it again and update it, I dont know. My wireless is more or less working good so far with the stable driver so far.

Offline

#10 2009-03-04 01:02:55

buddabrod
Member
From: Germany
Registered: 2007-02-25
Posts: 220

Re: b43 Master Mode

http://aur.archlinux.org:80/packages.php?ID=16829
There it is again. AUR still cant handle it. Maybe I'll get some mad mails again soon for uploading such stuff tongue

Offline

#11 2009-03-04 01:12:13

arew264
Member
From: Friendswood, Texas, US
Registered: 2006-07-01
Posts: 394
Website

Re: b43 Master Mode

Well, you don't even need to put a date in the package URL (compat-wireless.tar.bz2 is updated daily), but you'd have to find something else to put in the pkgver... I dunno.
You'd probably want to make it work more like a Git/SVN package that updates the pkgver on the fly.

Last edited by arew264 (2009-03-04 01:13:01)

Offline

#12 2009-03-04 01:43:52

buddabrod
Member
From: Germany
Registered: 2007-02-25
Posts: 220

Re: b43 Master Mode

arew264 wrote:

Well, you don't even need to put a date in the package URL (compat-wireless.tar.bz2 is updated daily), but you'd have to find something else to put in the pkgver... I dunno.
You'd probably want to make it work more like a Git/SVN package that updates the pkgver on the fly.

I know. There is even a git repo FYI, but last time I checked it out, it was broken like hell.

I cant think of any better solution for the pkgver problem. Help is always appreciated. :-)

Offline

Board footer

Powered by FluxBB