From patchwork Fri Apr 17 15:15:43 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 6234531 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7FB499F1AC for ; Fri, 17 Apr 2015 15:16:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8983E20395 for ; Fri, 17 Apr 2015 15:16:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8D20E20394 for ; Fri, 17 Apr 2015 15:16:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754521AbbDQPQD (ORCPT ); Fri, 17 Apr 2015 11:16:03 -0400 Received: from s3.sipsolutions.net ([5.9.151.49]:47614 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754583AbbDQPQB (ORCPT ); Fri, 17 Apr 2015 11:16:01 -0400 Received: by sipsolutions.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_CBC_SHA256:128) (Exim 4.84) (envelope-from ) id 1Yj7zp-0004HI-Va; Fri, 17 Apr 2015 17:16:00 +0200 From: Johannes Berg To: linux-wireless@vger.kernel.org Cc: Johannes Berg Subject: [PATCH 03/11] mac80211: extend fast-xmit to driver fragmentation Date: Fri, 17 Apr 2015 17:15:43 +0200 Message-Id: <1429283751-5104-3-git-send-email-johannes@sipsolutions.net> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1429283751-5104-1-git-send-email-johannes@sipsolutions.net> References: <1429283751-5104-1-git-send-email-johannes@sipsolutions.net> 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 From: Johannes Berg If the driver handles fragmentation then it wouldn't be done in software so we can still use the fast-xmit path in that case. Signed-off-by: Johannes Berg --- net/mac80211/tx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index d5bfa6c4afd0..86d64bd11c01 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -2439,7 +2439,8 @@ void ieee80211_check_fast_xmit(struct sta_info *sta, gfp_t gfp) return; /* fast-xmit doesn't handle fragmentation at all */ - if (local->hw.wiphy->frag_threshold != (u32)-1) + if (local->hw.wiphy->frag_threshold != (u32)-1 && + !local->ops->set_frag_threshold) return; rcu_read_lock();