Bluetooth: Use explicit AMP controller id value for BR/EDR
The special AMP controller id 0 is reserved for the BR/EDR controller
that has the main link. It is a fixed value and so use a constant for
this throughout the code to make it more visible when the handling is
for the BR/EDR channel or when it is for the AMP channel.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
diff --git a/net/bluetooth/a2mp.c b/net/bluetooth/a2mp.c
index b2ef3d3..6d62d31 100644
--- a/net/bluetooth/a2mp.c
+++ b/net/bluetooth/a2mp.c
@@ -77,7 +77,7 @@
static inline void __a2mp_cl_bredr(struct a2mp_cl *cl)
{
- cl->id = 0;
+ cl->id = AMP_ID_BREDR;
cl->type = AMP_TYPE_BREDR;
cl->status = 1;
}
@@ -216,7 +216,7 @@
BT_DBG("Remote AMP id %d type %d status %d", cl->id, cl->type,
cl->status);
- if (cl->id != HCI_BREDR_ID && cl->type == HCI_AMP) {
+ if (cl->id != AMP_ID_BREDR && cl->type == HCI_AMP) {
struct a2mp_info_req req;
found = true;