From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
To: Jeff Johnson <jeff.johnson@oss.qualcomm.com>,
"Gustavo A. R. Silva" <gustavoars@kernel.org>,
Kalle Valo <quic_kvalo@quicinc.com>
Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-hardening@vger.kernel.org
Subject: Re: [PATCH v2][next] wifi: ath6kl: wmi: Avoid -Wflex-array-member-not-at-end warning
Date: Wed, 18 Feb 2026 18:38:41 +0900 [thread overview]
Message-ID: <6305fbc7-8210-4f4d-b719-30ba038611af@embeddedor.com> (raw)
In-Reply-To: <d2a02b4c-5f69-4f5e-bc0e-428b64e99d36@oss.qualcomm.com>
>> @@ -1652,7 +1656,7 @@ struct roam_ctrl_cmd {
>> union {
>> u8 bssid[ETH_ALEN]; /* WMI_FORCE_ROAM */
>> u8 roam_mode; /* WMI_SET_ROAM_MODE */
>> - struct bss_bias_info bss; /* WMI_SET_HOST_BIAS */
>> + struct bss_bias_info_hdr bss; /* WMI_SET_HOST_BIAS */
>> struct low_rssi_scan_params params; /* WMI_SET_LRSSI_SCAN_PARAMS
>> */
>> } __packed info;
>
> That bss member appears to be completely unused
> (bssid, roam_mode, and params are used)
>
> So IMO the better solution is to remove bss from the union.
> And I think struct bss_bias and struct bss_bias_info can also be removed.
Even if they're not used, are you sure they aren't there simply
to define the memory layout of struct roam_ctrl_cmd?
As Kees commented[1], struct roam_ctrl_cmd appears to be a
hardware interface... See below:
drivers/net/wireless/ath/ath6kl/wmi.c:
755 /*
756 * Mechanism to modify the roaming behavior in the firmware. The lower rssi
757 * at which the station has to roam can be passed with
758 * WMI_SET_LRSSI_SCAN_PARAMS. Subtract 96 from RSSI to get the signal level
759 * in dBm.
760 */
761 int ath6kl_wmi_set_roam_lrssi_cmd(struct wmi *wmi, u8 lrssi)
762 {
763 struct sk_buff *skb;
764 struct roam_ctrl_cmd *cmd;
765
766 skb = ath6kl_wmi_get_new_buf(sizeof(*cmd));
767 if (!skb)
768 return -ENOMEM;
769
770 cmd = (struct roam_ctrl_cmd *) skb->data;
...
}
Thanks
-Gustavo
[1] https://lore.kernel.org/linux-hardening/202601151627.99DFE54@keescook/
next prev parent reply other threads:[~2026-02-19 0:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-17 5:10 Gustavo A. R. Silva
2026-02-19 0:18 ` Jeff Johnson
2026-02-18 9:38 ` Gustavo A. R. Silva [this message]
2026-02-20 23:36 ` Jeff Johnson
2026-02-20 9:54 ` Gustavo A. R. Silva
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6305fbc7-8210-4f4d-b719-30ba038611af@embeddedor.com \
--to=gustavo@embeddedor.com \
--cc=gustavoars@kernel.org \
--cc=jeff.johnson@oss.qualcomm.com \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=quic_kvalo@quicinc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®