From patchwork Tue Jun 9 20:00:43 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexis Green X-Patchwork-Id: 6575051 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 12AF4C0020 for ; Tue, 9 Jun 2015 20:01:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2C12320547 for ; Tue, 9 Jun 2015 20:01:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 42E63204A2 for ; Tue, 9 Jun 2015 20:01:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933261AbbFIUA7 (ORCPT ); Tue, 9 Jun 2015 16:00:59 -0400 Received: from mail-ie0-f173.google.com ([209.85.223.173]:35507 "EHLO mail-ie0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753738AbbFIUAw (ORCPT ); Tue, 9 Jun 2015 16:00:52 -0400 Received: by iesa3 with SMTP id a3so20847652ies.2 for ; Tue, 09 Jun 2015 13:00:52 -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=vBayq82ArbEUtyfgcH+ZbDjhFo0nvp6hNWifPtCtflk=; b=Sg6PYKWcm258GcOaBzioU0wu/wxxhJ1Nma83j9v+yIjqbQ8OjIIAisI9ltqf25lpSU lHYtUP/7j1BHP08zpncfetRKeoBb0aKaIp31pTnval4m8IGYN0QTu8QxMMxX8Edsr1Q6 Ly0Hrt+FJ6/Y4cmi8wy2ngTdad4syWKvQ7qnTV8dMiDIY85OY8gaf0SzJCNk2To3SJ/I XPe+poANZWylh5ECWZ8gQ4BOxh5cQqDBI1pB0fyLlUawwz4fArUeEbrCL4B3pOJ9uBnT 0WrFd1Hw0GIsKsG6BVDepTTo3n1vYu//efKcriUQJUstayxUko1gZxvxCdpiPXBXdPI3 AeqA== X-Gm-Message-State: ALoCoQlX1RN5YWiyHfVxvSQuFSfsGTWPVH6isL1iDjSoKNpgHKAplwJe92eKTvQKFGnSNg6aGNCK X-Received: by 10.42.204.4 with SMTP id fk4mr630433icb.72.1433880052092; Tue, 09 Jun 2015 13:00:52 -0700 (PDT) Received: from [10.4.0.237] ([67.137.71.162]) by mx.google.com with ESMTPSA id j5sm4569039ioo.8.2015.06.09.13.00.51 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 09 Jun 2015 13:00:51 -0700 (PDT) Message-ID: <557745EB.9080907@cococorp.com> Date: Tue, 09 Jun 2015 13:00:43 -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 v2]: mac80211: Always check rates and capabilities in mesh mode 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 In mesh mode there is a race between establishing links and processing rates and capabilities in beacons. This is very noticeable with slow beacons (e.g. beacon intervals of 1s) and manifested for us as stations using minstrel when minstrel_ht should be used. Fixed by changing mesh_sta_info_init so that it always checks rates and such if it has not already done so. 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_plink.c b/net/mac80211/mesh_plink.c index ac843fc..54656af 100644 --- a/net/mac80211/mesh_plink.c +++ b/net/mac80211/mesh_plink.c @@ -394,8 +394,9 @@ static void mesh_sta_info_init(struct ieee80211_sub_if_data *sdata, sta->last_rx = jiffies; /* rates and capabilities don't change during peering */ - if (sta->plink_state == NL80211_PLINK_ESTAB) + if (sta->plink_state == NL80211_PLINK_ESTAB && sta->processed_beacon) goto out; + sta->processed_beacon = true; if (sta->sta.supp_rates[band] != rates) changed |= IEEE80211_RC_SUPP_RATES_CHANGED; diff --git a/net/mac80211/sta_info.h b/net/mac80211/sta_info.h index 9bd1e97..226f8ca4 100644 --- a/net/mac80211/sta_info.h +++ b/net/mac80211/sta_info.h @@ -369,6 +369,8 @@ struct ieee80211_fast_tx { * @rx_msdu: MSDUs received from this station, using IEEE80211_NUM_TID * entry for non-QoS frames * @fast_tx: TX fastpath information + * @processed_beacon: set to true after peer rates and capabilities are + * processed */ struct sta_info { /* General information, mostly static */ @@ -473,6 +475,7 @@ struct sta_info { enum nl80211_mesh_power_mode local_pm; enum nl80211_mesh_power_mode peer_pm; enum nl80211_mesh_power_mode nonpeer_pm; + bool processed_beacon; #endif #ifdef CONFIG_MAC80211_DEBUGFS