| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * NFC Digital Protocol stack |
|---|
| 3 | 4 | * Copyright (c) 2013, Intel Corporation. |
|---|
| 4 | | - * |
|---|
| 5 | | - * This program is free software; you can redistribute it and/or modify it |
|---|
| 6 | | - * under the terms and conditions of the GNU General Public License, |
|---|
| 7 | | - * version 2, as published by the Free Software Foundation. |
|---|
| 8 | | - * |
|---|
| 9 | | - * This program is distributed in the hope it will be useful, but WITHOUT |
|---|
| 10 | | - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|---|
| 11 | | - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
|---|
| 12 | | - * more details. |
|---|
| 13 | | - * |
|---|
| 14 | 5 | */ |
|---|
| 15 | 6 | |
|---|
| 16 | 7 | #define pr_fmt(fmt) "digital: %s: " fmt, __func__ |
|---|
| .. | .. |
|---|
| 47 | 38 | |
|---|
| 48 | 39 | #define DIGITAL_GB_BIT 0x02 |
|---|
| 49 | 40 | |
|---|
| 50 | | -#define DIGITAL_NFC_DEP_REQ_RES_HEADROOM 2 /* SoD: [SB (NFC-A)] + LEN */ |
|---|
| 51 | | -#define DIGITAL_NFC_DEP_REQ_RES_TAILROOM 2 /* EoD: 2-byte CRC */ |
|---|
| 52 | | - |
|---|
| 53 | 41 | #define DIGITAL_NFC_DEP_PFB_TYPE(pfb) ((pfb) & 0xE0) |
|---|
| 54 | 42 | |
|---|
| 55 | 43 | #define DIGITAL_NFC_DEP_PFB_TIMEOUT_BIT 0x10 |
|---|
| .. | .. |
|---|
| 80 | 68 | u8 bs; |
|---|
| 81 | 69 | u8 br; |
|---|
| 82 | 70 | u8 pp; |
|---|
| 83 | | - u8 gb[0]; |
|---|
| 71 | + u8 gb[]; |
|---|
| 84 | 72 | } __packed; |
|---|
| 85 | 73 | |
|---|
| 86 | 74 | struct digital_atr_res { |
|---|
| .. | .. |
|---|
| 92 | 80 | u8 br; |
|---|
| 93 | 81 | u8 to; |
|---|
| 94 | 82 | u8 pp; |
|---|
| 95 | | - u8 gb[0]; |
|---|
| 83 | + u8 gb[]; |
|---|
| 96 | 84 | } __packed; |
|---|
| 97 | 85 | |
|---|
| 98 | 86 | struct digital_psl_req { |
|---|