summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex/sta_cmdresp.c
diff options
context:
space:
mode:
authorAvinash Patil2014-02-08 01:30:33 +0100
committerJohn W. Linville2014-02-12 21:36:20 +0100
commite48e0de0053f077dc8a98e1e06019024e93bb866 (patch)
tree10eedf866f8977b0a94630d0182d0588cd67d6cf /drivers/net/wireless/mwifiex/sta_cmdresp.c
parentmwifiex: add cfg80211 tdls_oper handler support (diff)
downloadkernel-qcow2-linux-e48e0de0053f077dc8a98e1e06019024e93bb866.tar.gz
kernel-qcow2-linux-e48e0de0053f077dc8a98e1e06019024e93bb866.tar.xz
kernel-qcow2-linux-e48e0de0053f077dc8a98e1e06019024e93bb866.zip
mwifiex: add cfg80211 add_station handler support
This patch adds cfg80211 add_station handler support for mwifiex which is needed for TDLS setup. Driver issues create TDLS link command to FW upon receiving add_station from cfg80211. Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mwifiex/sta_cmdresp.c')
-rw-r--r--drivers/net/wireless/mwifiex/sta_cmdresp.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/net/wireless/mwifiex/sta_cmdresp.c b/drivers/net/wireless/mwifiex/sta_cmdresp.c
index cb17f490bc6d..396b93682bd8 100644
--- a/drivers/net/wireless/mwifiex/sta_cmdresp.c
+++ b/drivers/net/wireless/mwifiex/sta_cmdresp.c
@@ -807,6 +807,8 @@ static int mwifiex_ret_tdls_oper(struct mwifiex_private *priv,
struct host_cmd_ds_tdls_oper *cmd_tdls_oper = &resp->params.tdls_oper;
u16 reason = le16_to_cpu(cmd_tdls_oper->reason);
u16 action = le16_to_cpu(cmd_tdls_oper->tdls_action);
+ struct mwifiex_sta_node *node =
+ mwifiex_get_sta_entry(priv, cmd_tdls_oper->peer_mac);
switch (action) {
case ACT_TDLS_DELETE:
@@ -819,6 +821,19 @@ static int mwifiex_ret_tdls_oper(struct mwifiex_private *priv,
"TDLS link config for %pM successful\n",
cmd_tdls_oper->peer_mac);
break;
+ case ACT_TDLS_CREATE:
+ if (reason) {
+ dev_err(priv->adapter->dev,
+ "TDLS link creation for %pM failed: reason %d",
+ cmd_tdls_oper->peer_mac, reason);
+ if (node && reason != TDLS_ERR_LINK_EXISTS)
+ node->tdls_status = TDLS_SETUP_FAILURE;
+ } else {
+ dev_dbg(priv->adapter->dev,
+ "TDLS link creation for %pM successful",
+ cmd_tdls_oper->peer_mac);
+ }
+ break;
default:
dev_err(priv->adapter->dev,
"Unknown TDLS command action respnse %d", action);