From patchwork Wed May 29 12:25:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Coelho X-Patchwork-Id: 10966911 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-2.web.codeaurora.org (Postfix) with ESMTP id 476561398 for ; Wed, 29 May 2019 12:25:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 392492837E for ; Wed, 29 May 2019 12:25:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2CB3428968; Wed, 29 May 2019 12:25:55 +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.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, 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 CADEA28739 for ; Wed, 29 May 2019 12:25:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727038AbfE2MZy (ORCPT ); Wed, 29 May 2019 08:25:54 -0400 Received: from paleale.coelho.fi ([176.9.41.70]:54316 "EHLO farmhouse.coelho.fi" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726996AbfE2MZv (ORCPT ); Wed, 29 May 2019 08:25:51 -0400 Received: from 91-156-6-193.elisa-laajakaista.fi ([91.156.6.193] helo=redipa.ger.corp.intel.com) by farmhouse.coelho.fi with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1hVxeP-0007wy-MJ; Wed, 29 May 2019 15:25:49 +0300 From: Luca Coelho To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg , Luca Coelho Subject: [PATCH 09/10] mac80211: fill low rate even for HAS_RATE_CONTROL Date: Wed, 29 May 2019 15:25:36 +0300 Message-Id: <20190529122537.8564-10-luca@coelho.fi> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190529122537.8564-1-luca@coelho.fi> References: <20190529122537.8564-1-luca@coelho.fi> MIME-Version: 1.0 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: Johannes Berg If HW advertises it has rate control, we skip all of the rate control assignments, but sometimes the data we have here is useful, especially so that we don't have to do the lookups again on which rates are configured and are supported. So do the low rate assignment anyway to help out drivers that might need it. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho --- net/mac80211/rate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/mac80211/rate.c b/net/mac80211/rate.c index 8747231f7aa3..5d94576dd683 100644 --- a/net/mac80211/rate.c +++ b/net/mac80211/rate.c @@ -893,10 +893,10 @@ void rate_control_get_rate(struct ieee80211_sub_if_data *sdata, info->control.rates[i].count = 0; } - if (ieee80211_hw_check(&sdata->local->hw, HAS_RATE_CONTROL)) + if (rate_control_send_low(sta ? &sta->sta : NULL, txrc)) return; - if (rate_control_send_low(sta ? &sta->sta : NULL, txrc)) + if (ieee80211_hw_check(&sdata->local->hw, HAS_RATE_CONTROL)) return; if (sta && test_sta_flag(sta, WLAN_STA_RATE_CONTROL)) {