diff mbox series

[v4,1/3] wifi: rtl8xxxu: Add __packed to struct rtl8723bu_c2h

Message ID 1a270918-da22-ff5f-29fc-7855f740c5ba@gmail.com
State New
Headers show
Series [v4,1/3] wifi: rtl8xxxu: Add __packed to struct rtl8723bu_c2h | expand

Commit Message

Bitterblue Smith Dec. 1, 2022, 2:13 p.m. UTC
This struct is used to access a sequence of bytes received from the
wifi chip. It must not have any padding bytes between the members.

This doesn't change anything on my system, possibly because currently
none of the members need more than byte alignment.

Fixes: b2b43b7837ba ("rtl8xxxu: Initial functionality to handle C2H events for 8723bu")
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
---
v4:
 - No change.
 
v3:
 - No change.
 
v2:
 - Patch is new in v2.
---
 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Ping-Ke Shih Dec. 2, 2022, 12:28 a.m. UTC | #1
> -----Original Message-----
> From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
> Sent: Thursday, December 1, 2022 10:14 PM
> To: linux-wireless@vger.kernel.org
> Cc: Jes Sorensen <Jes.Sorensen@gmail.com>; Ping-Ke Shih <pkshih@realtek.com>
> Subject: [PATCH v4 1/3] wifi: rtl8xxxu: Add __packed to struct rtl8723bu_c2h
> 
> This struct is used to access a sequence of bytes received from the
> wifi chip. It must not have any padding bytes between the members.
> 
> This doesn't change anything on my system, possibly because currently
> none of the members need more than byte alignment.
> 
> Fixes: b2b43b7837ba ("rtl8xxxu: Initial functionality to handle C2H events for 8723bu")
> Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>

Reviewed-by: Ping-Ke Shih <pkshih@realtek.com>

> ---
> v4:
>  - No change.
> 
> v3:
>  - No change.
> 
> v2:
>  - Patch is new in v2.
> ---

[...]
Ping-Ke Shih Dec. 2, 2022, 12:30 a.m. UTC | #2
> -----Original Message-----
> From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
> Sent: Thursday, December 1, 2022 10:17 PM
> To: linux-wireless@vger.kernel.org
> Cc: Jes Sorensen <Jes.Sorensen@gmail.com>; Ping-Ke Shih <pkshih@realtek.com>
> Subject: [PATCH v4 3/3] wifi: rtl8xxxu: Introduce rtl8xxxu_update_ra_report
> 
> The ra_report struct is used for reporting the TX rate via
> sta_statistics. The code which fills it out is duplicated in two
> places, and the RTL8188EU will need it in a third place. Move this
> code into a new function rtl8xxxu_update_ra_report.
> 
> Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>

Reviewed-by: Ping-Ke Shih <pkshih@realtek.com>

> ---
> v4:
>  - No change.
> 
> v3:
>  - No change.
> 
> v2:
>  - Compare against DESC_RATE_54M instead of DESC_RATE_MCS0.
> ---

[...]
Kalle Valo Dec. 8, 2022, 2:46 p.m. UTC | #3
Bitterblue Smith <rtl8821cerfe2@gmail.com> wrote:

> This struct is used to access a sequence of bytes received from the
> wifi chip. It must not have any padding bytes between the members.
> 
> This doesn't change anything on my system, possibly because currently
> none of the members need more than byte alignment.
> 
> Fixes: b2b43b7837ba ("rtl8xxxu: Initial functionality to handle C2H events for 8723bu")
> Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
> Reviewed-by: Ping-Ke Shih <pkshih@realtek.com>

3 patches applied to wireless-next.git, thanks.

dd469a754afd wifi: rtl8xxxu: Add __packed to struct rtl8723bu_c2h
76c16af2cb10 wifi: rtl8xxxu: Fix the channel width reporting
7de16123d9e2 wifi: rtl8xxxu: Introduce rtl8xxxu_update_ra_report
diff mbox series

Patch

diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h
index 136992f0200c..d26df4095da0 100644
--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h
+++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h
@@ -1240,7 +1240,7 @@  struct rtl8723bu_c2h {
 			u8 bw;
 		} __packed ra_report;
 	};
-};
+} __packed;
 
 struct rtl8xxxu_fileops;