@@ -6038,7 +6038,7 @@ static void hci_le_conn_update_complete_evt(struct hci_dev *hdev, void *data,
60386038static struct hci_conn * check_pending_le_conn (struct hci_dev * hdev ,
60396039 bdaddr_t * addr ,
60406040 u8 addr_type , bool addr_resolved ,
6041- u8 adv_type )
6041+ u8 adv_type , u8 phy , u8 sec_phy )
60426042{
60436043 struct hci_conn * conn ;
60446044 struct hci_conn_params * params ;
@@ -6093,7 +6093,7 @@ static struct hci_conn *check_pending_le_conn(struct hci_dev *hdev,
60936093
60946094 conn = hci_connect_le (hdev , addr , addr_type , addr_resolved ,
60956095 BT_SECURITY_LOW , hdev -> def_le_autoconnect_timeout ,
6096- HCI_ROLE_MASTER );
6096+ HCI_ROLE_MASTER , phy , sec_phy );
60976097 if (!IS_ERR (conn )) {
60986098 /* If HCI_AUTO_CONN_EXPLICIT is set, conn is already owned
60996099 * by higher layer that tried to connect, if no then
@@ -6128,8 +6128,9 @@ static struct hci_conn *check_pending_le_conn(struct hci_dev *hdev,
61286128
61296129static void process_adv_report (struct hci_dev * hdev , u8 type , bdaddr_t * bdaddr ,
61306130 u8 bdaddr_type , bdaddr_t * direct_addr ,
6131- u8 direct_addr_type , s8 rssi , u8 * data , u8 len ,
6132- bool ext_adv , bool ctl_time , u64 instant )
6131+ u8 direct_addr_type , u8 phy , u8 sec_phy , s8 rssi ,
6132+ u8 * data , u8 len , bool ext_adv , bool ctl_time ,
6133+ u64 instant )
61336134{
61346135 struct discovery_state * d = & hdev -> discovery ;
61356136 struct smp_irk * irk ;
@@ -6217,7 +6218,7 @@ static void process_adv_report(struct hci_dev *hdev, u8 type, bdaddr_t *bdaddr,
62176218 * for advertising reports) and is already verified to be RPA above.
62186219 */
62196220 conn = check_pending_le_conn (hdev , bdaddr , bdaddr_type , bdaddr_resolved ,
6220- type );
6221+ type , phy , sec_phy );
62216222 if (!ext_adv && conn && type == LE_ADV_IND &&
62226223 len <= max_adv_len (hdev )) {
62236224 /* Store report for later inclusion by
@@ -6363,7 +6364,8 @@ static void hci_le_adv_report_evt(struct hci_dev *hdev, void *data,
63636364 if (info -> length <= max_adv_len (hdev )) {
63646365 rssi = info -> data [info -> length ];
63656366 process_adv_report (hdev , info -> type , & info -> bdaddr ,
6366- info -> bdaddr_type , NULL , 0 , rssi ,
6367+ info -> bdaddr_type , NULL , 0 ,
6368+ HCI_ADV_PHY_1M , 0 , rssi ,
63676369 info -> data , info -> length , false,
63686370 false, instant );
63696371 } else {
@@ -6448,6 +6450,8 @@ static void hci_le_ext_adv_report_evt(struct hci_dev *hdev, void *data,
64486450 if (legacy_evt_type != LE_ADV_INVALID ) {
64496451 process_adv_report (hdev , legacy_evt_type , & info -> bdaddr ,
64506452 info -> bdaddr_type , NULL , 0 ,
6453+ info -> primary_phy ,
6454+ info -> secondary_phy ,
64516455 info -> rssi , info -> data , info -> length ,
64526456 !(evt_type & LE_EXT_ADV_LEGACY_PDU ),
64536457 false, instant );
@@ -6730,8 +6734,8 @@ static void hci_le_direct_adv_report_evt(struct hci_dev *hdev, void *data,
67306734
67316735 process_adv_report (hdev , info -> type , & info -> bdaddr ,
67326736 info -> bdaddr_type , & info -> direct_addr ,
6733- info -> direct_addr_type , info -> rssi , NULL , 0 ,
6734- false, false, instant );
6737+ info -> direct_addr_type , HCI_ADV_PHY_1M , 0 ,
6738+ info -> rssi , NULL , 0 , false, false, instant );
67356739 }
67366740
67376741 hci_dev_unlock (hdev );
0 commit comments