aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex/sta_cmdresp.c
diff options
context:
space:
mode:
authorAvinash Patil <patila@marvell.com>2014-02-07 19:27:34 -0500
committerJohn W. Linville <linville@tuxdriver.com>2014-02-12 15:36:20 -0500
commit429d90d2212b561859767a74e3bb855f32b4600d (patch)
tree012243489daeff6e594a5501bba551f72e4b7266 /drivers/net/wireless/mwifiex/sta_cmdresp.c
parent5f2caaf32bc64c200007611505ce2453f4862276 (diff)
mwifiex: add cfg80211 tdls_oper handler support
This patch adds cfg80211 handler tdls_oper handler support to mwifiex. Upon enable link, driver sets status as TDLS status as setup complete and also sets AMSDU size, AMPDU params for direct link. Upon disable link, driver issues command to FW to delete this link in 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/sta_cmdresp.c')
-rw-r--r--drivers/net/wireless/mwifiex/sta_cmdresp.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/drivers/net/wireless/mwifiex/sta_cmdresp.c b/drivers/net/wireless/mwifiex/sta_cmdresp.c
index 95e13589d2bd..cb17f490bc6d 100644
--- a/drivers/net/wireless/mwifiex/sta_cmdresp.c
+++ b/drivers/net/wireless/mwifiex/sta_cmdresp.c
@@ -801,7 +801,32 @@ static int mwifiex_ret_ibss_coalescing_status(struct mwifiex_private *priv,
801 801
802 return 0; 802 return 0;
803} 803}
804static int mwifiex_ret_tdls_oper(struct mwifiex_private *priv,
805 struct host_cmd_ds_command *resp)
806{
807 struct host_cmd_ds_tdls_oper *cmd_tdls_oper = &resp->params.tdls_oper;
808 u16 reason = le16_to_cpu(cmd_tdls_oper->reason);
809 u16 action = le16_to_cpu(cmd_tdls_oper->tdls_action);
804 810
811 switch (action) {
812 case ACT_TDLS_DELETE:
813 if (reason)
814 dev_err(priv->adapter->dev,
815 "TDLS link delete for %pM failed: reason %d\n",
816 cmd_tdls_oper->peer_mac, reason);
817 else
818 dev_dbg(priv->adapter->dev,
819 "TDLS link config for %pM successful\n",
820 cmd_tdls_oper->peer_mac);
821 break;
822 default:
823 dev_err(priv->adapter->dev,
824 "Unknown TDLS command action respnse %d", action);
825 return -1;
826 }
827
828 return 0;
829}
805/* 830/*
806 * This function handles the command response for subscribe event command. 831 * This function handles the command response for subscribe event command.
807 */ 832 */
@@ -1004,6 +1029,9 @@ int mwifiex_process_sta_cmdresp(struct mwifiex_private *priv, u16 cmdresp_no,
1004 break; 1029 break;
1005 case HostCmd_CMD_COALESCE_CFG: 1030 case HostCmd_CMD_COALESCE_CFG:
1006 break; 1031 break;
1032 case HostCmd_CMD_TDLS_OPER:
1033 ret = mwifiex_ret_tdls_oper(priv, resp);
1034 break;
1007 default: 1035 default:
1008 dev_err(adapter->dev, "CMD_RESP: unknown cmd response %#x\n", 1036 dev_err(adapter->dev, "CMD_RESP: unknown cmd response %#x\n",
1009 resp->command); 1037 resp->command);