Skip to content

Commit

Permalink
net: dsa: tag_qca: fix wrong MGMT_DATA2 size
Browse files Browse the repository at this point in the history
commit d9dba91 upstream.

It was discovered that MGMT_DATA2 can contain up to 28 bytes of data
instead of the 12 bytes written in the Documentation by accounting the
limit of 16 bytes declared in Documentation subtracting the first 4 byte
in the packet header.

Update the define with the real world value.

Tested-by: Ronald Wahl <ronald.wahl@raritan.com>
Fixes: c2ee818 ("net: dsa: tag_qca: add define for handling mgmt Ethernet packet")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Cc: stable@vger.kernel.org # v5.18+
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Ansuel authored and gregkh committed Jan 12, 2023
1 parent ec60222 commit 39a20c4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/linux/dsa/tag_qca.h
Expand Up @@ -45,8 +45,8 @@ struct sk_buff;
QCA_HDR_MGMT_COMMAND_LEN + \
QCA_HDR_MGMT_DATA1_LEN)

#define QCA_HDR_MGMT_DATA2_LEN 12 /* Other 12 byte for the mdio data */
#define QCA_HDR_MGMT_PADDING_LEN 34 /* Padding to reach the min Ethernet packet */
#define QCA_HDR_MGMT_DATA2_LEN 28 /* Other 28 byte for the mdio data */
#define QCA_HDR_MGMT_PADDING_LEN 18 /* Padding to reach the min Ethernet packet */

#define QCA_HDR_MGMT_PKT_LEN (QCA_HDR_MGMT_HEADER_LEN + \
QCA_HDR_LEN + \
Expand Down

0 comments on commit 39a20c4

Please sign in to comment.