Hello,
vaishali paisal wrote:
so each time a connection is added hci_conn_add is called and a new timer would be initialised through hci_conn_init_timer.
Here is the interesting part of hci_conn_add() :
struct hci_conn *hci_conn_add(struct hci_dev *hdev, int type, bdaddr_t *dst) { struct hci_conn *conn;
BT_DBG("%s dst %s", hdev->name, batostr(dst));
if (!(conn = kmalloc(sizeof(struct hci_conn), GFP_ATOMIC))) return NULL; memset(conn, 0, sizeof(struct hci_conn));
[...]
hci_conn_init_timer(conn);
[...] }
Conclusion: a new "hci_conn" structure is allocated (using kmalloc) everytime this function is called. And there is one "struct timer_list" in each "hci_conn" structure.
Others: If I say something wrong, don't hesitate to tell me.
Thomas -- Thomas Petazzoni thomas.petazzoni@xxxxxxxx
-- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/