From patchwork Fri Jan 18 22:47:19 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Lamparter X-Patchwork-Id: 2050481 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 1461DDF23A for ; Sat, 26 Jan 2013 21:36:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754400Ab3AZVgp (ORCPT ); Sat, 26 Jan 2013 16:36:45 -0500 Received: from mail-ee0-f42.google.com ([74.125.83.42]:50661 "EHLO mail-ee0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754257Ab3AZVgo (ORCPT ); Sat, 26 Jan 2013 16:36:44 -0500 Received: by mail-ee0-f42.google.com with SMTP id b47so755243eek.29 for ; Sat, 26 Jan 2013 13:36:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=x-received:from:date:subject:to:cc:message-id; bh=+ZdMIRcTJQ7le0Ws1Ol7DSLMDirG3/QeeWJG6x7XtTM=; b=ITtwK5uRP9O+lc6c4uzfrlQ5liiaOiuU2bPCAxWJmrmDnJ2UCrw1HcU6Zx55W8m/pn IezJa05Oyx0SfqRM4vF3vqfhwrzNg1oIrhlARQfKrouAuIxCVwlsApkk5EHfm495HPNw ZxGIEmI6AbWT0XWyHtVFxTlHWMWGgkINRvx1DL5l9Jqb1aqqHBHDUgkg9oZPKFUVkTOq 9jOtMwtK7UQdaPdOoK0ZOBqSxl7vxVetMoxeizVD00aLeZTOvSowZfoAo1Nkoekkuhen GLZ6MGaCgb0Un+TWKTPGc+xMO9W4ZD+n7OeqxV4fnQ4wx+o1mYumB+EjjfsmsH7NgGJG Jk1A== X-Received: by 10.14.213.67 with SMTP id z43mr6685642eeo.18.1359236203269; Sat, 26 Jan 2013 13:36:43 -0800 (PST) Received: from debian64.localnet (pD9F8BA63.dip.t-dialin.net. [217.248.186.99]) by mx.google.com with ESMTPS id 46sm8324241eeg.4.2013.01.26.13.36.41 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sat, 26 Jan 2013 13:36:42 -0800 (PST) Received: from localhost ([127.0.0.1] helo=debian64.localnet ident=chuck) by debian64.localnet with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1TzDQV-0001Fa-Sp; Sat, 26 Jan 2013 22:36:40 +0100 From: Christian Lamparter Date: Fri, 18 Jan 2013 23:47:19 +0100 Subject: [PATCH 2/2] iwl4965: report A-MPDU status To: linux-wireless@vger.kernel.org Cc: sgruszka@redhat.com, John Linville Message-Id: Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org This patch is based on "iwlwifi: report A-MPDU status". (12bf6f45d1703858) Since the firmware will give us an A-MPDU bit and only a single PHY information packet for all the subframes in an A-MPDU, we can easily report the minimal A-MPDU information for radiotap. Cc: Stanislaw Gruszka Signed-off-by: Christian Lamparter --- drivers/net/wireless/iwlegacy/4965-mac.c | 11 +++++++++++ drivers/net/wireless/iwlegacy/commands.h | 1 + drivers/net/wireless/iwlegacy/common.h | 1 + 3 files changed, 13 insertions(+) diff --git a/drivers/net/wireless/iwlegacy/4965-mac.c b/drivers/net/wireless/iwlegacy/4965-mac.c index f1dc040..2afc548 100644 --- a/drivers/net/wireless/iwlegacy/4965-mac.c +++ b/drivers/net/wireless/iwlegacy/4965-mac.c @@ -725,6 +725,16 @@ il4965_hdl_rx(struct il_priv *il, struct il_rx_buf *rxb) if (rate_n_flags & RATE_MCS_SGI_MSK) rx_status.flag |= RX_FLAG_SHORT_GI; + if (phy_res->phy_flags & RX_RES_PHY_FLAGS_AGG_MSK) { + /* We know which subframes of an A-MPDU belong + * together since we get a single PHY response + * from the firmware for all of them. + */ + + rx_status.flag |= RX_FLAG_AMPDU_DETAILS; + rx_status.ampdu_reference = il->_4965.ampdu_ref; + } + il4965_pass_packet_to_mac80211(il, header, len, ampdu_status, rxb, &rx_status); } @@ -736,6 +746,7 @@ il4965_hdl_rx_phy(struct il_priv *il, struct il_rx_buf *rxb) { struct il_rx_pkt *pkt = rxb_addr(rxb); il->_4965.last_phy_res_valid = true; + il->_4965.ampdu_ref++; memcpy(&il->_4965.last_phy_res, pkt->u.raw, sizeof(struct il_rx_phy_res)); } diff --git a/drivers/net/wireless/iwlegacy/commands.h b/drivers/net/wireless/iwlegacy/commands.h index 829d3b9..3b6c994 100644 --- a/drivers/net/wireless/iwlegacy/commands.h +++ b/drivers/net/wireless/iwlegacy/commands.h @@ -1136,6 +1136,7 @@ struct il_wep_cmd { #define RX_RES_PHY_FLAGS_NARROW_BAND_MSK cpu_to_le16(1 << 3) #define RX_RES_PHY_FLAGS_ANTENNA_MSK 0x70 #define RX_RES_PHY_FLAGS_ANTENNA_POS 4 +#define RX_RES_PHY_FLAGS_AGG_MSK cpu_to_le16(1 << 7) #define RX_RES_STATUS_SEC_TYPE_MSK (0x7 << 8) #define RX_RES_STATUS_SEC_TYPE_NONE (0x0 << 8) diff --git a/drivers/net/wireless/iwlegacy/common.h b/drivers/net/wireless/iwlegacy/common.h index 37fe553..96f2025 100644 --- a/drivers/net/wireless/iwlegacy/common.h +++ b/drivers/net/wireless/iwlegacy/common.h @@ -1356,6 +1356,7 @@ struct il_priv { struct { struct il_rx_phy_res last_phy_res; bool last_phy_res_valid; + u32 ampdu_ref; struct completion firmware_loading_complete;