After the change to the L2CAP configuration parameter handling the
global conf_mtu variable is no longer needed and so remove it.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
__u8 conf_len;
__u8 conf_state;
__u8 conf_retry;
__u8 conf_len;
__u8 conf_state;
__u8 conf_retry;
-#define L2CAP_CONF_REQ_SENT 0x01
-#define L2CAP_CONF_INPUT_DONE 0x02
-#define L2CAP_CONF_OUTPUT_DONE 0x04
-#define L2CAP_CONF_MAX_RETRIES 2
+#define L2CAP_CONF_REQ_SENT 0x01
+#define L2CAP_CONF_INPUT_DONE 0x02
+#define L2CAP_CONF_OUTPUT_DONE 0x04
+
+#define L2CAP_CONF_MAX_RETRIES 2
/* Default config options */
pi->conf_len = 0;
/* Default config options */
pi->conf_len = 0;
- pi->conf_mtu = L2CAP_DEFAULT_MTU;
pi->flush_to = L2CAP_DEFAULT_FLUSH_TO;
}
pi->flush_to = L2CAP_DEFAULT_FLUSH_TO;
}
- *val = __le16_to_cpu(*((__le16 *)opt->val));
+ *val = __le16_to_cpu(*((__le16 *) opt->val));
- *val = __le32_to_cpu(*((__le32 *)opt->val));
+ *val = __le32_to_cpu(*((__le32 *) opt->val));
int len = pi->conf_len;
int type, hint, olen;
unsigned long val;
int len = pi->conf_len;
int type, hint, olen;
unsigned long val;
+ u16 mtu = L2CAP_DEFAULT_MTU;
u16 result = L2CAP_CONF_SUCCESS;
BT_DBG("sk %p", sk);
u16 result = L2CAP_CONF_SUCCESS;
BT_DBG("sk %p", sk);
switch (type) {
case L2CAP_CONF_MTU:
switch (type) {
case L2CAP_CONF_MTU:
break;
case L2CAP_CONF_FLUSH_TO:
break;
case L2CAP_CONF_FLUSH_TO:
/* Configure output options and let the other side know
* which ones we don't like. */
/* Configure output options and let the other side know
* which ones we don't like. */
- if (pi->conf_mtu < pi->omtu)
result = L2CAP_CONF_UNACCEPT;
else {
result = L2CAP_CONF_UNACCEPT;
else {
- pi->omtu = pi->conf_mtu;
pi->conf_state |= L2CAP_CONF_OUTPUT_DONE;
}
pi->conf_state |= L2CAP_CONF_OUTPUT_DONE;
}