OpenWrt Forum Archive

Topic: madwifi: minstrel rate estimator don't work correctly

The content of this topic has been archived on 31 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi,

I noticed that all of the new madwifi releases ported to kamikaze with minstrel rate estimator by default don't work correctly. Minstrel always stays at 36M and it cannot be changes by 'iwconfig ath0 rate XX' - the system reboots immedetely (tryed diffrent madwifi releases with diffrent kamikaze revisions on both broadcom and x86 platforms)

Can I change the default rate estimator to sample? I want to use new madwifi on my AP but the minstrel bothers me...

What is the last rev that you tried?

madwifi r2377-20070526, kamikaze r7350

You can change the rate control module in package/madwifi/Makefile
Change "RATE_CONTROL:=minstrel" to "RATE_CONTROL:=sample"

Thanks, I will try this and back with info.

on latest madwifi 01/06/2007 and kamikaze r7433 there is still problem with setting fixed tx rate
I tried both minstrel and sample estimators and always 'iwconfig ath0 rate XX' ands with this:

root@OpenWrt:/# iwconfig ath0 rate 11M
BUG: unable to handle kernel NULL pointer dereference at virtual address 0000002e
 printing eip:
c0187a25
*pde = 00000000
Oops: 0000 [#1]
Modules linked in: scx200_wdt scx200_gpio ath_pci wlan_xauth wlan_wep wlan_tkip wlan_ccmp wlan_acl ath_rate_sample ath_hal(P) wlan_scan_sta wlan_scan_ap wlan nsc_gpio hwmon_vid hwmon ppp_async ppp_generic slhc crc_ccitt natsemi
CPU:    0
EIP:    0060:[<c0187a25>]    Tainted: P       VLI
EFLAGS: 00010082   (2.6.21.1 #1)
eax: fffffffe   ebx: fffffffe   ecx: ffffffdf   edx: c4873d20
esi: c3dad320   edi: c3ff50a0   ebp: c138a320   esp: c3cbdce4
ds: 007b   es: 007b   fs: 00d8  gs: 0000  ss: 0068
Process iwconfig (pid: 1315, ti=c3cbc000 task=c11a1580 task.ti=c3cbc000)
Stack: c4873d20 c1358ba0 c3dad320 c3ff50a0 c138a320 c4873c6c c3ff50a0 c4897a83
       c1358c20 c3dad320 c3ff5000 c3ff50a0 c4897b11 c3ff5000 c3dad320 00000082
       c489cf58 00000046 c3ff5000 c488f7d0 c3ff5000 c138a320 00000082 c138a320
Call Trace:
 [<c4873c6c>] <0> [<c4897a83>] <0> [<c4897b11>] <0> [<c489cf58>] <0> [<c488f7d0>] <0> [<c489c7ba>] <0> [<c489bdff>] <0> [<c48a1c95>] <0> [<c489be35>] <0> [<c48a1673>] <0> [<c01bdb0d>] <0> [<c48a1c8e>] <0> [<c488f1d6>] <0> [<c48a0b6e>] <0> [<c48a0d98>] <0> [<c48a64e1>] <0> [<c0206937>] <0> [<c4895730>] <0> [<c01fc274>] <0> [<c019736b>] <0> [<c01fc74d>] <0> [<c48a6401>] <0> [<c48a6401>] <0> [<c01f3da8>] <0> [<c012d077>] <0> [<c01ea4a1>] <0> [<c01eb85f>] <0> [<c01427c1>] <0> [<c01429ca>] <0> [<c0142a0d>] <0> [<c0102300>] <0> [<c0250000>] <0> =======================
Code: 84 c0 74 0e 8b 93 cc 00 00 00 85 d2 74 04 89 d8 ff d2 8b 83 d0 00 00 00 5b e9 82 89 f9 ff 55 57 56 53 83 ec 04 89 c3 85 c0 74 49 <8b> 70 30 8b 6e 18 83 c5 34 8b 96 c8 00 00 00 85 d2 74 02 ff d2
EIP: [<c0187a25>]  SS:ESP 0068:c3cbdce4
Kernel panic - not syncing: Fatal exception in interrupt
root@OpenWrt:/# iwconfig
lo        no wireless extensions.

eth0      no wireless extensions.

br-lan    no wireless extensions.

wifi0     no wireless extensions.

Warning: Driver for device ath0 has been compiled with version 22
of Wireless Extension, while this program supports up to version 20.
Some things may be broken...

ath0      IEEE 802.11g  ESSID:"xr2"  Nickname:""
          Mode:Master  Frequency:2.432 GHz  Access Point: 00:15:6D:63:00:C8
          Bit Rate:0 kb/s   Tx-Power=5 dBm   Sensitivity=0/3
          Retry:off   RTS thr:off   Fragment thr:off
          Encryption key:CBAD-795F-12C0-2A89-65DA-33E7-ABDE-314A [2]   Security mode:open
          Power Management:off
          Link Quality=12/127  Signal level=-84 dBm  Noise level=-96 dBm
          Rx invalid nwid:6  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

it may be a good time to switch to Wireless Tools version 29-pre21 that has support for Wireless Extensions version 22.  this madwifi instability lately is aggregating. here is a patch for the latest wireless_tools package:

--- wireless-tools/Makefile.old 2007-06-01 21:52:38.000000000 +0300
+++ wireless-tools/Makefile     2007-06-01 21:52:47.000000000 +0300
@@ -8,16 +8,16 @@

 include $(TOPDIR)/rules.mk

-PKG_NAME:=wireless-tools
-PKG_VERSION:=28
-PKG_RELEASE:=1
+PKG_NAME:=wireless_tools
+PKG_VERSION:=29
+PKG_RELEASE:=pre21

-PKG_SOURCE:=wireless_tools.$(PKG_VERSION).tar.gz
+PKG_SOURCE:=wireless_tools.$(PKG_VERSION).$(PKG_RELEASE).tar.gz
 PKG_SOURCE_URL:=http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux
-PKG_MD5SUM:=599c94497f9c9073c7b052d3dcb7cd16
+PKG_MD5SUM:=953774d6a34050bae4ef3bfa731f6653
 TAR_OPTIONS += || true

-PKG_BUILD_DIR:=$(BUILD_DIR)/wireless_tools.28
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME).$(PKG_VERSION)

 include $(INCLUDE_DIR)/package.mk

@@ -37,7 +37,7 @@
        $(MAKE) -C $(PKG_BUILD_DIR) \
                $(TARGET_CONFIGURE_OPTS) \
                CFLAGS="$(TARGET_CFLAGS) -I." \
-               libiw.so.28 iwmulticall
+               libiw.so.$(PKG_VERSION) iwmulticall
        $(MAKE) -C $(PKG_BUILD_DIR) \
                PREFIX="$(PKG_INSTALL_DIR)" \
                INSTALL_DIR="$(PKG_INSTALL_DIR)/usr/sbin" \
@@ -50,7 +50,7 @@
        $(CP) $(PKG_BUILD_DIR)/{iwlib,wireless}.h $(STAGING_DIR)/usr/include/
        mkdir -p $(STAGING_DIR)/usr/lib
        $(CP) $(PKG_BUILD_DIR)/libiw.so* $(STAGING_DIR)/usr/lib/
-       ln -sf libiw.so.28 $(STAGING_DIR)/usr/lib/libiw.so
+       ln -sf libiw.so.$(PKG_VERSION) $(STAGING_DIR)/usr/lib/libiw.so
 endef

 define Build/UninstallDev

here is the ipk, you may need to give the --nodeps option to the ipkg install command

(Last edited by acoul on 1 Jun 2007, 20:03)

Today I compiled 29pre1 of wireless-tools, madwifi r2420-20070602, kamikaze 7447 and after 'iwconfig ath0 rate 11M still got:

root@OpenWrt:/# iwconfig ath0 rate 48M
BUG: unable to handle kernel NULL pointer dereference at virtual address 0000002e
 printing eip:
c0187a25
*pde = 00000000
Oops: 0000 [#1]
Modules linked in: scx200_wdt scx200_gpio ath_pci wlan_xauth wlan_wep wlan_tkip wlan_ccmp wlan_acl ath_rate_minstrel ath_hal(P) wlan_scan_sta wlan_scan_ap wlan nsc_gpio hwmon_vid hwmon ppp_async ppp_generic slhc crc_ccitt natsemi
CPU:    0
EIP:    0060:[<c0187a25>]    Tainted: P       VLI
EFLAGS: 00010082   (2.6.21.1 #2)
eax: fffffffe   ebx: fffffffe   ecx: ffffffdf   edx: c4873d20
esi: c3dc1320   edi: c3c200a0   ebp: c3cb4320   esp: c3fddce4
ds: 007b   es: 007b   fs: 00d8  gs: 0000  ss: 0068
Process iwconfig (pid: 1313, ti=c3fdc000 task=c111a070 task.ti=c3fdc000)
Stack: c4873d20 c3caf940 c3dc1320 c3c200a0 c3cb4320 c4873c6c c3c200a0 c4897a83
       c3e64660 c3dc1320 c3c20000 c3c200a0 c4897b11 c3c20000 c3dc1320 00000082
       c489cf68 00000046 c3c20000 c488f7d0 c3c20000 c3cb4320 00000082 c3cb4320
Call Trace:
 [<c4873c6c>] <0> [<c4897a83>] <0> [<c4897b11>] <0> [<c489cf68>] <0> [<c488f7d0>] <0> [<c489c7ca>] <0> [<c489be0f>] <0> [<c48a1ca5>] <0> [<c489be45>] <0> [<c48a1683>] <0> [<c01bdb0d>] <0> [<c48a1c9e>] <0> [<c488f1d6>] <0> [<c48a0b7e>] <0> [<c48a0da8>] <0> [<c48a64f1>] <0> [<c0206937>] <0> [<c4895730>] <0> [<c01fc274>] <0> [<c01fc74d>] <0> [<c48a6411>] <0> [<c48a6411>] <0> [<c01f3da8>] <0> [<c012d077>] <0> [<c01ea4a1>] <0> [<c01eb85f>] <0> [<c01427c1>] <0> [<c01429ca>] <0> [<c0142a0d>] <0> [<c0102300>] <0> [<c0250000>] <0> =======================
Code: 84 c0 74 0e 8b 93 cc 00 00 00 85 d2 74 04 89 d8 ff d2 8b 83 d0 00 00 00 5b e9 82 89 f9 ff 55 57 56 53 83 ec 04 89 c3 85 c0 74 49 <8b> 70 30 8b 6e 18 83 c5 34 8b 96 c8 00 00 00 85 d2 74 02 ff d2
EIP: [<c0187a25>]  SS:ESP 0068:c3fddce4
Kernel panic - not syncing: Fatal exception in interrupt

so its not a wireless-tools version problem..

you may want to try this 0.9.3.1 madwifi package. I understand nbd is working quite hard to clear this issue.

(Last edited by acoul on 2 Jun 2007, 17:09)

The problems with kernel panic seems to be gone with new releases (madwifi  2.6.21.1+r2420-20070602, kamikaze r7478) but there are still some issues:
after fixing the AP tx rate to some value the client card reports something else - the rates are hopping like in 'auto tx rate mode".

(Last edited by Marek on 3 Jun 2007, 16:33)

Marek, did you check the 0.9.3.1 at all?

I will check your madwifi today and back with results.

I tried to compile madwifi from your link.
I deleted all original files and directories in /trunk/package/madwifi folder and extracted your arichve right there.
I also did 'make package/madwifi-clean' and then -compile and I got:

ubuntu@ubuntu:~/trunk$ make package/madwifi/-compile V=99
make -C package madwifi/-compile
make[1]: Entering directory `/home/ubuntu/trunk/package'
make -C madwifi/ compile
make[2]: Entering directory `/home/ubuntu/trunk/package/madwifi'
bzcat /home/ubuntu/trunk/dl/madwifi-0.9.3.1.tar.bz2 | /bin/tar -C /home/ubuntu/trunk/build_i386/linux-2.6-x86/madwifi-0.9.3.1/.. -xf -

Applying ./patches/100-kernel_cflags.patch using plaintext:
patching file hal/public/mips-be-elf.inc
patching file hal/public/mips-le-elf.inc
patching file hal/public/xscale-be-elf.inc
Hunk #1 FAILED at 77.
1 out of 1 hunk FAILED -- saving rejects to file hal/public/xscale-be-elf.inc.rej
patching file hal/public/xscale-le-elf.inc
Hunk #1 FAILED at 78.
1 out of 1 hunk FAILED -- saving rejects to file hal/public/xscale-le-elf.inc.rej
patching file Makefile
Hunk #1 succeeded at 56 (offset 2 lines).
Patch failed!  Please fix ./patches/100-kernel_cflags.patch!
make[2]: *** [/home/ubuntu/trunk/build_i386/linux-2.6-x86/madwifi-0.9.3.1/.prepared_36cd9b9cf32638844a78ed56526eb771] Error 1
make[2]: Leaving directory `/home/ubuntu/trunk/package/madwifi'
make[1]: *** [madwifi/-compile] Error 2
make[1]: Leaving directory `/home/ubuntu/trunk/package'
make: *** [package/madwifi/-compile] Error 2

(Last edited by Marek on 4 Jun 2007, 13:32)

looks like this is a job for the new quilt feature smile

edit: btw. kamikaze trunk uses now madwifi r2420-20070602

(Last edited by forum2006 on 4 Jun 2007, 13:51)

I know, test results are above...

acoul wrote:

you may want to try this 0.9.3.1 madwifi package. I understand nbd is working quite hard to clear this issue.

Can you please try again?  I just fixed the patch.

(Last edited by acoul on 8 Jun 2007, 17:56)

acoul wrote:
acoul wrote:

you may want to try this 0.9.3.1 madwifi package. I understand nbd is working quite hard to clear this issue.

Can you please try again?  I just fixed the patch.

I tried this package but it does not work as it looks like someone converted spaces to tabs between 9.2 and 9.3 and two of the patches (100 and 101) fail.

How's the latest version from trunk doing?

nbd wrote:

How's the latest version from trunk doing?

I am having problems with the version from the trunk with the kernel locking up.

osmosis wrote:

I tried this package but it does not work as it looks like someone converted spaces to tabs between 9.2 and 9.3 and two of the patches (100 and 101) fail.

you can always add the -l option on the patch command on the scripts/patch-kernel.sh until I learn how to produce propper patches !!

(Last edited by acoul on 10 Jun 2007, 16:13)

The discussion might have continued from here.