Don't try calling SIOCETHTOOL on UDS.

Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
master
Miroslav Lichvar 2012-10-11 20:17:32 +02:00 committed by Richard Cochran
parent c6bb965f3d
commit 937f3aec5b
1 changed files with 3 additions and 1 deletions

4
port.c
View File

@ -1670,7 +1670,9 @@ struct port *port_open(int phc_index,
memset(p, 0, sizeof(*p)); memset(p, 0, sizeof(*p));
if (sk_interface_phc(interface->name, &checked_phc_index)) if (interface->transport == TRANS_UDS)
; /* UDS cannot have a PHC. */
else if (sk_interface_phc(interface->name, &checked_phc_index))
pr_warning("port %d: get_ts_info not supported", number); pr_warning("port %d: get_ts_info not supported", number);
else if (phc_index >= 0 && phc_index != checked_phc_index) { else if (phc_index >= 0 && phc_index != checked_phc_index) {
pr_err("port %d: PHC device mismatch", number); pr_err("port %d: PHC device mismatch", number);