Search Linux Wireless

Re: [PATCH][next] wifi: radiotap: Avoid -Wflex-array-member-not-at-end warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 27/08/24 02:22, Johannes Berg wrote:
On Tue, 2024-08-06 at 12:08 -0600, Gustavo A. R. Silva wrote:

+++ b/include/net/ieee80211_radiotap.h
@@ -24,31 +24,36 @@
   * struct ieee80211_radiotap_header - base radiotap header
   */
  struct ieee80211_radiotap_header {
-	/**
-	 * @it_version: radiotap version, always 0
-	 */
-	uint8_t it_version;
-
-	/**
-	 * @it_pad: padding (or alignment)
-	 */
-	uint8_t it_pad;
-
-	/**
-	 * @it_len: overall radiotap header length
-	 */
-	__le16 it_len;
-
-	/**
-	 * @it_present: (first) present word
-	 */
-	__le32 it_present;
+	/* New members MUST be added within the __struct_group() macro below. */

There cannot be new members without breaking interop with the radiotap
spec, that comment isn't really useful ;-)

Ah yes; the comment is not meant to be an invitation to add members to
the struct just for the sake of it. It's there to indicate where they
should be added if needed.


+	__struct_group(ieee80211_radiotap_header_hdr, hdr, __packed,

And also, "header header" sounds odd to me really. The header of the
header? What's what?

I think perhaps better to call this ieee80211_radiotap_hdr_fixed or so?

Sounds good to me. :)

Thanks for the feedback!
--
Gustavo





[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux