forked from Minki/linux
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>
This commit is contained in:
parent
7a42e4e74b
commit
d29caf257a
@ -169,6 +169,7 @@ enum MWIFIEX_802_11_PRIVACY_FILTER {
|
||||
#define TLV_TYPE_GWK_CIPHER (PROPRIETARY_TLV_BASE_ID + 146)
|
||||
#define TLV_TYPE_COALESCE_RULE (PROPRIETARY_TLV_BASE_ID + 154)
|
||||
#define TLV_TYPE_KEY_PARAM_V2 (PROPRIETARY_TLV_BASE_ID + 156)
|
||||
#define TLV_TYPE_TDLS_IDLE_TIMEOUT (PROPRIETARY_TLV_BASE_ID + 194)
|
||||
#define TLV_TYPE_FW_API_REV (PROPRIETARY_TLV_BASE_ID + 199)
|
||||
|
||||
#define MWIFIEX_TX_DATA_BUF_SIZE_2K 2048
|
||||
@ -708,6 +709,13 @@ struct mwifiex_ie_types_vendor_param_set {
|
||||
u8 ie[MWIFIEX_MAX_VSIE_LEN];
|
||||
};
|
||||
|
||||
#define MWIFIEX_TDLS_IDLE_TIMEOUT 60
|
||||
|
||||
struct mwifiex_ie_types_tdls_idle_timeout {
|
||||
struct mwifiex_ie_types_header header;
|
||||
__le16 value;
|
||||
} __packed;
|
||||
|
||||
struct mwifiex_ie_types_rsn_param_set {
|
||||
struct mwifiex_ie_types_header header;
|
||||
u8 rsn_ie[1];
|
||||
|
@ -1546,6 +1546,7 @@ mwifiex_cmd_tdls_oper(struct mwifiex_private *priv,
|
||||
struct mwifiex_ie_types_extcap *extcap;
|
||||
struct mwifiex_ie_types_vhtcap *vht_capab;
|
||||
struct mwifiex_ie_types_aid *aid;
|
||||
struct mwifiex_ie_types_tdls_idle_timeout *timeout;
|
||||
u8 *pos, qos_info;
|
||||
u16 config_len = 0;
|
||||
struct station_parameters *params = priv->sta_params;
|
||||
@ -1643,6 +1644,12 @@ mwifiex_cmd_tdls_oper(struct mwifiex_private *priv,
|
||||
config_len += sizeof(struct mwifiex_ie_types_aid);
|
||||
}
|
||||
|
||||
timeout = (void *)(pos + config_len);
|
||||
timeout->header.type = cpu_to_le16(TLV_TYPE_TDLS_IDLE_TIMEOUT);
|
||||
timeout->header.len = cpu_to_le16(sizeof(timeout->value));
|
||||
timeout->value = cpu_to_le16(MWIFIEX_TDLS_IDLE_TIMEOUT);
|
||||
config_len += sizeof(struct mwifiex_ie_types_tdls_idle_timeout);
|
||||
|
||||
break;
|
||||
default:
|
||||
dev_err(priv->adapter->dev, "Unknown TDLS operation\n");
|
||||
|
Loading…
Reference in New Issue
Block a user