|
From: Peter K. <pk...@us...> - 2001-12-10 16:18:15
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
sec_client.c 1.18 1.19=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Do not treat originator =3D=3D KERNEL specially in sec_man_read()
(there was no reason for it, and it should never be KERNEL at
that location anyway, so it should not change anything in
reality either).
The diff of the modified file(s):
--- sec_client.c 2001/04/26 13:58:18 1.18
+++ sec_client.c 2001/12/10 16:18:14 1.19
@@ -339,7 +339,7 @@
=20=20=20
/* Allocate new element */
if ((link_key =3D kmalloc(sizeof *link_key, GFP_ATOMIC)) < 0) {
- D_ERR(__FUNCTION__ ": could not allocate new link key element\n");
+ D_ERR(__FUNCTION__ ": Could not allocate new link key element\n");
return NULL;
}
=20=09
@@ -494,8 +494,6 @@
sec_man_check(enum security_requests user, BD_ADDR bd_addr, u32 service_da=
ta,
u32 user_data)
{
-#define FNC "sec_man_check: "
-
#ifndef __KERNEL__
if (sec_man_sock < 0) {
/* What to do if no security manager present?? */
@@ -526,16 +524,12 @@
#else
sec_man_doquery(sec_man_sock, (u8*) &security_query);
#endif
-=09
-#undef FNC
}
=20
void
sec_man_event(enum security_requests user, BD_ADDR bd_addr, u8 event,
u8 *param, u8 param_len)
{
-#define FNC "sec_man_event: "
-=09
if (event =3D=3D HCI_VALUE_RETURN_LINK_KEYS)
{
/* Ok, link key has to be stored locally */
@@ -578,7 +572,6 @@
sec_man_doquery(sec_man_sock, (u8*) &security_query);
#endif
}
-#undef FNC=09
}
=20
void sec_man_get_cached_link_key(u8 *param)
@@ -646,15 +639,11 @@
s32 sec_man_proc_dir_entry_read(char *buf, char **start, off_t offset,
s32 len, s32 unused)
{
-#define FNC "sec_proc_dir_entry_read: "
-
#ifdef USE_NEW_PROC
return sec_man_read(NULL, buf, len, 0);
#else
return sec_man_read(NULL, NULL, buf, len);
#endif
-
-#undef FNC
}
=20
#ifdef USE_NEW_PROC
@@ -665,33 +654,24 @@
char * buf, s32 count)
#endif
{
-#define FNC "sec_man_read: "
-=09
s32 tmp;
=20=09
- D_PROC(FNC" Someone is trying to read % d bytes from sec proc-file\n",
- count);
-
- if (security_query.originator =3D=3D KERNEL) {
- D_PROC(FNC"Shutdown of stack in progress, nothing to read!\n");
- return 1;
- }
+ D_PROC(__FUNCTION__ ": Someone is trying to read %d bytes from sec proc-f=
ile\n", count);
=20
cli();
if (security_query.originator !=3D BT_SEC_MAN) {
- D_PROC(FNC"No response yet, going to sleep\n");
+ D_PROC(__FUNCTION__ ": No response yet, going to sleep\n");
interruptible_sleep_on(&sec_man_wq);
}
sti();
- tmp =3D sizeof(struct security_query);
+
+ tmp =3D sizeof security_query;
memcpy(buf, &security_query, tmp);
=20=09
- D_PROC(FNC"Returning %d bytes\n", tmp);
+ D_PROC(__FUNCTION__ ": Returning %d bytes\n", tmp);
security_query.originator =3D SEC_CLIENT; /* Change so we lock aga=
in */
=20=20=20=20=20=20=20=20=20
return tmp;
-=09
-#undef FNC
}
=20
#ifdef USE_NEW_PROC
@@ -702,14 +682,13 @@
const char * buf, s32 count)
#endif
{
-#define FNC "sec_man_write: "=09
struct security_query *sec_hdl;
=20=09
sec_hdl =3D (struct security_query *)(buf);
=20=09
- D_PROC(FNC"Someone wrote %d bytes to sec proc-file\n",count);
+ D_PROC(__FUNCTION__ ": Someone wrote %d bytes to sec proc-file\n", count);
=20=09
-/* D_XMIT(FNC"preparing to send data to sec_con[%d]\n", secb_hdl->sec_con_=
id); */
+/* D_XMIT(__FUNCTION__ ": Preparing to send data to sec_con[%d]\n", secb_h=
dl->sec_con_id); */
if (sec_hdl->originator =3D=3D BT_SEC_MAN) /* o.k. new request */
{
/* Change so we do not receive old data */
@@ -717,13 +696,13 @@
=20=09=09
switch (sec_hdl->request_type) {
case L2CAP:
- D_PROC(FNC"Message to L2CAP\n");
+ D_PROC(__FUNCTION__ ": Message to L2CAP\n");
l2cap_process_sec_man_response(sec_hdl->request_result,
sec_hdl->originator_data);
break;
=20
case RFCOMM:
- D_PROC(FNC"Message to RFCOMM\n");
+ D_PROC(__FUNCTION__ ": Message to RFCOMM\n");
rfcomm_process_sec_man_response(sec_hdl->request_result,
sec_hdl->originator_data,
sec_hdl->request_value);
@@ -735,9 +714,7 @@
}
}
=20=09
-=09
return count;
-#undef FNC
}
=20
#else /* __KERNEL__ */
|