The port type is by default part of the WWAN port device name.
However device name can not be considered as a 'stable' API and
may be subject to change in the future. This change adds a proper
device attribute that can be used to determine the WWAN protocol/
type.
Signed-off-by: Loic Poulain <redacted>
---
drivers/net/wwan/wwan_core.c | 34 +++++++++++++++++++++++++---------
1 file changed, 25 insertions(+), 9 deletions(-)
Hello:
This patch was applied to netdev/net-next.git (refs/heads/master):
On Mon, 17 May 2021 11:53:34 +0200 you wrote:
The port type is by default part of the WWAN port device name.
However device name can not be considered as a 'stable' API and
may be subject to change in the future. This change adds a proper
device attribute that can be used to determine the WWAN protocol/
type.
Signed-off-by: Loic Poulain <redacted>
[...]
Hello Loic,
On Mon, May 17, 2021 at 12:48 PM Loic Poulain [off-list ref] wrote:
quoted hunk
The port type is by default part of the WWAN port device name.
However device name can not be considered as a 'stable' API and
may be subject to change in the future. This change adds a proper
device attribute that can be used to determine the WWAN protocol/
type.
Signed-off-by: Loic Poulain <redacted>
---
drivers/net/wwan/wwan_core.c | 34 +++++++++++++++++++++++++---------
1 file changed, 25 insertions(+), 9 deletions(-)
A small nitpick, maybe this array should be defined in a such way:
static const char * const wwan_port_type_str[WWAN_PORT_MAX] = {
[WWAN_PORT_AT] = "AT",
[WWAN_PORT_MBIM] = "MBIM",
[WWAN_PORT_QMI] = "QMI",
[WWAN_PORT_QCDM] = "QCDM",
[WWAN_PORT_FIREHOSE] = "FIREHOSE",
};
So the array index will be clear without additional notes.
--
Sergey
Hi Sergey,
On Tue, 18 May 2021 at 01:44, Sergey Ryazanov [off-list ref] wrote:
Hello Loic,
On Mon, May 17, 2021 at 12:48 PM Loic Poulain [off-list ref] wrote:
quoted
The port type is by default part of the WWAN port device name.
However device name can not be considered as a 'stable' API and
may be subject to change in the future. This change adds a proper
device attribute that can be used to determine the WWAN protocol/
type.
Signed-off-by: Loic Poulain <redacted>
---
drivers/net/wwan/wwan_core.c | 34 +++++++++++++++++++++++++---------
1 file changed, 25 insertions(+), 9 deletions(-)
A small nitpick, maybe this array should be defined in a such way:
static const char * const wwan_port_type_str[WWAN_PORT_MAX] = {
[WWAN_PORT_AT] = "AT",
[WWAN_PORT_MBIM] = "MBIM",
[WWAN_PORT_QMI] = "QMI",
[WWAN_PORT_QCDM] = "QCDM",
[WWAN_PORT_FIREHOSE] = "FIREHOSE",
};
So the array index will be clear without additional notes.
You're right, it would indeed be more robust.
I'll submit that change in a subsequent patch.
Thanks,
Loic