aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex
diff options
context:
space:
mode:
authorAvinash Patil <patila@marvell.com>2014-05-07 01:02:43 -0400
committerJohn W. Linville <linville@tuxdriver.com>2014-05-07 16:08:07 -0400
commitd29caf257ae7f767edef5354524cb31b51985a40 (patch)
tree4d2b26acffd9319c560f08b59265ca3f16c6378a /drivers/net/wireless/mwifiex
parent7a42e4e74b71576d06d59c0937225e37471dc2fd (diff)
mwifiex: configure inactivity timeout for TDLS link
This patch adds configuration timeout for TDLS link. This is configuered at the time of TDLS link configuration. If TDLS link is inactive for more than timeout, FW will tear this link. 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')
-rw-r--r--drivers/net/wireless/mwifiex/fw.h8
-rw-r--r--drivers/net/wireless/mwifiex/sta_cmd.c7
2 files changed, 15 insertions, 0 deletions
diff --git a/drivers/net/wireless/mwifiex/fw.h b/drivers/net/wireless/mwifiex/fw.h
index b485dc1ae5eb..28994ab46e15 100644
--- a/drivers/net/wireless/mwifiex/fw.h
+++ b/drivers/net/wireless/mwifiex/fw.h
@@ -169,6 +169,7 @@ enum MWIFIEX_802_11_PRIVACY_FILTER {
169#define TLV_TYPE_GWK_CIPHER (PROPRIETARY_TLV_BASE_ID + 146) 169#define TLV_TYPE_GWK_CIPHER (PROPRIETARY_TLV_BASE_ID + 146)
170#define TLV_TYPE_COALESCE_RULE (PROPRIETARY_TLV_BASE_ID + 154) 170#define TLV_TYPE_COALESCE_RULE (PROPRIETARY_TLV_BASE_ID + 154)
171#define TLV_TYPE_KEY_PARAM_V2 (PROPRIETARY_TLV_BASE_ID + 156) 171#define TLV_TYPE_KEY_PARAM_V2 (PROPRIETARY_TLV_BASE_ID + 156)
172#define TLV_TYPE_TDLS_IDLE_TIMEOUT (PROPRIETARY_TLV_BASE_ID + 194)
172#define TLV_TYPE_FW_API_REV (PROPRIETARY_TLV_BASE_ID + 199) 173#define TLV_TYPE_FW_API_REV (PROPRIETARY_TLV_BASE_ID + 199)
173 174
174#define MWIFIEX_TX_DATA_BUF_SIZE_2K 2048 175#define MWIFIEX_TX_DATA_BUF_SIZE_2K 2048
@@ -708,6 +709,13 @@ struct mwifiex_ie_types_vendor_param_set {
708 u8 ie[MWIFIEX_MAX_VSIE_LEN]; 709 u8 ie[MWIFIEX_MAX_VSIE_LEN];
709}; 710};
710 711
712#define MWIFIEX_TDLS_IDLE_TIMEOUT 60
713
714struct mwifiex_ie_types_tdls_idle_timeout {
715 struct mwifiex_ie_types_header header;
716 __le16 value;
717} __packed;
718
711struct mwifiex_ie_types_rsn_param_set { 719struct mwifiex_ie_types_rsn_param_set {
712 struct mwifiex_ie_types_header header; 720 struct mwifiex_ie_types_header header;
713 u8 rsn_ie[1]; 721 u8 rsn_ie[1];
diff --git a/drivers/net/wireless/mwifiex/sta_cmd.c b/drivers/net/wireless/mwifiex/sta_cmd.c
index e3cac1495cc7..88202ce0c139 100644
--- a/drivers/net/wireless/mwifiex/sta_cmd.c
+++ b/drivers/net/wireless/mwifiex/sta_cmd.c
@@ -1546,6 +1546,7 @@ mwifiex_cmd_tdls_oper(struct mwifiex_private *priv,
1546 struct mwifiex_ie_types_extcap *extcap; 1546 struct mwifiex_ie_types_extcap *extcap;
1547 struct mwifiex_ie_types_vhtcap *vht_capab; 1547 struct mwifiex_ie_types_vhtcap *vht_capab;
1548 struct mwifiex_ie_types_aid *aid; 1548 struct mwifiex_ie_types_aid *aid;
1549 struct mwifiex_ie_types_tdls_idle_timeout *timeout;
1549 u8 *pos, qos_info; 1550 u8 *pos, qos_info;
1550 u16 config_len = 0; 1551 u16 config_len = 0;
1551 struct station_parameters *params = priv->sta_params; 1552 struct station_parameters *params = priv->sta_params;
@@ -1643,6 +1644,12 @@ mwifiex_cmd_tdls_oper(struct mwifiex_private *priv,
1643 config_len += sizeof(struct mwifiex_ie_types_aid); 1644 config_len += sizeof(struct mwifiex_ie_types_aid);
1644 } 1645 }
1645 1646
1647 timeout = (void *)(pos + config_len);
1648 timeout->header.type = cpu_to_le16(TLV_TYPE_TDLS_IDLE_TIMEOUT);
1649 timeout->header.len = cpu_to_le16(sizeof(timeout->value));
1650 timeout->value = cpu_to_le16(MWIFIEX_TDLS_IDLE_TIMEOUT);
1651 config_len += sizeof(struct mwifiex_ie_types_tdls_idle_timeout);
1652
1646 break; 1653 break;
1647 default: 1654 default:
1648 dev_err(priv->adapter->dev, "Unknown TDLS operation\n"); 1655 dev_err(priv->adapter->dev, "Unknown TDLS operation\n");