From owner-freebsd-current@FreeBSD.ORG Sun Jul 8 16:52:11 2007 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4725B16A400; Sun, 8 Jul 2007 16:52:11 +0000 (UTC) (envelope-from sam@errno.com) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.freebsd.org (Postfix) with ESMTP id 06F5613C465; Sun, 8 Jul 2007 16:52:10 +0000 (UTC) (envelope-from sam@errno.com) Received: from sam-lefflers-powerbook-g4-15.local ([10.0.0.178]) (authenticated bits=0) by ebb.errno.com (8.13.6/8.12.6) with ESMTP id l68GqAJv097683 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 8 Jul 2007 09:52:10 -0700 (PDT) (envelope-from sam@errno.com) Message-ID: <46911636.3030604@errno.com> Date: Sun, 08 Jul 2007 09:52:06 -0700 From: Sam Leffler Organization: Errno Consulting User-Agent: Thunderbird 2.0.0.4 (Macintosh/20070604) MIME-Version: 1.0 To: Sergey Matveychuk References: <4690A363.1050307@FreeBSD.org> <20070708102059.GA65610@heff.fud.org.nz> <469109EE.1030303@FreeBSD.org> In-Reply-To: <469109EE.1030303@FreeBSD.org> X-Enigmail-Version: 0.95.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-current@freebsd.org, Andrew Thompson Subject: Re: iwi loses ssid X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jul 2007 16:52:11 -0000 Sergey Matveychuk wrote: > Andrew Thompson wrote: >> On Sun, Jul 08, 2007 at 12:42:11PM +0400, Sergey Matveychuk wrote: >>> Hi. >>> >>> After I upgraded to Jul 1 CURRENT my notebook's iwi adapter started >>> work unstable. It loses carrier. When I take a look at ifconfig >>> output I see a strange ssid. After I make ifconfig iwi0 ssid myssid, >>> everything is recovered. Time between ssid losses is accidental. >>> Sometimes minutes, sometimes hours. >> >> Could you enable logging with 'wlandebug -i iwi0 +roam' and paste the >> output when it switches access points. > > When everything OK: > ul 8 19:49:22 solem kernel: iwi0: sta_roam_check: currssi 80 currate 2 > roamrssi 14 roamrate 10 > Jul 8 19:49:22 solem kernel: iwi0: macaddr bssid chan > rssi rate flag wep essid > Jul 8 19:49:22 solem kernel: - 00:19:5b:54:26:39 00:19:5b:54:26:39 6 > 44 54M ess no! "default" > Jul 8 19:49:22 solem kernel: + 00:16:e3:f3:c6:32 00:16:e3:f3:c6:32 11 > 39 54M ess wep "ZXDSL531BII-1A0EE6" > Jul 8 19:49:22 solem kernel: + 00:18:f8:a3:7a:58 00:18:f8:a3:7a:58 11 > 80 54M ess wep "sem-home"* > Jul 8 19:49:37 solem kernel: iwi0: sta_roam_check: currssi 80 currate 2 > roamrssi 14 roamrate 10 > > SSID is reseted to ZXDSL531BII-1A0EE6: > Jul 8 19:50:07 solem kernel: iwi0: macaddr bssid chan > rssi rate flag wep essid > Jul 8 19:50:07 solem kernel: - 00:19:5b:54:26:39 00:19:5b:54:26:39 6 > 43 54M ess no! "default" > Jul 8 19:50:07 solem kernel: + 00:16:e3:f3:c6:32 00:16:e3:f3:c6:32 11 > 38 54M ess wep "ZXDSL531BII-1A0EE6" > Jul 8 19:50:07 solem kernel: ^ 00:18:f8:a3:7a:58 00:18:f8:a3:7a:58 11 > 80 54M ess wep "sem-home"* > Jul 8 19:50:07 solem kernel: iwi0: sta_roam_check: ROAM: curRate 2, > roamRate 10, curRssi 80, roamRssi 14 > Jul 8 19:50:07 solem kernel: iwi0: link state changed to DOWN > > How can I protect self from an alien AP? > First thing to notice is that iwi is reporting rssi that is not calibrated to .5 dBm units. Initially this is unimportant since the threshold is 7 dBm (14) and hence it doesn't trigger roaming--but later on it does suppress roaming back to your desired ap. However the current tx rate in the first case is set to 1 Mb/s (currssi 2) and that is below the roaming threshold (5 Mb/s) so net80211 looks to roam to a better ap. You can avoid this several ways: ifconfig iwi -bgscan will disable bg scanning and implicitly roaming but then you'll potentially do a full scan when you need to roam or respond to your ap dropping you (e.g. due to inactivity). Otherwise I think you can do: ifconfig iwi roam:rate11g 1 to set the threshold on the tx rate to 1 Mb/s. But the better fix is to correct the driver so it reports calibrated rssi and figure out why the tx rate is dropping so low given the apparent strong signal. Another way to disable roaming is: ifconfig iwi roaming device though that won't work if you're using wpa_supplicant as it will set roaming mode to manual so it can control operation of the net80211 state machine. Sam