diff --git a/wireless/bluetooth/btsak/btsak.h b/wireless/bluetooth/btsak/btsak.h index 7e2013488..4dccbb391 100644 --- a/wireless/bluetooth/btsak/btsak.h +++ b/wireless/bluetooth/btsak/btsak.h @@ -71,7 +71,7 @@ struct btsak_s FAR char *ifname; /* Interface name */ bt_addr_t ep_btaddr; /* Blue tooth address */ #if defined(CONFIG_NET_BLUETOOTH) - struct sockaddr_bt_s ep_sockaddr; /* AF_BLUETOOTH endpoint address */ + struct sockaddr_l2 ep_sockaddr; /* AF_BLUETOOTH endpoint address */ #elif defined(CONFIG_NET_6LOWPAN) struct sockaddr_in6 ep_sockaddr; /* IPv6 endpoint address */ #endif diff --git a/wireless/bluetooth/btsak/btsak_main.c b/wireless/bluetooth/btsak/btsak_main.c index 054e92f52..7231b17e3 100644 --- a/wireless/bluetooth/btsak/btsak_main.c +++ b/wireless/bluetooth/btsak/btsak_main.c @@ -626,9 +626,9 @@ int btsak_socket(FAR struct btsak_s *btsak) BLUETOOTH_ADDRCOPY(btsak->ep_btaddr.val, g_default_epaddr.val); #if defined(CONFIG_NET_BLUETOOTH) - btsak->ep_sockaddr.bt_family = AF_BLUETOOTH; - btsak->ep_sockaddr.bt_channel = 0; /* REVISIT */ - BLUETOOTH_ADDRCOPY(btsak->ep_sockaddr.bt_bdaddr.val, btsak->ep_btaddr.val); + btsak->ep_sockaddr.l2_family = AF_BLUETOOTH; + btsak->ep_sockaddr.l2_cid = 0; /* REVISIT */ + BLUETOOTH_ADDRCOPY(btsak->ep_sockaddr.l2_bdaddr.val, btsak->ep_btaddr.val); sockfd = socket(PF_BLUETOOTH, SOCK_RAW, BTPROTO_L2CAP);