From patchwork Tue Jan 5 14:37:12 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helmut Schaa X-Patchwork-Id: 7955471 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 EA6EFBEEE5 for ; Tue, 5 Jan 2016 14:37:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EF8AC202DD for ; Tue, 5 Jan 2016 14:37:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 23435202C8 for ; Tue, 5 Jan 2016 14:37:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751970AbcAEOhu (ORCPT ); Tue, 5 Jan 2016 09:37:50 -0500 Received: from mail-wm0-f48.google.com ([74.125.82.48]:36241 "EHLO mail-wm0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751859AbcAEOhg (ORCPT ); Tue, 5 Jan 2016 09:37:36 -0500 Received: by mail-wm0-f48.google.com with SMTP id l65so25151956wmf.1 for ; Tue, 05 Jan 2016 06:37:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=ZZZug8NQ1O240p0vbeicM9dz4oFG1zIiF46pKgopNOg=; b=jswB8ctvxHHA7mewyPv2REvb490KAzZ/0ZHDeru4E1jNAHquDH0a2a45/ROYRlnaQo zEXO0i+QJN+JuCxtE9q7og0bSduSwF47V5tUeFFcPnadAYL07NPrcG/JvqSiRPjmNwfv 6L0ols3nXHYwLute7/jndhdQSjS/FRIRbMLB9rLed51BhwbQqpBjAdYZfcCh05WSNxtF 47HQVyEdp4VzfKkdonEWp/9dgt+tiaLSKBsGjM+UXD9W+lLZsfZqZtQZQRaFCDCcgHjY iWuAkwSETBRCuQTf5x9a6w5YvqOpbeUy0enaxP3Atrlh4cyWt9HUnYseetSbdMNhz3fK HMkg== X-Received: by 10.194.104.5 with SMTP id ga5mr103269643wjb.155.1452004655524; Tue, 05 Jan 2016 06:37:35 -0800 (PST) Received: from hschaa-desktop.site ([5.158.136.57]) by smtp.gmail.com with ESMTPSA id kb5sm91005312wjc.20.2016.01.05.06.37.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Jan 2016 06:37:35 -0800 (PST) From: Helmut Schaa To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Helmut Schaa Subject: [PATCH] mac80211: Don't buffer non-bufferable MMPDUs Date: Tue, 5 Jan 2016 15:37:12 +0100 Message-Id: <1452004632-20263-1-git-send-email-helmut.schaa@googlemail.com> X-Mailer: git-send-email 1.8.4.5 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.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 Non-bufferable MMPDUs are sent out to STAs even while in PS mode (for example probe responses). Applying filtered frame handling for these doesn't seem to make much sense and will only create more air utilization when the STA wakes up. Hence, apply filtered frame handling only for bufferable MMPDUs. Signed-off-by: Helmut Schaa --- net/mac80211/status.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/net/mac80211/status.c b/net/mac80211/status.c index 5bad05e..14bd53b 100644 --- a/net/mac80211/status.c +++ b/net/mac80211/status.c @@ -51,6 +51,12 @@ static void ieee80211_handle_filtered_frame(struct ieee80211_local *local, struct ieee80211_hdr *hdr = (void *)skb->data; int ac; + if (ieee80211_is_mgmt(hdr->frame_control) && + !ieee80211_is_bufferable_mmpdu(hdr->frame_control)) { + ieee80211_free_txskb(&local->hw, skb); + return; + } + /* * This skb 'survived' a round-trip through the driver, and * hopefully the driver didn't mangle it too badly. However,