From owner-freebsd-wireless@FreeBSD.ORG Sat May 11 22:00:14 2013 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 6DD5ED1; Sat, 11 May 2013 22:00:14 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wi0-x229.google.com (mail-wi0-x229.google.com [IPv6:2a00:1450:400c:c05::229]) by mx1.freebsd.org (Postfix) with ESMTP id 621D8B52; Sat, 11 May 2013 22:00:13 +0000 (UTC) Received: by mail-wi0-f169.google.com with SMTP id h11so1859583wiv.2 for ; Sat, 11 May 2013 15:00:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=UApw2vWb5qSprMubIVLb4Rxikv4m9LcVe/CVQvESstk=; b=H1Rb35shou3r0d538txJ/LuNyOXVoS//ykvMkrsOx/RVvDfzdtleTzYmscxolFoFSR FFDiyLhZNrIbhGhhd2/pWFTlXXiR/9+JRx/Cx37D68P+p54ZCZ2aAROTZzvocNHoQNKd jflFEz/V+mGOHcYv2v3ckBoXbyPhSjhsBmMb3qDY/XAfEV7RQztHEQy5l+G5YikRrLQT 1xl/tVjknr9X/Wop/v+I0MFvZsdIx6CGux8xuiyaEOQmqWAxcNxSNYgB+x+z20b/ZB/n 5Q1Nh10oZlDkc7eU8fCUjbHX/nObNEOwG80uhCFRdyBtS6HitYu8baS3wkCBoTlkO4lN CJkw== MIME-Version: 1.0 X-Received: by 10.180.93.134 with SMTP id cu6mr10586099wib.8.1368309612501; Sat, 11 May 2013 15:00:12 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.217.58.138 with HTTP; Sat, 11 May 2013 15:00:12 -0700 (PDT) In-Reply-To: <201305112055.r4BKtFif062874@svn.freebsd.org> References: <201305112055.r4BKtFif062874@svn.freebsd.org> Date: Sat, 11 May 2013 15:00:12 -0700 X-Google-Sender-Auth: jzot77f1mCyBjC1qsHKCPOU5wa8 Message-ID: Subject: Re: svn commit: r250528 - head/usr.sbin/wpa/wpa_supplicant From: Adrian Chadd To: Eitan Adler Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, freebsd-wireless@freebsd.org X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 May 2013 22:00:14 -0000 oh thank _god_ someone fixed this. It's been bugging me for about a year, but I've been too slack (hah!) to figure out why. Next, teaching it about whether to prefer 2ghz or 5ghz APs.. Adrian On 11 May 2013 13:55, Eitan Adler wrote: > Author: eadler > Date: Sat May 11 20:55:14 2013 > New Revision: 250528 > URL: http://svnweb.freebsd.org/changeset/base/250528 > > Log: > Teach wpa_supplicant to properly compute wireless signal strength. > > PR: bin/170631 > Submitted by: Daan Vreeken > Reviewed by: adrian > > Modified: > head/usr.sbin/wpa/wpa_supplicant/driver_freebsd.c > > Modified: head/usr.sbin/wpa/wpa_supplicant/driver_freebsd.c > ============================================================================== > --- head/usr.sbin/wpa/wpa_supplicant/driver_freebsd.c Sat May 11 20:51:00 2013 (r250527) > +++ head/usr.sbin/wpa/wpa_supplicant/driver_freebsd.c Sat May 11 20:55:14 2013 (r250528) > @@ -693,6 +693,11 @@ wpa_driver_bsd_add_scan_entry(struct wpa > result->caps = sr->isr_capinfo; > result->qual = sr->isr_rssi; > result->noise = sr->isr_noise; > + /* > + * the rssi value reported by the kernel is in 0.5dB steps relative to > + * the reported noise floor. see ieee80211_node.h for details. > + */ > + result->level = sr->isr_rssi / 2 + sr->isr_noise; > > pos = (u8 *)(result + 1); >