From owner-freebsd-mobile@FreeBSD.ORG Sat Feb 11 06:14:03 2006 Return-Path: X-Original-To: freebsd-mobile@freebsd.org Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3EE7316A420 for ; Sat, 11 Feb 2006 06:14:03 +0000 (GMT) (envelope-from parv@pair.com) Received: from mta13.adelphia.net (mta13.mail.adelphia.net [68.168.78.44]) by mx1.FreeBSD.org (Postfix) with ESMTP id BEC4243D45 for ; Sat, 11 Feb 2006 06:14:02 +0000 (GMT) (envelope-from parv@pair.com) Received: from default.chvlva.adelphia.net ([68.67.248.200]) by mta13.adelphia.net (InterMail vM.6.01.05.02 201-2131-123-102-20050715) with ESMTP id <20060211061401.WBPZ25152.mta13.adelphia.net@default.chvlva.adelphia.net> for ; Sat, 11 Feb 2006 01:14:01 -0500 Received: by default.chvlva.adelphia.net (Postfix, from userid 1000) id EA749B963; Sat, 11 Feb 2006 01:14:07 -0500 (EST) Date: Sat, 11 Feb 2006 01:14:07 -0500 From: Parv To: f-mobile Message-ID: <20060211061407.GA17798@holestein.holy.cow> Mail-Followup-To: f-mobile Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: Meaningfulness of "iwi0: could not allocate firmware DMA memory" X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Feb 2006 06:14:03 -0000 I am using iwi driver (loaded as a module) from net/iwi-firmware for Intel 2200BG wireless on IBM Thinkpad T42 (2373-5TU) running FreeBSD 6-STABLE (Feb 3 2006). Connection is provided by Linksys WRT54G (version 4). Before putting the laptop to sleep, i "stop" the driver/firmware & after resuming i "start" it (via script given at the end). I have to "reset" the iwi interface when a message about TKIP ICV mismatch is printed at least more than once (Linksys's MAC address is munged) ... Feb 10 15:25:40 holestein kernel: iwi0: [Li:nk:sy:sW:RT:54] TKIP ICV mismatch on decrypt This email is about the messages emitted regarding failure to load iwi firmware, similar to the following (Intel 2200BG's address is munged) ... Feb 10 23:04:18 holestein kernel: pci2:2:0: reprobing on driver added Feb 10 23:04:18 holestein kernel: iwi0: mem 0xc0214000-0xc0214fff irq 11 at device 2.0 on pci2 Feb 10 23:04:18 holestein kernel: pcib2: iwi0 requested memory range 0xc0214000-0xc0214fff: good Feb 10 23:04:18 holestein kernel: iwi0: bpf attached Feb 10 23:04:18 holestein kernel: iwi0: Ethernet address: In:te:l2:20:00:BG Feb 10 23:04:18 holestein kernel: iwi0: bpf attached Feb 10 23:04:18 holestein kernel: iwi0: bpf attached Feb 10 23:04:18 holestein kernel: iwi0: [MPSAFE] Feb 10 23:04:18 holestein kernel: iwi0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps Feb 10 23:04:18 holestein kernel: iwi0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps Feb 10 23:04:18 holestein kernel: iwi0: could not allocate firmware DMA memory Feb 10 23:04:18 holestein kernel: iwi0: could not load main firmware Feb 10 23:04:18 holestein kernel: iwi0: could not allocate firmware DMA memory Feb 10 23:04:18 holestein kernel: iwi0: could not load main firmware Feb 10 23:04:18 holestein kernel: iwi0: _ieee80211_crypto_delkey: NONE keyix 65535 flags 0x3 rsc 0 tsc 0 len 0 Feb 10 23:04:18 holestein last message repeated 3 times Feb 10 23:04:18 holestein kernel: iwi0: could not allocate firmware DMA memory Feb 10 23:04:18 holestein kernel: iwi0: could not load main firmware Feb 10 23:04:30 holestein kernel: iwi0: _ieee80211_crypto_delkey: NONE keyix 65535 flags 0x3 rsc 0 tsc 0 len 0 Feb 10 23:04:30 holestein kernel: iwi0: link state changed to UP Feb 10 23:04:30 holestein kernel: iwi0: ieee80211_crypto_newkey: no h/w support for cipher TKIP, falling back to s/w ... and yet the connection is established (in this case after 12 seconds). Does "iwicontrol -k" really not kill the firmware? If the firmware could not be loaded, how come a working connection is established eventually? Following is the script which is use to start|reset|stop the iwi module|driver|interface ... #!/bin/sh DEBUG= set_debug() { local debug_crypto=0x10000000 local debug_any=-1 local current=$debug_crypto [ -z "$DEBUG" ] \ && sysctl net.wlan.debug=$current \ && sysctl net.wlan.0.debug=$current DEBUG=1 } load_module_firmware() { kldload if_iwi iwicontrol iwi0 -d /boot/firmware -m bss iwicontrol iwi0 -r set_debug } set_iwi_route() { ifconfig iwi0 down && ifconfig iwi0 delete ifconfig iwi0 mode 11g route flush ifconfig iwi0 inet 192.168.2.103/24 route add default 192.168.2.1 } start_iwi() { ifconfig iwi0 ssid 'some-ssid' up wpa_supplicant -B -i iwi0 -c /etc/wpa_supplicant.conf sleep 2 # Reload ipf rules. ipf.sh restart set_debug } stop_iwi() { killall wpa_supplicant ifconfig iwi0 down && ifconfig iwi0 delete iwicontrol -i iwi0 -k iwicontrol -i iwi0 -k iwicontrol -i iwi0 -k kldunload if_iwi } set -x case "$1" in stop* | kill* | unload* ) stop_iwi ;; reset* | restart* ) wpa_cli terminate start_iwi ;; start* | load* ) load_module_firmware set_iwi_route start_iwi ;; esac date - Parv --