From: Xinming Hu <huxinming820@gmail.com>
To: Linux Wireless <linux-wireless@vger.kernel.org>
Cc: Kalle Valo <kvalo@codeaurora.org>,
Brian Norris <briannorris@google.com>,
Dmitry Torokhov <dtor@google.com>,
rajatja@google.com, Zhiyuan Yang <yangzy@marvell.com>,
Tim Song <songtao@marvell.com>, Cathy Luo <cluo@marvell.com>,
Xinming Hu <huxm@marvell.com>
Subject: [PATCH] mwifiex: add tdls uapsd support module parameter
Date: Wed, 19 Jul 2017 06:36:27 +0000 [thread overview]
Message-ID: <1500446187-8034-1-git-send-email-huxinming820@gmail.com> (raw)
From: Xinming Hu <huxm@marvell.com>
Add module parameter to control tdls uapsd support, which is
default disabled.
Signed-off-by: Xinming Hu <huxm@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
---
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;
--
1.9.1
next reply other threads:[~2017-07-19 6:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-19 6:36 Xinming Hu [this message]
2017-07-19 20:09 ` [PATCH] mwifiex: add tdls uapsd support module parameter Brian Norris
2017-07-20 10:54 ` Xinming Hu
2017-07-20 17:16 ` Brian Norris
2017-07-20 17:28 ` Dmitry Torokhov
2017-07-21 10:00 ` Xinming Hu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1500446187-8034-1-git-send-email-huxinming820@gmail.com \
--to=huxinming820@gmail.com \
--cc=briannorris@google.com \
--cc=cluo@marvell.com \
--cc=dtor@google.com \
--cc=huxm@marvell.com \
--cc=kvalo@codeaurora.org \
--cc=linux-wireless@vger.kernel.org \
--cc=rajatja@google.com \
--cc=songtao@marvell.com \
--cc=yangzy@marvell.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).