Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1244120
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Luis de Bethencourt <luisbg@osg.samsung.com> |
| Newsgroups | linux.kernel |
| Subject | [PATCH] staging: rtl8712: fix negative level value |
| Date | Sun, 11 Oct 2015 15:20:01 +0200 |
| Message-ID | <qioHD-Zv-1@gated-at.bofh.it> (permalink) |
| X-Original-To | linux-kernel@vger.kernel.org |
| X-Mailer | git-send-email 2.5.1 |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 30 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Larry.Finger@lwfinger.net, florian.c.schilhabel@googlemail.com, gregkh@linuxfoundation.org, stillcompiling@gmail.com, vthakkar1994@gmail.com, hamohammed.sa@gmail.com, dan.carpenter@oracle.com, mahfouz.saif.elyazal@gmail.com, sudipm.mukherjee@gmail.com, cristina.opriceana@gmail.com, Julia.Lawall@lip6.fr, amsfield22@gmail.com, devel@driverdev.osuosl.org, Luis de Bethencourt <luisbg@osg.samsung.com> |
| X-Original-Date | Sun, 11 Oct 2015 14:16:57 +0100 |
| X-Original-Message-ID | <1444569417-22034-1-git-send-email-luisbg@osg.samsung.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1244120 |
Show key headers only | View raw
range->avg_qual.level is of type uint8, so it shouldn't be assigned a negative number. Assigning it 0x100 - 78, which is the equivalent to (20 + -98) dBm when IW_QUAL_DBM is set. Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com> --- drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c index 57ec8df..4e6db88 100644 --- a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c +++ b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c @@ -883,7 +883,7 @@ static int r8711_wx_get_range(struct net_device *dev, range->max_qual.updated = 7; /* Updated all three */ range->avg_qual.qual = 92; /* > 8% missed beacons is 'bad' */ /* TODO: Find real 'good' to 'bad' threshold value for RSSI */ - range->avg_qual.level = 20 + -98; + range->avg_qual.level = 0x100 - 78; range->avg_qual.noise = 0; range->avg_qual.updated = 7; /* Updated all three */ range->num_bitrates = RATE_COUNT; -- 2.5.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH] staging: rtl8712: fix negative level value Luis de Bethencourt <luisbg@osg.samsung.com> - 2015-10-11 15:20 +0200
csiph-web