From patchwork Wed Dec 14 19:47:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felix Fietkau X-Patchwork-Id: 9474611 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 675B960824 for ; Wed, 14 Dec 2016 19:47:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5730D28651 for ; Wed, 14 Dec 2016 19:47:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4C3D828595; Wed, 14 Dec 2016 19:47:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5EAE328716 for ; Wed, 14 Dec 2016 19:47:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756591AbcLNTrm (ORCPT ); Wed, 14 Dec 2016 14:47:42 -0500 Received: from nbd.name ([46.4.11.11]:54228 "EHLO nbd.name" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756532AbcLNTrR (ORCPT ); Wed, 14 Dec 2016 14:47:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=FnjyOMSRoCFS0luLTxS4wk27IdUkW9FLES8RXF4y1hU=; b=a3TDqbl7Tw99scQubiiCJC2NhRwFWljw2hawWL8oDYX6CyMF7gsdt5UVR0Ub0IEM+InQUJjc2kbe7o3z5irDKHp0yt+YmAKxrKNDXnMojJTFu8PrwA4BnQ4FzJZXpefVSA1aPSzNKJo5H8I1nWAW+/1J/nGD7CigF0xPkgfU0sc=; Received: by nf-4.local (Postfix, from userid 501) id E0DFD17728A76; Wed, 14 Dec 2016 20:47:03 +0100 (CET) From: Felix Fietkau To: linux-wireless@vger.kernel.org Cc: johannes@sipsolutions.net, thomas.huehn@evernet-eg.de Subject: [PATCH 10/10] mac80211: minstrel: avoid port control frames for sampling Date: Wed, 14 Dec 2016 20:47:03 +0100 Message-Id: <20161214194703.33429-10-nbd@nbd.name> X-Mailer: git-send-email 2.10.1 In-Reply-To: <20161214194703.33429-1-nbd@nbd.name> References: <20161214194703.33429-1-nbd@nbd.name> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Thomas Huehn Makes connections more reliable Signed-off-by: Thomas Huehn Signed-off-by: Felix Fietkau --- net/mac80211/rc80211_minstrel.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/net/mac80211/rc80211_minstrel.c b/net/mac80211/rc80211_minstrel.c index 11a4cc3..3ebe440 100644 --- a/net/mac80211/rc80211_minstrel.c +++ b/net/mac80211/rc80211_minstrel.c @@ -367,6 +367,11 @@ minstrel_get_rate(void *priv, struct ieee80211_sta *sta, return; #endif + /* Don't use EAPOL frames for sampling on non-mrr hw */ + if (mp->hw->max_rates == 1 && + (info->control.flags & IEEE80211_TX_CTRL_PORT_CTRL_PROTO)) + return; + delta = (mi->total_packets * sampling_ratio / 100) - (mi->sample_packets + mi->sample_deferred / 2);