From patchwork Tue Jan 5 16:42:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helmut Schaa X-Patchwork-Id: 7956361 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 CAF149F38D for ; Tue, 5 Jan 2016 16:42:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E59AF202E6 for ; Tue, 5 Jan 2016 16:42:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 673492027D for ; Tue, 5 Jan 2016 16:42:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752110AbcAEQml (ORCPT ); Tue, 5 Jan 2016 11:42:41 -0500 Received: from mail-wm0-f42.google.com ([74.125.82.42]:36065 "EHLO mail-wm0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751979AbcAEQmj (ORCPT ); Tue, 5 Jan 2016 11:42:39 -0500 Received: by mail-wm0-f42.google.com with SMTP id l65so29699418wmf.1 for ; Tue, 05 Jan 2016 08:42:38 -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:in-reply-to:references; bh=f5dSiWVy046QBu8fofW+A2Ebcg1cECaOC0062NthuOM=; b=kfQhdyVBNMjcSaQLL0HiW5yRj6MlpN1p6TtWvjLQL0Y2BO8rhuuygtF919Ih5hVOPJ pqibtZmsYjR7+BFiEYkXkMhF23HY0Vt/3PZtpkeO6f4qEmvhl0MOXbIF+yuicpqL6H0x k2LNThSKwNBM42s1me0mWATcv0cP/7QpKlqlh0YkD9BoCy87+lHWzbzoKnppnVdPElhG T/vzx712hqpjqn77J1vIU99mSuaIMLZCA+Tl/8Y4UwDRZR0Av62aqs1uImfTCdDHa8UX oAxYArPyAbm4qKhyAx/R3zIIPxq/OLb+AzMDgysqN+QM/UB+GTqNjSc8TcsAazzc/l2D 7Tjg== X-Received: by 10.194.23.33 with SMTP id j1mr102126191wjf.4.1452012157781; Tue, 05 Jan 2016 08:42:37 -0800 (PST) Received: from hschaa-desktop.site ([5.158.136.57]) by smtp.gmail.com with ESMTPSA id qs1sm31082647wjc.2.2016.01.05.08.42.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Jan 2016 08:42:36 -0800 (PST) From: Helmut Schaa To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Helmut Schaa Subject: [PATCHv2] mac80211: Don't buffer non-bufferable MMPDUs Date: Tue, 5 Jan 2016 17:42:13 +0100 Message-Id: <1452012133-19157-1-git-send-email-helmut.schaa@googlemail.com> X-Mailer: git-send-email 1.8.4.5 In-Reply-To: <1452004632-20263-1-git-send-email-helmut.schaa@googlemail.com> References: <1452004632-20263-1-git-send-email-helmut.schaa@googlemail.com> 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. Discovered while testing an old VOIP phone that started probing for APs while in PS mode. The mac80211/ath9k AP where the STA is associated would reply with a probe response but the phone sometimes moved to a new channel already and couldn't ack the probe response anymore. In that case mac80211 applied filtered frame handling for the un-acked probe response. Signed-off-by: Helmut Schaa --- Changes in v2: Check IEEE80211_TX_CTL_NO_PS_BUFFER instead of frame_control field net/mac80211/status.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/net/mac80211/status.c b/net/mac80211/status.c index 5bad05e..6101deb 100644 --- a/net/mac80211/status.c +++ b/net/mac80211/status.c @@ -51,6 +51,11 @@ static void ieee80211_handle_filtered_frame(struct ieee80211_local *local, struct ieee80211_hdr *hdr = (void *)skb->data; int ac; + if (info->flags & IEEE80211_TX_CTL_NO_PS_BUFFER) { + 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,