From patchwork Fri Jan 9 19:15:47 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bob Copeland X-Patchwork-Id: 5602321 X-Patchwork-Delegate: kvalo@adurom.com 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 5C5E2C058D for ; Fri, 9 Jan 2015 19:18:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6809F20639 for ; Fri, 9 Jan 2015 19:18:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7448420634 for ; Fri, 9 Jan 2015 19:18:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758149AbbAITSZ (ORCPT ); Fri, 9 Jan 2015 14:18:25 -0500 Received: from mail-oi0-f52.google.com ([209.85.218.52]:33536 "EHLO mail-oi0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751492AbbAITSV (ORCPT ); Fri, 9 Jan 2015 14:18:21 -0500 Received: by mail-oi0-f52.google.com with SMTP id a3so13232572oib.11 for ; Fri, 09 Jan 2015 11:18:20 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=4+12rsV/6h9FBm8SLrwGxbNJ5VDZH85lT63x5954c2k=; b=bJzsMtVDfrkqFcshyj+oHLbi3qnjDBPaazIsCWFvtB+TDzKKaIBwcrd+Vz8Be0+jOp bIR3oz+5FiKvCAs188CAPsJtLChx3dZQPFxf6oq8EkbQ4kQENpi5rZXKhWP+oDfEAmOF 7pQOI4OtK8nUWFIeNvpRbrNHMx5CzKY03CHRNxCp6+L91Uyt+5y+SwUOjOj3ikmpVMZz RoJbTd80vFilDR8Ud6sLBIu46Ol7clFdw/s21wFVCoZGNuR27Vvtw4LHCaYry0aMOSq4 sjTck58syfS4BPgO9RiRMFa6FY7SH6ERfCvE+NMsr0Bfurqf/XUGuuVnrTFDkouWiHcu /t/g== X-Gm-Message-State: ALoCoQnDPVd4rI3x3s3ModwFymqBza9dMdOvU6MN8cqg8E3PR/w0e1s1seohcpU+z+cRSa+uha1Y X-Received: by 10.202.231.209 with SMTP id e200mr9683726oih.63.1420831100696; Fri, 09 Jan 2015 11:18:20 -0800 (PST) Received: from hash ([2001:470:1d:6db:230:48ff:fe9d:9c89]) by mx.google.com with ESMTPSA id ml6sm4724975oeb.11.2015.01.09.11.18.18 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 09 Jan 2015 11:18:18 -0800 (PST) Received: from bob by hash with local (Exim 4.80) (envelope-from ) id 1Y9f3V-0002Wm-2A; Fri, 09 Jan 2015 14:17:09 -0500 From: Bob Copeland To: linux-wireless@vger.kernel.org Cc: Eugene Krasnikov , Bob Copeland Subject: [PATCH 3/8] wcn36xx: let device generate qos seq numbers Date: Fri, 9 Jan 2015 14:15:47 -0500 Message-Id: <1420830952-9624-4-git-send-email-me@bobcopeland.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1420830952-9624-1-git-send-email-me@bobcopeland.com> References: <1420830952-9624-1-git-send-email-me@bobcopeland.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.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 wcn36xx currently sends an incorrect sequence number into the BA session setup firmware command: it should be saving or updating the ssn in the TX_START ampdu_action callback instead of waiting until TX_OPERATIONAL. However, we can sidestep the issue by letting the hardware generate the sequence numbers for QoS frames, as is done in prima, so do that. Signed-off-by: Bob Copeland --- drivers/net/wireless/ath/wcn36xx/txrx.c | 1 + drivers/net/wireless/ath/wcn36xx/txrx.h | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/wcn36xx/txrx.c b/drivers/net/wireless/ath/wcn36xx/txrx.c index f701873..277bc39 100644 --- a/drivers/net/wireless/ath/wcn36xx/txrx.c +++ b/drivers/net/wireless/ath/wcn36xx/txrx.c @@ -93,6 +93,7 @@ static void wcn36xx_set_tx_pdu(struct wcn36xx_tx_bd *bd, bd->pdu.mpdu_header_off; bd->pdu.mpdu_len = len; bd->pdu.tid = tid; + bd->pdu.bd_ssn = WCN36XX_TXBD_SSN_FILL_DPU_QOS; } static inline struct wcn36xx_vif *get_vif_by_addr(struct wcn36xx *wcn, diff --git a/drivers/net/wireless/ath/wcn36xx/txrx.h b/drivers/net/wireless/ath/wcn36xx/txrx.h index bbfbcf8..032216e 100644 --- a/drivers/net/wireless/ath/wcn36xx/txrx.h +++ b/drivers/net/wireless/ath/wcn36xx/txrx.h @@ -32,6 +32,12 @@ #define WCN36XX_BD_RATE_MGMT 2 #define WCN36XX_BD_RATE_CTRL 3 +enum wcn36xx_txbd_ssn_type { + WCN36XX_TXBD_SSN_FILL_HOST = 0, + WCN36XX_TXBD_SSN_FILL_DPU_NON_QOS = 1, + WCN36XX_TXBD_SSN_FILL_DPU_QOS = 2, +}; + struct wcn36xx_pdu { u32 dpu_fb:8; u32 adu_fb:8; @@ -50,7 +56,8 @@ struct wcn36xx_pdu { /* 0x0c*/ u32 reserved4:8; u32 tid:4; - u32 reserved3:4; + u32 bd_ssn:2; + u32 reserved3:2; u32 mpdu_len:16; };