mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH rtw-next 0/6] wifi: rtlwifi: replace the 802.11 header helper macros with kernel ones
@ 2026-11-10 18:44 Rishik Yechuri
  2026-11-10 18:44 ` [PATCH rtw-next 1/6] wifi: rtlwifi: use struct ieee80211_pspoll for the PS Poll reserved page Rishik Yechuri
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Rishik Yechuri @ 2026-11-10 18:44 UTC (permalink / raw)
  To: Ping-Ke Shih; +Cc: linux-wireless, linux-kernel, Rishik Yechuri

base.h and wifi.h carry a few helper macros that duplicate things the
kernel already provides. The reserved page builders in the fw.c files
write MAC addresses and the PS Poll AID into their frame templates at
hand counted byte offsets, there is a private alias for
msecs_to_jiffies(), a private rounding macro and a private frame type
test. Some more are defined but not used anywhere.

This series switches each of them over to the kernel equivalent and
then removes the macro.

Patch 1 uses struct ieee80211_pspoll for the PS Poll template. Its aid
member is __le16, so this one is more than a cleanup on big endian
hosts, where the old macro stored the AID in host byte order. On little
endian hosts the bytes written are the same as before.

Patch 2 uses struct ieee80211_hdr and ether_addr_copy() for the other
templates and removes CP_MACADDR() and the FRAME_OFFSET_* constants.

Patches 3 to 5 replace MSECS(), N_BYTE_ALIGMENT() and WLAN_FC_GET_TYPE()
with msecs_to_jiffies(), ALIGN() and ieee80211_is_ctl().

Patch 6 open codes the one use of byte() and removes it together with
two macros that have no users left.

Each patch builds cleanly with W=1 and sparse. I do not have any of
these chips, so this is compile tested only.

Rishik Yechuri (6):
  wifi: rtlwifi: use struct ieee80211_pspoll for the PS Poll reserved
    page
  wifi: rtlwifi: use struct ieee80211_hdr for the reserved page headers
  wifi: rtlwifi: call msecs_to_jiffies() directly
  wifi: rtlwifi: rtl8192se: use ALIGN() for the H2C command length
  wifi: rtlwifi: use ieee80211_is_ctl() instead of WLAN_FC_GET_TYPE()
  wifi: rtlwifi: remove byte(), packet_get_type() and
    FILL_OCTET_STRING()

 drivers/net/wireless/realtek/rtlwifi/base.c   |   2 +-
 drivers/net/wireless/realtek/rtlwifi/base.h   |  21 ----
 drivers/net/wireless/realtek/rtlwifi/core.c   |   2 +-
 drivers/net/wireless/realtek/rtlwifi/ps.c     |   6 +-
 .../wireless/realtek/rtlwifi/rtl8188ee/dm.c   |   2 +-
 .../wireless/realtek/rtlwifi/rtl8188ee/fw.c   |  38 +++---
 .../wireless/realtek/rtlwifi/rtl8188ee/hw.c   |   6 +-
 .../realtek/rtlwifi/rtl8192c/fw_common.c      |  38 +++---
 .../wireless/realtek/rtlwifi/rtl8192ce/trx.c  |   5 +-
 .../wireless/realtek/rtlwifi/rtl8192cu/mac.c  |   5 +-
 .../realtek/rtlwifi/rtl8192d/trx_common.c     |   5 +-
 .../wireless/realtek/rtlwifi/rtl8192de/fw.c   |  38 +++---
 .../wireless/realtek/rtlwifi/rtl8192ee/fw.c   |  58 ++++-----
 .../wireless/realtek/rtlwifi/rtl8192ee/hw.c   |   6 +-
 .../wireless/realtek/rtlwifi/rtl8192se/fw.c   |   6 +-
 .../wireless/realtek/rtlwifi/rtl8192se/trx.c  |   5 +-
 .../wireless/realtek/rtlwifi/rtl8723ae/fw.c   |  38 +++---
 .../wireless/realtek/rtlwifi/rtl8723ae/trx.c  |   5 +-
 .../wireless/realtek/rtlwifi/rtl8723be/fw.c   |  58 ++++-----
 .../wireless/realtek/rtlwifi/rtl8723be/hw.c   |   6 +-
 .../wireless/realtek/rtlwifi/rtl8723be/trx.c  |   5 +-
 .../wireless/realtek/rtlwifi/rtl8821ae/fw.c   | 116 +++++++++---------
 .../wireless/realtek/rtlwifi/rtl8821ae/hw.c   |   6 +-
 drivers/net/wireless/realtek/rtlwifi/wifi.h   |  30 -----
 24 files changed, 225 insertions(+), 282 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-11-10 18:44 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-10 18:44 [PATCH rtw-next 0/6] wifi: rtlwifi: replace the 802.11 header helper macros with kernel ones Rishik Yechuri
2026-11-10 18:44 ` [PATCH rtw-next 1/6] wifi: rtlwifi: use struct ieee80211_pspoll for the PS Poll reserved page Rishik Yechuri
2026-11-10 18:44 ` [PATCH rtw-next 2/6] wifi: rtlwifi: use struct ieee80211_hdr for the reserved page headers Rishik Yechuri
2026-11-10 18:44 ` [PATCH rtw-next 3/6] wifi: rtlwifi: call msecs_to_jiffies() directly Rishik Yechuri
2026-11-10 18:44 ` [PATCH rtw-next 4/6] wifi: rtlwifi: rtl8192se: use ALIGN() for the H2C command length Rishik Yechuri
2026-11-10 18:44 ` [PATCH rtw-next 5/6] wifi: rtlwifi: use ieee80211_is_ctl() instead of WLAN_FC_GET_TYPE() Rishik Yechuri
2026-11-10 18:44 ` [PATCH rtw-next 6/6] wifi: rtlwifi: remove byte(), packet_get_type() and FILL_OCTET_STRING() Rishik Yechuri

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®