aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2007-10-20 07:37:06 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-22 05:59:41 -0400
commit861d6882b3dfe1710b35dbddf1b395b962061413 (patch)
tree94da0e9d5de2c3ed7643600ba4fe643e5e7c6911 /net
parent876d9484edf77d228adb42aecd4debd58d7739d6 (diff)
[Bluetooth] Remove global conf_mtu variable from L2CAP
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>
Diffstat (limited to 'net')
-rw-r--r--net/bluetooth/l2cap.c12
1 files changed, 6 insertions, 6 deletions
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