From patchwork Thu Jul 26 07:16:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wen Gong X-Patchwork-Id: 10545349 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 A2C97139A for ; Thu, 26 Jul 2018 07:17:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8838F2AD9E for ; Thu, 26 Jul 2018 07:17:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7BC982ADA8; Thu, 26 Jul 2018 07:17:09 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2E0A02ADA5 for ; Thu, 26 Jul 2018 07:17:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=O9AS0AWQ+afgFo77CgA7IxFPNeR37yH2y3OMmDqEd6k=; b=cEBuW63Zt9BwKsG3gMQ+sAwbFx nyc1AjQP4rD16cLDuky518OYJhHLW/vlNF+2FqeqrmlZ2o8Gtonae+cbXH/4+nqrJg7RXqMlelXlI M0J9c+aLulVctoIg3pZAJ/KWI5GfvphZeOCIvG/7Pi3i9g6kUud78SMewfSlhA9jHr+kTrHS7Pkt2 diq/ByRO579i05JRKkinzfUweSzFwynltWaVRwMtGI/AXAHldln3h7GjVJg6is0S5cFfIlJl4W4kS 77j4Mc1wytEPv7jeGYxnNvdIimlezWjfa4I8hig9JeVkXWx1mpfbtTXcTZlI9SStoJ1pYJQFxV32h p+GnIEfg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fiaW8-0002Ds-SJ; Thu, 26 Jul 2018 07:16:56 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fiaW5-0002C0-IP for ath10k@lists.infradead.org; Thu, 26 Jul 2018 07:16:55 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id EA63560B72; Thu, 26 Jul 2018 07:16:43 +0000 (UTC) Received: from localhost.localdomain (unknown [180.166.53.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: wgong@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id C22796074D; Thu, 26 Jul 2018 07:16:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org C22796074D Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=fail (p=reject dis=none) header.from=qti-qualcomm.corp-partner.google.com Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=fail smtp.mailfrom=wgong@qti-qualcomm.corp-partner.google.com From: Wen Gong To: ath10k@lists.infradead.org, johannes@sipsolutions.net Subject: [PATCH 1/2] mac80211: Save sk_pacing_shift to ieee80211_hw Date: Thu, 26 Jul 2018 15:16:32 +0800 Message-Id: <1532589393-16182-2-git-send-email-wgong@qti-qualcomm.corp-partner.google.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1532589393-16182-1-git-send-email-wgong@qti-qualcomm.corp-partner.google.com> References: <1532589393-16182-1-git-send-email-wgong@qti-qualcomm.corp-partner.google.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180726_001653_628577_05A72E20 X-CRM114-Status: GOOD ( 11.89 ) X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-wireless@vger.kernel.org MIME-Version: 1.0 Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Wen Gong Add the skb_pacing_shirt adjustment, but this change make it configurable for other driver. If no other driver set it, then mac8011 will use the default value. Signed-off-by: Wen Gong --- include/net/mac80211.h | 1 + net/mac80211/main.c | 2 ++ net/mac80211/tx.c | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 851a5e1..f600d08 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h @@ -2279,6 +2279,7 @@ struct ieee80211_hw { u8 n_cipher_schemes; const struct ieee80211_cipher_scheme *cipher_schemes; u8 max_nan_de_entries; + u8 tx_sk_pacing_shift; }; static inline bool _ieee80211_hw_check(struct ieee80211_hw *hw, diff --git a/net/mac80211/main.c b/net/mac80211/main.c index fb73451..72dce49 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c @@ -584,6 +584,8 @@ struct ieee80211_hw *ieee80211_alloc_hw_nm(size_t priv_data_len, local->ops = ops; local->use_chanctx = use_chanctx; + local->hw.tx_sk_pacing_shift = 8; + /* set up some defaults */ local->hw.queues = 1; local->hw.max_rates = 1; diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 44b5dfe..a2d61b9 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -3596,7 +3596,7 @@ void __ieee80211_subif_start_xmit(struct sk_buff *skb, * second, so 8 is ~4ms of queued data. Only affects local TCP * sockets. */ - sk_pacing_shift_update(skb->sk, 8); + sk_pacing_shift_update(skb->sk, sdata->local->hw.tx_sk_pacing_shift); fast_tx = rcu_dereference(sta->fast_tx);