From patchwork Wed Jul 19 06:36:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xinming Hu X-Patchwork-Id: 9850551 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 59950602C8 for ; Wed, 19 Jul 2017 06:36:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 47D8228600 for ; Wed, 19 Jul 2017 06:36:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3C52528608; Wed, 19 Jul 2017 06:36:39 +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=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI 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 7057E28600 for ; Wed, 19 Jul 2017 06:36:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752980AbdGSGge (ORCPT ); Wed, 19 Jul 2017 02:36:34 -0400 Received: from mail-pg0-f66.google.com ([74.125.83.66]:34919 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752847AbdGSGgd (ORCPT ); Wed, 19 Jul 2017 02:36:33 -0400 Received: by mail-pg0-f66.google.com with SMTP id d193so5736515pgc.2 for ; Tue, 18 Jul 2017 23:36:33 -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=UaSZ94LjnQeagZFvfL9hELTo9rUgrELX2MZBzTLgHY0=; b=gsDJBOMzD9Rp8BPo47+bRl5/z8/cpFRxvqRSQa+X06DF+jd/2oxIbuDdkgy1a6Woy2 XgInavodZscuWBiQyLQDh0JlfXWfbVYX6s/ENX/d4Xngphoxdu9l91i3VyqgaZIjPzLZ h7Vj/eA8VI3Y61WbLumkwaC11A6zGQCIUCL+9cyJBGqPgIDg+kxZooHeNot9vFqubisL o8mWlxYly6+Qrqw/L8k9ocTaptUTQ3K1Z3akYkLW10tdCsk0D1HrejN+1pYfw4abQa1g 7HpCBHwxurReDfOI2MnE1PLkeULxQOrVQSk8iMv3bC69F43LG2ny98xNiuR026WmlKTx ED5w== 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=UaSZ94LjnQeagZFvfL9hELTo9rUgrELX2MZBzTLgHY0=; b=s5uTZISyzaVOM5nTnfQBo+lB74XatItO7ODCInxcwajdyqKP2IBd0BJEz3zzwIb/NT ihEI2bqOLZuSfrF8gXxXaepn6fR0rO0J7x0Q8jjAPm+tFeft6jv5j04nTtB3WZ6J6cl0 y2Pv6P33sNm+phQNz2fJ3Vd7NzF8STr9iiCgl2dEWY9M49PkZLTY4qezSNhXtEt2VFkv RgXCWIAMFa0OYLZrSJke8B25UO1xkEpYiP1EKnNethe+Ny4aLl0ld3/NN2QwudKNtSYx 0OJ7Aq1QDZkpb2EM9LkziPVct2rNE66oBLr8IwopNh+U2IBN7nczAKvNlxMix6hsZ+wI IvGg== X-Gm-Message-State: AIVw110Nm3v0pfmHjaoRhQINudv9yCaLG2Nuly+mlZ/bo/D/RpFCxzPp ddixrAJXEFKtRCnA X-Received: by 10.99.110.74 with SMTP id j71mr1437795pgc.191.1500446192945; Tue, 18 Jul 2017 23:36:32 -0700 (PDT) Received: from ubuntu.members.linode.com ([2400:8902::f03c:91ff:fee7:7cf1]) by smtp.gmail.com with ESMTPSA id c22sm1943469pfh.21.2017.07.18.23.36.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 18 Jul 2017 23:36:32 -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] mwifiex: add tdls uapsd support module parameter Date: Wed, 19 Jul 2017 06:36:27 +0000 Message-Id: <1500446187-8034-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 Add module parameter to control tdls uapsd support, which is default disabled. Signed-off-by: Xinming Hu Signed-off-by: Cathy Luo --- 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;