History

wifi: remove zero-length arrays

All of these are really meant to be variable-length, and in the case of s1g_beacon it's actually accessed. Make that one in particular, and a couple of others (that aren't used as arrays now), actually variable.

Johannes Berg committed 1 year ago

Commit a85b8541 parent 27605c81 file · +9 −9Browse files

Showing the changes to include/linux (1 of 1 file). Show all

Unified · Split

include/linux/ieee80211.h+9−9
@@ -1278,7 +1278,7 @@ struct ieee80211_ext { · 1277 unmodified lines
1278 u8 sa[ETH_ALEN];1278 u8 sa[ETH_ALEN];
1279 __le32 timestamp;1279 __le32 timestamp;
1280 u8 change_seq;1280 u8 change_seq;
1281 u8 variable[0];1281 u8 variable[];
1282 } __packed s1g_beacon;1282 } __packed s1g_beacon;
1283 } u;1283 } u;
1284} __packed __aligned(2);1284} __packed __aligned(2);
@@ -1536,7 +1536,7 @@ struct ieee80211_mgmt { · 251 unmodified lines
1536 u8 action_code;1536 u8 action_code;
1537 u8 dialog_token;1537 u8 dialog_token;
1538 __le16 capability;1538 __le16 capability;
1539 u8 variable[0];1539 u8 variable[];
1540 } __packed tdls_discover_resp;1540 } __packed tdls_discover_resp;
1541 struct {1541 struct {
1542 u8 action_code;1542 u8 action_code;
@@ -1721,35 +1721,35 @@ struct ieee80211_tdls_data { · 178 unmodified lines
1721 struct {1721 struct {
1722 u8 dialog_token;1722 u8 dialog_token;
1723 __le16 capability;1723 __le16 capability;
1724 u8 variable[0];1724 u8 variable[];
1725 } __packed setup_req;1725 } __packed setup_req;
1726 struct {1726 struct {
1727 __le16 status_code;1727 __le16 status_code;
1728 u8 dialog_token;1728 u8 dialog_token;
1729 __le16 capability;1729 __le16 capability;
1730 u8 variable[0];1730 u8 variable[];
1731 } __packed setup_resp;1731 } __packed setup_resp;
1732 struct {1732 struct {
1733 __le16 status_code;1733 __le16 status_code;
1734 u8 dialog_token;1734 u8 dialog_token;
1735 u8 variable[0];1735 u8 variable[];
1736 } __packed setup_cfm;1736 } __packed setup_cfm;
1737 struct {1737 struct {
1738 __le16 reason_code;1738 __le16 reason_code;
1739 u8 variable[0];1739 u8 variable[];
1740 } __packed teardown;1740 } __packed teardown;
1741 struct {1741 struct {
1742 u8 dialog_token;1742 u8 dialog_token;
1743 u8 variable[0];1743 u8 variable[];
1744 } __packed discover_req;1744 } __packed discover_req;
1745 struct {1745 struct {
1746 u8 target_channel;1746 u8 target_channel;
1747 u8 oper_class;1747 u8 oper_class;
1748 u8 variable[0];1748 u8 variable[];
1749 } __packed chan_switch_req;1749 } __packed chan_switch_req;
1750 struct {1750 struct {
1751 __le16 status_code;1751 __le16 status_code;
1752 u8 variable[0];1752 u8 variable[];
1753 } __packed chan_switch_resp;1753 } __packed chan_switch_resp;
1754 } u;1754 } u;
1755} __packed;1755} __packed;