From patchwork Fri Jun 5 19:43:54 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexis Green X-Patchwork-Id: 6557771 X-Patchwork-Delegate: johannes@sipsolutions.net 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.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 557F79F1C1 for ; Fri, 5 Jun 2015 19:44:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 76826206D4 for ; Fri, 5 Jun 2015 19:44:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 35E2520778 for ; Fri, 5 Jun 2015 19:44:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751702AbbFEToq (ORCPT ); Fri, 5 Jun 2015 15:44:46 -0400 Received: from mail-ig0-f176.google.com ([209.85.213.176]:35324 "EHLO mail-ig0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751447AbbFETop (ORCPT ); Fri, 5 Jun 2015 15:44:45 -0400 Received: by igbzc4 with SMTP id zc4so23719664igb.0 for ; Fri, 05 Jun 2015 12:44:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:reply-to:user-agent :mime-version:to:cc:subject:content-type:content-transfer-encoding; bh=7SlAeqH34yC6EsXgylEUCjtlC7w6ia3e+VxLj8RqNaY=; b=WFGUhsTvjrxH0+/h4hqmIlqz58gKBLj1ay6WLnjVAgFne9Xa2TRsxEjjLmyVvkQVDO baZOIih3IzzZTZ/2La1TtEkZKS43b4ozx1Y0c+xF/yGoQGA1ADp9lTs3Knx9CqxjSJmq QMSONmb0UFohTaTYdx7W4JIDCukx/YwhyzdMLor2pcBceAui5imJY/deigcSEEHebFoz vVEDLuaHcu5rXHuSjBODjqmCn02Ru1OPuWCEL/4WC1gW35KyR15w1MoRtcC3RijkFXRS FovOIGhNDhC6n2G9OqGkYxPZuPN67aFgLmLrV1UBmNpKIoW2xHT2pCk7sngAPEQf2lCk Yl6w== X-Gm-Message-State: ALoCoQmwsRiYly7HJCaUNt7n1baW3YYNjhGtVzK6gs3VBmgpznKWb3lUizByADLD84XtawkhdlAh X-Received: by 10.107.135.68 with SMTP id j65mr6447436iod.91.1433533485300; Fri, 05 Jun 2015 12:44:45 -0700 (PDT) Received: from [10.4.0.237] ([67.137.71.162]) by mx.google.com with ESMTPSA id pg7sm1983806igb.6.2015.06.05.12.44.43 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 05 Jun 2015 12:44:44 -0700 (PDT) Message-ID: <5571FBFA.9060902@cococorp.com> Date: Fri, 05 Jun 2015 12:43:54 -0700 From: Alexis Green Reply-To: agreen@cococorp.com User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Johannes Berg CC: linux-wireless@vger.kernel.org, Jesse Jones Subject: [PATCH] mac80211: Fix incorrectly named last_hop_metric variable in mesh_rx_path_sel_frame Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, 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 The last hop metric should refer to link cost (this is how hwmp_route_info_get uses it for example). But in mesh_rx_path_sel_frame we are not dealing with link cost but with the total cost to the origin of a PREQ or PREP. Signed-off-by: Alexis Green CC: Jesse Jones --- -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c index 214e63b..be33e41 100644 --- a/net/mac80211/mesh_hwmp.c +++ b/net/mac80211/mesh_hwmp.c @@ -854,7 +854,7 @@ void mesh_rx_path_sel_frame(struct ieee80211_sub_if_data *sdata, { struct ieee802_11_elems elems; size_t baselen; - u32 last_hop_metric; + u32 path_metric; struct sta_info *sta; /* need action_code */ @@ -877,21 +877,21 @@ void mesh_rx_path_sel_frame(struct ieee80211_sub_if_data *sdata, if (elems.preq_len != 37) /* Right now we support just 1 destination and no AE */ return; - last_hop_metric = hwmp_route_info_get(sdata, mgmt, elems.preq, - MPATH_PREQ); - if (last_hop_metric) + path_metric = hwmp_route_info_get(sdata, mgmt, elems.preq, + MPATH_PREQ); + if (path_metric) hwmp_preq_frame_process(sdata, mgmt, elems.preq, - last_hop_metric); + path_metric); } if (elems.prep) { if (elems.prep_len != 31) /* Right now we support no AE */ return; - last_hop_metric = hwmp_route_info_get(sdata, mgmt, elems.prep, - MPATH_PREP); - if (last_hop_metric) + path_metric = hwmp_route_info_get(sdata, mgmt, elems.prep, + MPATH_PREP); + if (path_metric) hwmp_prep_frame_process(sdata, mgmt, elems.prep, - last_hop_metric); + path_metric); } if (elems.perr) { if (elems.perr_len != 15)