Linux wireless drivers development
 help / color / mirror / Atom feed
From: Larry Finger <Larry.Finger@lwfinger.net>
To: kvalo@codeaurora.org
Cc: linux-wireless@vger.kernel.org, pkshih@realtek.com,
	Larry Finger <Larry.Finger@lwfinger.net>
Subject: [PATCH 0/4] rtlwifi: rtl8821ae: Convert bit manipulation macros to static inline routines
Date: Mon, 20 May 2019 12:23:55 -0500	[thread overview]
Message-ID: <20190520172359.9993-1-Larry.Finger@lwfinger.net> (raw)

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


             reply	other threads:[~2019-05-20 17:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-20 17:23 Larry Finger [this message]
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

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=20190520172359.9993-1-Larry.Finger@lwfinger.net \
    --to=larry.finger@lwfinger.net \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=pkshih@realtek.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