From patchwork Mon Aug 3 18:53:52 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Larry Finger X-Patchwork-Id: 6932671 X-Patchwork-Delegate: kvalo@adurom.com 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 4FAB39F373 for ; Mon, 3 Aug 2015 18:54:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6ECB120634 for ; Mon, 3 Aug 2015 18:54:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 77726205CB for ; Mon, 3 Aug 2015 18:54:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932085AbbHCSyb (ORCPT ); Mon, 3 Aug 2015 14:54:31 -0400 Received: from mail-ob0-f179.google.com ([209.85.214.179]:33964 "EHLO mail-ob0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755279AbbHCSya (ORCPT ); Mon, 3 Aug 2015 14:54:30 -0400 Received: by obre1 with SMTP id e1so106159713obr.1 for ; Mon, 03 Aug 2015 11:54:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=oVGYxqNlxuE0ttHW+lwHG8ftr7Q1RWLJUg0UKEwaJkU=; b=elxelzF6R7v2ZK6qWTK2S6QagyaQGtPgLY5Z3ULu77FY6P0BrjEj1vY1b7BXEOZE+T D4iAXFMNFfSClI+tccOz0D09s8/srpwFN+uClQKIBiGS2qj22Ina9i6I4klQfCeSpMpy cBpUSz7VQ5sFc4Iu++dY9St0xV7n238rhpUZpedNrGDs4vaZivRHCbye0D2Zb1afu7gb tKvzxDPe6iFUvsuzcERRxFYak7HSX+XDmpnqbSlfiB3YqNZfhL6P8VXPofVvLNvt08uv GhFuI4r7Yzr28A4hnPqjl9eBuCKIAscRsPiA90I2UCPdjtCZRZDy6LjajbqSwPRKfCAJ 3eFg== X-Received: by 10.182.211.66 with SMTP id na2mr18337275obc.43.1438628070331; Mon, 03 Aug 2015 11:54:30 -0700 (PDT) Received: from linux.site (cpe-24-31-249-175.kc.res.rr.com. [24.31.249.175]) by smtp.gmail.com with ESMTPSA id fh10sm7905709obc.1.2015.08.03.11.54.28 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 03 Aug 2015 11:54:29 -0700 (PDT) From: Larry Finger To: kvalo@codeaurora.org Cc: linux-wireless@vger.kernel.org, pkshih , shaofu , Larry Finger Subject: [PATCH NEXT 7/7] rtlwifi: rtl8821ae: Implement new rekey logic Date: Mon, 3 Aug 2015 13:53:52 -0500 Message-Id: <1438628032-5865-8-git-send-email-Larry.Finger@lwfinger.net> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1438628032-5865-1-git-send-email-Larry.Finger@lwfinger.net> References: <1438628032-5865-1-git-send-email-Larry.Finger@lwfinger.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=-5.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY, URIBL_BLACK 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: pkshih Use the new capability in rtlwifi to prevent rekeying before EAPOL msg 4/4 has been sent. Signed-off-by: pkshih Signed-off-by: shaofu Signed-off-by: Larry Finger --- drivers/net/wireless/rtlwifi/rtl8821ae/trx.c | 8 ++++++++ drivers/net/wireless/rtlwifi/rtl8821ae/trx.h | 13 +++++++++++++ 2 files changed, 21 insertions(+) diff --git a/drivers/net/wireless/rtlwifi/rtl8821ae/trx.c b/drivers/net/wireless/rtlwifi/rtl8821ae/trx.c index 174743a..a03015c 100644 --- a/drivers/net/wireless/rtlwifi/rtl8821ae/trx.c +++ b/drivers/net/wireless/rtlwifi/rtl8821ae/trx.c @@ -740,6 +740,14 @@ void rtl8821ae_tx_fill_desc(struct ieee80211_hw *hw, SET_TX_DESC_OFFSET(pdesc, USB_HWDESC_HEADER_LEN); } + /* tx report */ + if (ptcb_desc->use_spe_rpt) { + u16 sn = rtl_get_tx_report_sn(hw); + + SET_TX_DESC_SPE_RPT(pdesc, 1); + SET_TX_DESC_SW_DEFINE(pdesc, sn); + } + /* ptcb_desc->use_driver_rate = true; */ SET_TX_DESC_TX_RATE(pdesc, ptcb_desc->hw_rate); if (ptcb_desc->hw_rate > DESC_RATEMCS0) diff --git a/drivers/net/wireless/rtlwifi/rtl8821ae/trx.h b/drivers/net/wireless/rtlwifi/rtl8821ae/trx.h index 3140904..4717801 100644 --- a/drivers/net/wireless/rtlwifi/rtl8821ae/trx.h +++ b/drivers/net/wireless/rtlwifi/rtl8821ae/trx.h @@ -185,6 +185,19 @@ #define SET_TX_DESC_RTS_SC(__pdesc, __val) \ SET_BITS_TO_LE_4BYTE(__pdesc+20, 13, 4, __val) +#define SET_TX_DESC_SW_DEFINE(__pdesc, __val) \ + SET_BITS_TO_LE_4BYTE(__pdesc + 24, 0, 12, __val) +#define SET_TX_DESC_ANTSEL_A(__pdesc, __val) \ + SET_BITS_TO_LE_4BYTE(__pdesc + 24, 16, 3, __val) +#define SET_TX_DESC_ANTSEL_B(__pdesc, __val) \ + SET_BITS_TO_LE_4BYTE(__pdesc + 24, 19, 3, __val) +#define SET_TX_DESC_ANTSEL_C(__pdesc, __val) \ + SET_BITS_TO_LE_4BYTE(__pdesc + 24, 22, 3, __val) +#define SET_TX_DESC_ANTSEL_D(__pdesc, __val) \ + SET_BITS_TO_LE_4BYTE(__pdesc + 24, 25, 3, __val) +#define SET_TX_DESC_MBSSID(__pdesc, __val) \ + SET_BITS_TO_LE_4BYTE(__pdesc + 24, 12, 4, __val) + #define SET_TX_DESC_TX_BUFFER_SIZE(__pdesc, __val) \ SET_BITS_TO_LE_4BYTE(__pdesc+28, 0, 16, __val)