From patchwork Thu Jul 11 09:23:35 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chun-Yeow Yeoh X-Patchwork-Id: 2826239 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C95FD9F7D6 for ; Thu, 11 Jul 2013 09:30:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B15B22010A for ; Thu, 11 Jul 2013 09:30:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 225C320115 for ; Thu, 11 Jul 2013 09:30:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751607Ab3GKJar (ORCPT ); Thu, 11 Jul 2013 05:30:47 -0400 Received: from mail-pb0-f53.google.com ([209.85.160.53]:45714 "EHLO mail-pb0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750904Ab3GKJaq (ORCPT ); Thu, 11 Jul 2013 05:30:46 -0400 Received: by mail-pb0-f53.google.com with SMTP id xb12so7686524pbc.26 for ; Thu, 11 Jul 2013 02:30:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer; bh=mCMk7jZz4y+/jV/TkGg4kFgtYYB0aPzhuWkNcpFW6kA=; b=k0wd1stFDp4uHTIDA8yGRSRHt//BJzBZ6EhJIFT+NIbOKPv29RDZaDGhjZ5VcPk7ge B1p9nemswv7VrQ06eSWmJTabOAFjnV5CtLRLfcIXL8ZSSeWKo/J7pCBp3xNvTL5tq4mj AbKL49RIwAHB/nt+TtoW9KS64kngI7K3UVA8f8tSJpiFhFNhW1S+RCuqNHLX+b4oq4ek Hu8HNFmXA64j7DKTJE9Yr11NGPiHXT0X8maS6s0dFKshvB++dcSuftIrubnxY7JqbMMO Gf0Lu4r0jxISX50Yb2gdWUiyYRU+zM4lNMuVrIJnJqaqwJ+zLhSNfOUQxm9e8wYugKzE d5Cg== X-Received: by 10.66.14.196 with SMTP id r4mr37744002pac.57.1373535046419; Thu, 11 Jul 2013 02:30:46 -0700 (PDT) Received: from localhost.localdomain ([58.26.233.146]) by mx.google.com with ESMTPSA id eq5sm38750701pbc.15.2013.07.11.02.30.40 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 11 Jul 2013 02:30:45 -0700 (PDT) From: Chun-Yeow Yeoh To: linux-wireless@vger.kernel.org Cc: johannes@sipsolutions.net, linville@tuxdriver.com, devel@lists.open80211s.org, distro11s@cozybit.com, Chun-Yeow Yeoh Subject: [PATCH] nl80211: fix the setting of RSSI threshold value for mesh Date: Thu, 11 Jul 2013 17:23:35 +0800 Message-Id: <1373534615-17270-1-git-send-email-yeohchunyeow@gmail.com> X-Mailer: git-send-email 1.7.0.4 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP RSSI threshold value used for mesh peering should be in negative value. After range checks to mesh parameters is introduced, this is not allowed. Fix this. Signed-off-by: Chun-Yeow Yeoh --- net/wireless/nl80211.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index a9444cd..e6164ab 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -4803,9 +4803,9 @@ do { \ FILL_IN_MESH_PARAM_IF_SET(tb, cfg, dot11MeshForwarding, 0, 1, mask, NL80211_MESHCONF_FORWARDING, nla_get_u8); - FILL_IN_MESH_PARAM_IF_SET(tb, cfg, rssi_threshold, 1, 255, - mask, NL80211_MESHCONF_RSSI_THRESHOLD, - nla_get_u32); + FILL_IN_MESH_PARAM_IF_SET(tb, cfg, rssi_threshold, + 0x80000000, 0xFFFFFFFF, mask, + NL80211_MESHCONF_RSSI_THRESHOLD, nla_get_u32); FILL_IN_MESH_PARAM_IF_SET(tb, cfg, ht_opmode, 0, 16, mask, NL80211_MESHCONF_HT_OPMODE, nla_get_u16);