Commit f65b243d authored by Ioana Ciornei's avatar Ioana Ciornei Committed by Greg Kroah-Hartman

staging: dpaa2-switch: pack the firmware command structures

The structures defined in the dpsw-cmd.h header file describe exactly
the layout of commands accepted by the MC firmware. Make sure that all
these structures are packed.
Signed-off-by: default avatarIoana Ciornei <ioana.ciornei@nxp.com>
Link: https://lore.kernel.org/r/20201119165017.806696-4-ciorneiioana@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent dab48127
...@@ -86,6 +86,7 @@ ...@@ -86,6 +86,7 @@
#define dpsw_get_bit(var, bit) \ #define dpsw_get_bit(var, bit) \
(((var) >> (bit)) & GENMASK(0, 0)) (((var) >> (bit)) & GENMASK(0, 0))
#pragma pack(push, 1)
struct dpsw_cmd_open { struct dpsw_cmd_open {
__le32 dpsw_id; __le32 dpsw_id;
}; };
...@@ -385,4 +386,5 @@ struct dpsw_cmd_if_set_mac_addr { ...@@ -385,4 +386,5 @@ struct dpsw_cmd_if_set_mac_addr {
u8 mac_addr[6]; u8 mac_addr[6];
}; };
#pragma pack(pop)
#endif /* __FSL_DPSW_CMD_H */ #endif /* __FSL_DPSW_CMD_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment