summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex/tdls.c
diff options
context:
space:
mode:
authorAvinash Patil <patila@marvell.com>2014-02-08 01:30:34 +0100
committerJohn W. Linville <linville@tuxdriver.com>2014-02-12 21:36:21 +0100
commit1f4dfd8a1e911cd9e12994cd7cc1180e94ee1bc5 (patch)
treefd3b2dbd0b02d75e55a9da35da611c31df578357 /drivers/net/wireless/mwifiex/tdls.c
parentmwifiex: add cfg80211 add_station handler support (diff)
downloadlinux-1f4dfd8a1e911cd9e12994cd7cc1180e94ee1bc5.tar.xz
linux-1f4dfd8a1e911cd9e12994cd7cc1180e94ee1bc5.zip
mwifiex: add cfg80211 change_station handler support
This patch adds cfg80211 change_station handler support for mwifiex which is needed for TDLS link setup. Driver creates a command to modify peer link capabilities and issues command to FW. 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/tdls.c')
-rw-r--r--drivers/net/wireless/mwifiex/tdls.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/net/wireless/mwifiex/tdls.c b/drivers/net/wireless/mwifiex/tdls.c
index 1d5ed70432d6..f37862b5fabb 100644
--- a/drivers/net/wireless/mwifiex/tdls.c
+++ b/drivers/net/wireless/mwifiex/tdls.c
@@ -544,6 +544,27 @@ void mwifiex_process_tdls_action_frame(struct mwifiex_private *priv,
}
static int
+mwifiex_tdls_process_config_link(struct mwifiex_private *priv, u8 *peer)
+{
+ struct mwifiex_sta_node *sta_ptr;
+ struct mwifiex_ds_tdls_oper tdls_oper;
+
+ memset(&tdls_oper, 0, sizeof(struct mwifiex_ds_tdls_oper));
+ sta_ptr = mwifiex_get_sta_entry(priv, peer);
+
+ if (!sta_ptr || sta_ptr->tdls_status == TDLS_SETUP_FAILURE) {
+ dev_err(priv->adapter->dev,
+ "link absent for peer %pM; cannot config\n", peer);
+ return -EINVAL;
+ }
+
+ memcpy(&tdls_oper.peer_mac, peer, ETH_ALEN);
+ tdls_oper.tdls_action = MWIFIEX_TDLS_CONFIG_LINK;
+ return mwifiex_send_cmd_sync(priv, HostCmd_CMD_TDLS_OPER,
+ HostCmd_ACT_GEN_SET, 0, &tdls_oper);
+}
+
+static int
mwifiex_tdls_process_create_link(struct mwifiex_private *priv, u8 *peer)
{
struct mwifiex_sta_node *sta_ptr;
@@ -662,6 +683,8 @@ int mwifiex_tdls_oper(struct mwifiex_private *priv, u8 *peer, u8 action)
return mwifiex_tdls_process_disable_link(priv, peer);
case MWIFIEX_TDLS_CREATE_LINK:
return mwifiex_tdls_process_create_link(priv, peer);
+ case MWIFIEX_TDLS_CONFIG_LINK:
+ return mwifiex_tdls_process_config_link(priv, peer);
}
return 0;
}