__u8 cur_conn_id;
struct list_head conn_info_list;
+ struct nci_conn_info *rf_conn_info;
struct timer_list cmd_timer;
struct timer_list data_timer;
int rc;
struct nci_conn_info *conn_info;
- conn_info = nci_get_conn_info_by_conn_id(ndev, NCI_STATIC_RF_CONN_ID);
+ conn_info = ndev->rf_conn_info;
if (!conn_info)
return -EPROTO;
exit:
if (err == NCI_STATUS_OK) {
- conn_info = nci_get_conn_info_by_conn_id(ndev,
- NCI_STATIC_RF_CONN_ID);
+ conn_info = ndev->rf_conn_info;
if (!conn_info)
return;
pr_debug("entry, type 0x%x, reason 0x%x\n", ntf->type, ntf->reason);
- conn_info =
- nci_get_conn_info_by_conn_id(ndev, NCI_STATIC_RF_CONN_ID);
+ conn_info = ndev->rf_conn_info;
if (!conn_info)
return;
if (status == NCI_STATUS_OK) {
atomic_set(&ndev->state, NCI_DISCOVERY);
- conn_info = nci_get_conn_info_by_conn_id(ndev,
- NCI_STATIC_RF_CONN_ID);
+ conn_info = ndev->rf_conn_info;
if (!conn_info) {
conn_info = devm_kzalloc(&ndev->nfc_dev->dev,
sizeof(struct nci_conn_info),
conn_info->conn_id = NCI_STATIC_RF_CONN_ID;
INIT_LIST_HEAD(&conn_info->list);
list_add(&conn_info->list, &ndev->conn_info_list);
+ ndev->rf_conn_info = conn_info;
}
}