nfc: st21nfca: Simplify white list building
Simplify white list Building Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
Родитель
27420fec40
Коммит
d35cb20b41
|
@ -262,17 +262,10 @@ static int st21nfca_hci_ready(struct nfc_hci_dev *hdev)
|
||||||
int wl_size = 0;
|
int wl_size = 0;
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
if (info->se_status->is_ese_present &&
|
if (info->se_status->is_uicc_present)
|
||||||
info->se_status->is_uicc_present) {
|
|
||||||
white_list[wl_size++] = NFC_HCI_UICC_HOST_ID;
|
white_list[wl_size++] = NFC_HCI_UICC_HOST_ID;
|
||||||
|
if (info->se_status->is_ese_present)
|
||||||
white_list[wl_size++] = ST21NFCA_ESE_HOST_ID;
|
white_list[wl_size++] = ST21NFCA_ESE_HOST_ID;
|
||||||
} else if (!info->se_status->is_ese_present &&
|
|
||||||
info->se_status->is_uicc_present) {
|
|
||||||
white_list[wl_size++] = NFC_HCI_UICC_HOST_ID;
|
|
||||||
} else if (info->se_status->is_ese_present &&
|
|
||||||
!info->se_status->is_uicc_present) {
|
|
||||||
white_list[wl_size++] = ST21NFCA_ESE_HOST_ID;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (wl_size) {
|
if (wl_size) {
|
||||||
r = nfc_hci_set_param(hdev, NFC_HCI_ADMIN_GATE,
|
r = nfc_hci_set_param(hdev, NFC_HCI_ADMIN_GATE,
|
||||||
|
|
Загрузка…
Ссылка в новой задаче