Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d29caf25 authored by Avinash Patil's avatar Avinash Patil Committed by John W. Linville
Browse files

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: default avatarAvinash Patil <patila@marvell.com>
Signed-off-by: default avatarBing Zhao <bzhao@marvell.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 7a42e4e7
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -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];
+7 −0
Original line number Diff line number Diff line
@@ -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");