From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mx2.redhat.com ([66.187.237.31]:48814 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753058AbZBUSq0 (ORCPT ); Sat, 21 Feb 2009 13:46:26 -0500 Subject: Re: Signal quality strange since commit 708c57cf1709fb95 From: Dan Williams To: Larry Finger Cc: John Linville , Johannes Berg , wireless In-Reply-To: <49A01922.1090106@lwfinger.net> References: <49A01922.1090106@lwfinger.net> Content-Type: text/plain Date: Sat, 21 Feb 2009 13:44:27 -0500 Message-Id: <1235241867.3284.44.camel@localhost> (sfid-20090221_194631_342564_8F23A186) Mime-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org List-ID: On Sat, 2009-02-21 at 09:09 -0600, Larry Finger wrote: > I admit that I didn't follow the discussion of reporting signal quality very > closely; however since commit 708c57cf1709fb95, all of my wireless devices (b43, > p54usb, rtl8187) are reporting link quality as XX/70 rather than XX/100. I doubt > that this was an intended consequence of that patch. If the SIOCGIWRANGE ioctl > is now more correct, what changes are needed in the drivers to restore the old > behavior? Having written the qual calculation for 2 drivers, I understand the > uselessness of this number, but I also know the uproar such a change will cause > in the user community. Intended. It doesn't matter what the /X number is; it's simply the upper bound of what the # before the / will be. Quality is in the range of [0 ... max_qual.qual]. You should be able to divide quality / max_qual.qual and get a reasonable number to use for pretty UI display. Many drivers used to use something other than 100 for max quality, and many still do: airo.c: range->max_qual.qual = airo_get_max_quality(&cap_rid); hostap/hostap_ioctl.c: range->max_qual.qual = 70; /* what is correct max? This was not hostap/hostap_ioctl.c: range->max_qual.qual = 92; /* 0 .. 92 */ netwave_cs.c: range->max_qual.qual = 255; orinoco/wext.c: range->max_qual.qual = 0x8b - 0x2f; wavelan.c: range->max_qual.qual = MMR_SGNL_QUAL; wavelan_cs.c: range->max_qual.qual = MMR_SGNL_QUAL; zd1201.c: range->max_qual.qual = 128; Dan