From patchwork Wed Apr 1 21:32:52 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Malcolm Priestley X-Patchwork-Id: 6142451 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 EC3D19F2EC for ; Wed, 1 Apr 2015 21:33:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 20C6D202FE for ; Wed, 1 Apr 2015 21:33:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 33850202F0 for ; Wed, 1 Apr 2015 21:33:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752575AbbDAVdd (ORCPT ); Wed, 1 Apr 2015 17:33:33 -0400 Received: from mail-wi0-f180.google.com ([209.85.212.180]:35206 "EHLO mail-wi0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751845AbbDAVdb (ORCPT ); Wed, 1 Apr 2015 17:33:31 -0400 Received: by widdi4 with SMTP id di4so59199791wid.0; Wed, 01 Apr 2015 14:33:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=+f6z5K7kNBXZ9cioBMSIA45oXYtOKzqpbgUKTlKdS5I=; b=egYo5PtbiWZLzUEBtTOmnb49BF65uVKUDa1rGZ72+R+pnO+ITEjSlweexaCDFeqVOs VlEYOHxq/FkO09ONkuAjGMq5KZlbTiKZr0ATijKzyc/ENA9wTzuHU6DvwutuRstdZjrp h5hKiL8vmiU5uhWX/D8KCk7Q0xeJCRwdyuLP6lX7IttDYqF/GVH3zQMxVWzcP24R6BBx OXrEd3dJuIqRffo0i9f3j2e/3vA5T34Do5b3KHXUl4mU150BCNf5NV787d9rdyDxjq5v 26eEdDYx4dy0nUbKqbz3dPuSAMQVyu1i6aETtA/DS+OErt6z7O256RwJnynPrDW0g/QW sG1Q== X-Received: by 10.194.175.137 with SMTP id ca9mr84142556wjc.67.1427924009554; Wed, 01 Apr 2015 14:33:29 -0700 (PDT) Received: from tipsey.3.home (94.196.242.13.threembb.co.uk. [94.196.242.13]) by mx.google.com with ESMTPSA id nb9sm3944852wic.10.2015.04.01.14.33.27 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 01 Apr 2015 14:33:28 -0700 (PDT) From: Malcolm Priestley To: gregkh@linuxfoundation.org Cc: linux-wireless@vger.kernel.org, Malcolm Priestley , Subject: [PATCH 2/2] staging: vt6655: use ieee80211_tx_info to select packet type. Date: Wed, 1 Apr 2015 22:32:52 +0100 Message-Id: <1427923972-11947-2-git-send-email-tvboxspy@gmail.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1427923972-11947-1-git-send-email-tvboxspy@gmail.com> References: <1427923972-11947-1-git-send-email-tvboxspy@gmail.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, T_DKIM_INVALID, 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 Information for packet type is in ieee80211_tx_info band IEEE80211_BAND_5GHZ for PK_TYPE_11A. IEEE80211_TX_RC_USE_CTS_PROTECT via tx_rate flags selects PK_TYPE_11GB This ensures that the packet is always the right type. Signed-off-by: Malcolm Priestley Cc: # v3.19+ --- drivers/staging/vt6655/rxtx.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c index 195dcc9..7468776 100644 --- a/drivers/staging/vt6655/rxtx.c +++ b/drivers/staging/vt6655/rxtx.c @@ -1305,10 +1305,18 @@ int vnt_generate_fifo_header(struct vnt_private *priv, u32 dma_idx, priv->hw->conf.chandef.chan->hw_value); } - if (current_rate > RATE_11M) - pkt_type = (u8)priv->byPacketType; - else + if (current_rate > RATE_11M) { + if (info->band == IEEE80211_BAND_5GHZ) { + pkt_type = PK_TYPE_11A; + } else { + if (tx_rate->flags & IEEE80211_TX_RC_USE_CTS_PROTECT) + pkt_type = PK_TYPE_11GB; + else + pkt_type = PK_TYPE_11GA; + } + } else { pkt_type = PK_TYPE_11B; + } /*Set fifo controls */ if (pkt_type == PK_TYPE_11A)