From patchwork Fri May 29 22:24:44 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexis Green X-Patchwork-Id: 6511681 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 78A41C0020 for ; Fri, 29 May 2015 22:24:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9EB2620612 for ; Fri, 29 May 2015 22:24:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 904642061C for ; Fri, 29 May 2015 22:24:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757325AbbE2WYr (ORCPT ); Fri, 29 May 2015 18:24:47 -0400 Received: from mail-la0-f41.google.com ([209.85.215.41]:35241 "EHLO mail-la0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757250AbbE2WYp (ORCPT ); Fri, 29 May 2015 18:24:45 -0400 Received: by labko7 with SMTP id ko7so62156495lab.2 for ; Fri, 29 May 2015 15:24:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to:cc :content-type; bh=XcIq5eVv1Z/x2onOQK9/CkJ6X3Z2C+KqMcqPRVzT2Ck=; b=bsp4VnZDMV4IEmoj0D1kaovpByA2n2IJqOJeajc27+eQX2is/NMGRptxyIMDt5lAR5 e5adfz37jJIGMu8EXqNiPiA8LeQCWLo26Mdp9Jw5AGF5nVGTHGbBxWCjyoJRycbhmpLx 3+2XM8cIIpjvWYeCGULbVQYQVueWBjGb0xh4JYMLt5HC1Ct/Izk7EcqyC/KUIAOROktr Sjak4wIuGPdalApYCX9VWMGoS0LI64Mt+G/XVUJOWRLJC+KOKSutam6DR5po9hUaQOtm hq6RxSEQYXnu/7phZGcgbz33pkx2Z7d8ETbK5B/Jvsbgc90+4T3TqQahrGrxoURVF45Q QGQA== X-Gm-Message-State: ALoCoQlbskPq0BxmS6/wKWGD0Gg+bTNDiuCRi3mcPzZh7bQ4wUWO0jAs0zAPBTt92xkQAQBTswL9 MIME-Version: 1.0 X-Received: by 10.152.87.72 with SMTP id v8mr9880816laz.2.1432938284130; Fri, 29 May 2015 15:24:44 -0700 (PDT) Received: by 10.152.7.35 with HTTP; Fri, 29 May 2015 15:24:44 -0700 (PDT) Date: Fri, 29 May 2015 15:24:44 -0700 Message-ID: Subject: [PATCH] mac80211: Always check rates and capabilities in mesh mode From: Alexis Green To: Johannes Berg Cc: linux-wireless , Jesse Jones 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..4f9f23c 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->processedBeacon) goto out; + sta->processedBeacon = 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..e3ae2b0 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 + * @processedBeacon: 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 processedBeacon; #endif #ifdef CONFIG_MAC80211_DEBUGFS