Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH 0/4] rtlwifi: rtl8821ae: Convert bit manipulation macros to static inline routines
@ 2019-05-20 17:23 Larry Finger
  2019-05-20 17:23 ` [PATCH 1/4] rtlwifi: rtl8821ae: Remove unused GET_XXX and SET_XXX descriptor macros Larry Finger
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Larry Finger @ 2019-05-20 17:23 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless, pkshih, Larry Finger

This driver, as do the others in the rtlwifi family, uses a set of unique
macros to read and write the little-endian RX and TX descriptor registers.
These macros are converted to static inline routines in several steps:

1. Remove all macros that are defined, but never used.
2. Replace the unique macros with the appropriate le32p_replace_bits()
   and le32_get_gits() standard macros.
3. The names of the inline routines are converted from upper to lower case.
4. The calling routines are changed to convert the byte array of
   descriptors into an __le32 word array so that the __le32 casting
   in the inline routines can be eliminated. Some callback routines
   had to keep the byte arrays as they are dependent on definitions
   that are used by all rtlwifi drivers.

The above sequence results in multiple rewrites of some lines; however,
it made debugging the changes a lot easier.

My plan is to convert all drivers in rtlwifi. Once that is complete, most
of the remaining casts from u8 * to __le32 * will be eliminated.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>


Larry Finger (4):
  rtlwifi: rtl8821ae: Remove unused GET_XXX and SET_XXX descriptor
    macros
  rtlwifi: rtl8821ae: Replace local bit manipulation macros
  rtlwifi: rtl8821ae: Convert macros that set descriptor
  rtlwifi: rtl8821ae: Convert inline routines to little-endian words

 .../wireless/realtek/rtlwifi/rtl8821ae/dm.c   |   3 +-
 .../wireless/realtek/rtlwifi/rtl8821ae/trx.c  | 253 ++++---
 .../wireless/realtek/rtlwifi/rtl8821ae/trx.h  | 708 ++++++++++--------
 drivers/net/wireless/realtek/rtlwifi/wifi.h   |   1 +
 4 files changed, 509 insertions(+), 456 deletions(-)

-- 
2.21.0


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

end of thread, other threads:[~2019-05-28 12:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-20 17:23 [PATCH 0/4] rtlwifi: rtl8821ae: Convert bit manipulation macros to static inline routines Larry Finger
2019-05-20 17:23 ` [PATCH 1/4] rtlwifi: rtl8821ae: Remove unused GET_XXX and SET_XXX descriptor macros Larry Finger
2019-05-28 12:36   ` Kalle Valo
2019-05-20 17:23 ` [PATCH 2/4] rtlwifi: rtl8821ae: Replace local bit manipulation macros Larry Finger
2019-05-20 17:23 ` [PATCH 3/4] rtlwifi: rtl8821ae: Convert macros that set descriptor Larry Finger
2019-05-20 17:23 ` [PATCH 4/4] rtlwifi: rtl8821ae: Convert inline routines to little-endian words Larry Finger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox