and add J1939_PGN_ADDRESS_COMMANDED define Signed-off-by: Oleksij Rempel <o.rempel@xxxxxxxxxxxxxx> --- include/uapi/linux/can/j1939.h | 5 +++-- net/can/j1939/address-claim.c | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/uapi/linux/can/j1939.h b/include/uapi/linux/can/j1939.h index 0c76bd2caf90..160e960cdc7b 100644 --- a/include/uapi/linux/can/j1939.h +++ b/include/uapi/linux/can/j1939.h @@ -20,8 +20,9 @@ #define J1939_IDLE_ADDR 0xfe #define J1939_NO_ADDR 0xff /* == broadcast or no addr */ #define J1939_NO_NAME 0 -#define J1939_PGN_REQUEST 0x0ea00 -#define J1939_PGN_ADDRESS_CLAIMED 0x0ee00 +#define J1939_PGN_ADDRESS_REQUEST 0x0ea00 /* Request for Address Claimed */ +#define J1939_PGN_ADDRESS_CLAIMED 0x0ee00 /* Address Claimed */ +#define J1939_PGN_ADDRESS_COMMANDED 0x0fed8 /* Commanded Address */ #define J1939_PGN_PDU1_MAX 0x3ff00 #define J1939_PGN_MAX 0x3ffff #define J1939_NO_PGN 0x40000 diff --git a/net/can/j1939/address-claim.c b/net/can/j1939/address-claim.c index 333ed05a60ec..a032625dbb27 100644 --- a/net/can/j1939/address-claim.c +++ b/net/can/j1939/address-claim.c @@ -35,7 +35,7 @@ static inline bool j1939_ac_msg_is_request(struct sk_buff *skb) struct j1939_sk_buff_cb *skcb = j1939_skb_to_cb(skb); int req_pgn; - if (skb->len < 3 || skcb->addr.pgn != J1939_PGN_REQUEST) + if (skb->len < 3 || skcb->addr.pgn != J1939_PGN_ADDRESS_REQUEST) return false; req_pgn = skb->data[0] | (skb->data[1] << 8) | (skb->data[2] << 16); -- 2.20.1