From patchwork Thu Jul 20 11:05:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xinming Hu X-Patchwork-Id: 9854635 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2C851601C8 for ; Thu, 20 Jul 2017 11:06:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1A8CA287C4 for ; Thu, 20 Jul 2017 11:06:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 18C56287C2; Thu, 20 Jul 2017 11:06:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D134C287AC for ; Thu, 20 Jul 2017 11:06:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934300AbdGTLGC (ORCPT ); Thu, 20 Jul 2017 07:06:02 -0400 Received: from mail-pg0-f65.google.com ([74.125.83.65]:33498 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934145AbdGTLGA (ORCPT ); Thu, 20 Jul 2017 07:06:00 -0400 Received: by mail-pg0-f65.google.com with SMTP id z1so2507657pgs.0 for ; Thu, 20 Jul 2017 04:06:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=mzJXJgeCKiBm+40Z0WF8OhnmtN6BVLcAtFZZ04yApS4=; b=b3zoweATjpNDfHrvJ3mpA9AF8SRuLaA9ebt/50rjOTITLM7FDNQDtVbc54u+2W4pxi FRJEqyJT59qKt4Z5tBlNXfiCWtf09o7DM7MfPeMjnBgojBDa82N3ZgXsb5M89akKghxT Qjx9gjlh6IKLHum+auJIXm1+dHac3BCmbhmEqP97bR7oYVZmaHwuz7eQ+mHeYlYvOYkQ XTEw0kvH8iD4/netfzk4+P1/3gpiCjX1GQVmwX9Kh3jrge5Qp7KtVWelTAExjCO097XC FIKuKt5jLi6gXLhL8H3dOh1lhRCEorb3sKGDwmxeLerrz5OXT02wG4h9oe8Qspzj+wBA qtYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=mzJXJgeCKiBm+40Z0WF8OhnmtN6BVLcAtFZZ04yApS4=; b=IOPiyW2EXkr6tC5thZU7+9oHxb6m9fBUw8EynBxYuVCG6e7jFguuibdokzKW9IVeXr DXILq+4fHJ4H8tgAu+4n4zVDx6pDDmi81gHvcMT8D6b3BimB1rPSETlvNl8aQlGwrd5+ VHYxsHmTuBzgvihgow7AxU5xETU+hGGG1V5w+mbVXfHFHQyeVHUtXjtnmGmhnR47v1bt YyJy/7yx0ry2Y6TR1RuhrH8Or+2fLnnzNrrsQFvYXsQT1U3S7bYtbadgLluaScxGRjF7 WMxSsWfSlWG6e4WabJpjjkehVxEePxXOeSR3vblghDDCA9WKRVMm1oKA3CotQB79yUbw 6O9g== X-Gm-Message-State: AIVw110mUDRCJ9jOFS2wkA488xtqjRcP/tKR2iS4BuUB3D6CXBfDFgNe WKUY7lFx7orDSPMD X-Received: by 10.84.132.44 with SMTP id 41mr3774276ple.204.1500548759756; Thu, 20 Jul 2017 04:05:59 -0700 (PDT) Received: from ubuntu.members.linode.com ([2400:8902::f03c:91ff:fee7:7cf1]) by smtp.gmail.com with ESMTPSA id t4sm3681220pgs.22.2017.07.20.04.05.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 20 Jul 2017 04:05:58 -0700 (PDT) From: Xinming Hu To: Linux Wireless Cc: Kalle Valo , Brian Norris , Dmitry Torokhov , rajatja@google.com, Zhiyuan Yang , Tim Song , Cathy Luo , Xinming Hu Subject: [PATCH v2] mwifiex: add tdls uapsd support module parameter Date: Thu, 20 Jul 2017 11:05:53 +0000 Message-Id: <1500548753-26752-1-git-send-email-huxinming820@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Xinming Hu An issue about tdls uapsd was fixed in latest firmware, this patch add module parameter to control tdls uapsd support, which is default disabled, could be a workaround to the old firmware. At the same time, it is optional to enable this feature in specific case. Signed-off-by: Xinming Hu Signed-off-by: Cathy Luo --- v2: add more comments for disable tdls_uapsd. (Brian) --- drivers/net/wireless/marvell/mwifiex/init.c | 5 +++++ drivers/net/wireless/marvell/mwifiex/main.h | 1 + drivers/net/wireless/marvell/mwifiex/sta_cmd.c | 8 +++++--- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/marvell/mwifiex/init.c b/drivers/net/wireless/marvell/mwifiex/init.c index 3ecb59f..2cc8e54 100644 --- a/drivers/net/wireless/marvell/mwifiex/init.c +++ b/drivers/net/wireless/marvell/mwifiex/init.c @@ -25,6 +25,10 @@ #include "wmm.h" #include "11n.h" +static bool tdls_uapsd; +module_param(tdls_uapsd, bool, 0000); +MODULE_PARM_DESC(tdls_uapsd, "tdls uapsd support enable:1, disable:0"); + /* * This function adds a BSS priority table to the table list. * @@ -154,6 +158,7 @@ int mwifiex_init_priv(struct mwifiex_private *priv) priv->del_list_idx = 0; priv->hs2_enabled = false; priv->check_tdls_tx = false; + priv->tdls_uapsd_support = tdls_uapsd; memcpy(priv->tos_to_tid_inv, tos_to_tid_inv, MAX_NUM_TID); mwifiex_init_11h_params(priv); diff --git a/drivers/net/wireless/marvell/mwifiex/main.h b/drivers/net/wireless/marvell/mwifiex/main.h index f8cf307..ef5eac72 100644 --- a/drivers/net/wireless/marvell/mwifiex/main.h +++ b/drivers/net/wireless/marvell/mwifiex/main.h @@ -660,6 +660,7 @@ struct mwifiex_private { u8 check_tdls_tx; struct timer_list auto_tdls_timer; bool auto_tdls_timer_active; + u8 tdls_uapsd_support; struct idr ack_status_frames; /* spin lock for ack status */ spinlock_t ack_status_lock; diff --git a/drivers/net/wireless/marvell/mwifiex/sta_cmd.c b/drivers/net/wireless/marvell/mwifiex/sta_cmd.c index 534d94a..d5da565 100644 --- a/drivers/net/wireless/marvell/mwifiex/sta_cmd.c +++ b/drivers/net/wireless/marvell/mwifiex/sta_cmd.c @@ -1789,9 +1789,11 @@ static int mwifiex_cmd_chan_region_cfg(struct mwifiex_private *priv, put_unaligned_le16(params->capability, pos); config_len += sizeof(params->capability); - qos_info = params->uapsd_queues | (params->max_sp << 5); - wmm_qos_info = (struct mwifiex_ie_types_qos_info *)(pos + - config_len); + if (priv->tdls_uapsd_support) + qos_info = params->uapsd_queues | (params->max_sp << 5); + else + qos_info = 0; + wmm_qos_info = (void *)(pos + config_len); wmm_qos_info->header.type = cpu_to_le16(WLAN_EID_QOS_CAPA); wmm_qos_info->header.len = cpu_to_le16(sizeof(qos_info)); wmm_qos_info->qos_info = qos_info;