Fix remote name request handling bug
diff --git a/src/hci.c b/src/hci.c
index dbfc8ba..875ac9c 100644
--- a/src/hci.c
+++ b/src/hci.c
@@ -1080,7 +1080,7 @@
 			if (hdr->evt != r->event)
 				break;
 
-			rn = r->rparam;
+			rn = (void *) ptr;
 			cp = r->cparam;
 
 			if (bacmp(&rn->bdaddr, &cp->bdaddr))