diff options
-rw-r--r-- | include/net/bluetooth/l2cap.h | 10 | ||||
-rw-r--r-- | net/bluetooth/l2cap.c | 12 |
2 files changed, 11 insertions, 11 deletions
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h index 70e70f5d3dd6..f7bcd1f782cb 100644 --- a/include/net/bluetooth/l2cap.h +++ b/include/net/bluetooth/l2cap.h | |||
@@ -221,7 +221,6 @@ struct l2cap_pinfo { | |||
221 | __u8 conf_len; | 221 | __u8 conf_len; |
222 | __u8 conf_state; | 222 | __u8 conf_state; |
223 | __u8 conf_retry; | 223 | __u8 conf_retry; |
224 | __u16 conf_mtu; | ||
225 | 224 | ||
226 | __u8 ident; | 225 | __u8 ident; |
227 | 226 | ||
@@ -232,10 +231,11 @@ struct l2cap_pinfo { | |||
232 | struct sock *prev_c; | 231 | struct sock *prev_c; |
233 | }; | 232 | }; |
234 | 233 | ||
235 | #define L2CAP_CONF_REQ_SENT 0x01 | 234 | #define L2CAP_CONF_REQ_SENT 0x01 |
236 | #define L2CAP_CONF_INPUT_DONE 0x02 | 235 | #define L2CAP_CONF_INPUT_DONE 0x02 |
237 | #define L2CAP_CONF_OUTPUT_DONE 0x04 | 236 | #define L2CAP_CONF_OUTPUT_DONE 0x04 |
238 | #define L2CAP_CONF_MAX_RETRIES 2 | 237 | |
238 | #define L2CAP_CONF_MAX_RETRIES 2 | ||
239 | 239 | ||
240 | void l2cap_load(void); | 240 | void l2cap_load(void); |
241 | 241 | ||
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c index 6ce693d2e5b9..fde1606a4f31 100644 --- a/net/bluetooth/l2cap.c +++ b/net/bluetooth/l2cap.c | |||
@@ -508,7 +508,6 @@ static void l2cap_sock_init(struct sock *sk, struct sock *parent) | |||
508 | 508 | ||
509 | /* Default config options */ | 509 | /* Default config options */ |
510 | pi->conf_len = 0; | 510 | pi->conf_len = 0; |
511 | pi->conf_mtu = L2CAP_DEFAULT_MTU; | ||
512 | pi->flush_to = L2CAP_DEFAULT_FLUSH_TO; | 511 | pi->flush_to = L2CAP_DEFAULT_FLUSH_TO; |
513 | } | 512 | } |
514 | 513 | ||
@@ -1256,11 +1255,11 @@ static inline int l2cap_get_conf_opt(void **ptr, int *type, int *olen, unsigned | |||
1256 | break; | 1255 | break; |
1257 | 1256 | ||
1258 | case 2: | 1257 | case 2: |
1259 | *val = __le16_to_cpu(*((__le16 *)opt->val)); | 1258 | *val = __le16_to_cpu(*((__le16 *) opt->val)); |
1260 | break; | 1259 | break; |
1261 | 1260 | ||
1262 | case 4: | 1261 | case 4: |
1263 | *val = __le32_to_cpu(*((__le32 *)opt->val)); | 1262 | *val = __le32_to_cpu(*((__le32 *) opt->val)); |
1264 | break; | 1263 | break; |
1265 | 1264 | ||
1266 | default: | 1265 | default: |
@@ -1332,6 +1331,7 @@ static int l2cap_parse_conf_req(struct sock *sk, void *data) | |||
1332 | int len = pi->conf_len; | 1331 | int len = pi->conf_len; |
1333 | int type, hint, olen; | 1332 | int type, hint, olen; |
1334 | unsigned long val; | 1333 | unsigned long val; |
1334 | u16 mtu = L2CAP_DEFAULT_MTU; | ||
1335 | u16 result = L2CAP_CONF_SUCCESS; | 1335 | u16 result = L2CAP_CONF_SUCCESS; |
1336 | 1336 | ||
1337 | BT_DBG("sk %p", sk); | 1337 | BT_DBG("sk %p", sk); |
@@ -1344,7 +1344,7 @@ static int l2cap_parse_conf_req(struct sock *sk, void *data) | |||
1344 | 1344 | ||
1345 | switch (type) { | 1345 | switch (type) { |
1346 | case L2CAP_CONF_MTU: | 1346 | case L2CAP_CONF_MTU: |
1347 | pi->conf_mtu = val; | 1347 | mtu = val; |
1348 | break; | 1348 | break; |
1349 | 1349 | ||
1350 | case L2CAP_CONF_FLUSH_TO: | 1350 | case L2CAP_CONF_FLUSH_TO: |
@@ -1368,10 +1368,10 @@ static int l2cap_parse_conf_req(struct sock *sk, void *data) | |||
1368 | /* Configure output options and let the other side know | 1368 | /* Configure output options and let the other side know |
1369 | * which ones we don't like. */ | 1369 | * which ones we don't like. */ |
1370 | 1370 | ||
1371 | if (pi->conf_mtu < pi->omtu) | 1371 | if (mtu < pi->omtu) |
1372 | result = L2CAP_CONF_UNACCEPT; | 1372 | result = L2CAP_CONF_UNACCEPT; |
1373 | else { | 1373 | else { |
1374 | pi->omtu = pi->conf_mtu; | 1374 | pi->omtu = mtu; |
1375 | pi->conf_state |= L2CAP_CONF_OUTPUT_DONE; | 1375 | pi->conf_state |= L2CAP_CONF_OUTPUT_DONE; |
1376 | } | 1376 | } |
1377 | 1377 | ||