From: Peter K. <pk...@us...> - 2001-09-10 11:20:28
|
The following files were modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- bluetooth.c 1.193 1.194=20=20=20=20=20=20=20=20=20=20=20 hci.c 1.175 1.176=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Made hci_set_max_connections() resturn a result. The diff of the modified file(s): --- bluetooth.c 2001/09/10 11:17:11 1.193 +++ bluetooth.c 2001/09/10 11:19:57 1.194 @@ -1079,17 +1079,10 @@ =20 /* Set max number of connections */ case BTSETMAXCONNECTIONS: - { - u8 max_connections; - GET_USER(tmp, (s32*)arg); =20 - max_connections =3D (u8)(tmp & 0xff); - - BT_DRIVER("BTSETMAXCONNECTIONS: %d\n", max_connections); - hci_set_max_connections(max_connections); - return 0; - } + BT_DRIVER("BTSETMAXCONNECTIONS: %d\n", tmp); + return hci_set_max_connections(tmp); =20 case BTSETBCSPMODE: GET_USER(tmp, (s32*)arg); --- hci.c 2001/09/07 12:53:24 1.175 +++ hci.c 2001/09/10 11:19:57 1.176 @@ -2728,12 +2728,16 @@ } =20 =20 -void -hci_set_max_connections(u8 max_connections) +s32 +hci_set_max_connections(s32 max_connections) { - bt_max_connections =3D (int)max_connections; + if (max_connections < 0 || max_connections > 7) + return -EINVAL; +=20=20 + bt_max_connections =3D max_connections; DSYS("Setting max BT connections to %d\n", bt_max_connections); hci_update_load_factor(); + return 0; } =20 =20 |