All of lore.kernel.org
 help / color / mirror / Atom feed
From: <yhchuang@realtek.com>
To: <kvalo@codeaurora.org>
Cc: <linux-wireless@vger.kernel.org>, <pkshih@realtek.com>,
	<bigeasy@linutronix.de>, <kevin_yang@realtek.com>,
	<briannorris@chromium.org>
Subject: [PATCH v3 0/7] rtw88: extract chip tables from core module
Date: Tue, 12 May 2020 18:31:13 +0800	[thread overview]
Message-ID: <20200512103120.5280-1-yhchuang@realtek.com> (raw)

From: Yan-Hsuan Chuang <yhchuang@realtek.com>

[Note]: this patch set is based on
   "[v3,0/9] rtw88: 8723d: Add RF calibration and coex"
   https://patchwork.kernel.org/cover/11542823/

The PCI series devices RTL8822BE/RTL8822CE/RTL8723DE used to load
two kernel modules rtw88.ko/rtwpci.ko into the kernel. The rtw88.ko
is acting as the core module contains the common/core part of the
driver, including each chip's parameter tables and funcations. But
each chip's parameter tables take too much size of the memory, like
several 10K lines for each device. And when one of the the chip is
running, the other chip's table is a burden.

So, extract tables of different chips into another kernel module,
such as rtw88_8822b.ko/rtw88_8822c.ko/rtw88_8723d.ko. These chip
modules have those tables for each chip, so we can avoid loading
the huge tables of RTL8822BE when running RTL8822CE only. To make
the device probed choose the correct kernel module, add kernel
modules such as rtw88_8822be.ko/rtw88_8822ce.ko/rtw88_8723de.ko as
entry point. These module will be responsible to select the correct
corresponding modules they require. For example, if RTL8822CE device
is probed by rtw88_8822ce.ko, it will then select the common part
module rtw88_8822c.ko, and because RTL8822CE uses PCI bus as its
interface, it will then choose rtw88_pci.ko, finally, they both
depend on the core module rtw88_core.ko, it's loaded at the end.

The entry point may look redundant now, but the driver is going to
support USB devices, so the entry modules can help to select the
expected part of the interface module.

By extracting the tables, it can save a lot of memory usage to
not to load the unused tables, and the tables are so big.

Finally, the core module and pci module are named as rtw88.ko and
rtwpci.ko. To make them look consistent and to avoid confusion,
rename them to rtw88_core.ko and rtw88_pci.ko with proper prefix
"rtw88_" to easy distinguish them as modules of the rtw88 driver.


v1 -> v2
  * split patches for easier review

v2 -> v3
  * rebase on top of tree


Yan-Hsuan Chuang (1):
  rtw88: rename rtw88.ko/rtwpci.ko to rtw88_core.ko/rtw88_pci.ko

Zong-Zhe Yang (6):
  rtw88: extract: export symbols used in chip functionalities
  rtw88: extract: export symbols about pci interface
  rtw88: extract: make 8822c an individual kernel module
  rtw88: extract: make 8822b an individual kernel module
  rtw88: extract: make 8723d an individual kernel module
  rtw88: extract: remove the unused after extracting

 drivers/net/wireless/realtek/rtw88/Kconfig    | 18 +++++++--
 drivers/net/wireless/realtek/rtw88/Makefile   | 29 ++++++++++----
 drivers/net/wireless/realtek/rtw88/bf.c       |  7 ++++
 drivers/net/wireless/realtek/rtw88/coex.c     |  3 ++
 drivers/net/wireless/realtek/rtw88/fw.c       |  1 +
 drivers/net/wireless/realtek/rtw88/mac.c      |  1 +
 drivers/net/wireless/realtek/rtw88/main.h     |  3 --
 drivers/net/wireless/realtek/rtw88/pci.c      | 38 +++++--------------
 drivers/net/wireless/realtek/rtw88/pci.h      |  4 --
 drivers/net/wireless/realtek/rtw88/phy.c      | 26 +++++++++++++
 drivers/net/wireless/realtek/rtw88/rtw8723d.c |  5 +++
 .../net/wireless/realtek/rtw88/rtw8723de.c    | 30 +++++++++++++++
 .../net/wireless/realtek/rtw88/rtw8723de.h    | 14 +++++++
 drivers/net/wireless/realtek/rtw88/rtw8822b.c |  5 +++
 .../net/wireless/realtek/rtw88/rtw8822be.c    | 30 +++++++++++++++
 .../net/wireless/realtek/rtw88/rtw8822be.h    | 14 +++++++
 drivers/net/wireless/realtek/rtw88/rtw8822c.c |  5 +++
 .../net/wireless/realtek/rtw88/rtw8822ce.c    | 30 +++++++++++++++
 .../net/wireless/realtek/rtw88/rtw8822ce.h    | 14 +++++++
 drivers/net/wireless/realtek/rtw88/rx.c       |  1 +
 drivers/net/wireless/realtek/rtw88/util.c     |  2 +
 21 files changed, 234 insertions(+), 46 deletions(-)
 create mode 100644 drivers/net/wireless/realtek/rtw88/rtw8723de.c
 create mode 100644 drivers/net/wireless/realtek/rtw88/rtw8723de.h
 create mode 100644 drivers/net/wireless/realtek/rtw88/rtw8822be.c
 create mode 100644 drivers/net/wireless/realtek/rtw88/rtw8822be.h
 create mode 100644 drivers/net/wireless/realtek/rtw88/rtw8822ce.c
 create mode 100644 drivers/net/wireless/realtek/rtw88/rtw8822ce.h

-- 
2.17.1


             reply	other threads:[~2020-05-12 10:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-12 10:31 yhchuang [this message]
2020-05-12 10:31 ` [PATCH v3 1/7] rtw88: extract: export symbols used in chip functionalities yhchuang
2020-05-13 15:51   ` Kalle Valo
2020-05-12 10:31 ` [PATCH v3 2/7] rtw88: extract: export symbols about pci interface yhchuang
2020-05-12 10:31 ` [PATCH v3 3/7] rtw88: extract: make 8822c an individual kernel module yhchuang
2020-05-12 10:31 ` [PATCH v3 4/7] rtw88: extract: make 8822b " yhchuang
2020-05-12 10:31 ` [PATCH v3 5/7] rtw88: extract: make 8723d " yhchuang
2020-05-12 10:31 ` [PATCH v3 6/7] rtw88: extract: remove the unused after extracting yhchuang
2020-05-12 10:31 ` [PATCH v3 7/7] rtw88: rename rtw88.ko/rtwpci.ko to rtw88_core.ko/rtw88_pci.ko yhchuang
2020-05-13  9:58 ` [PATCH v3 0/7] rtw88: extract chip tables from core module Sebastian Andrzej Siewior

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=20200512103120.5280-1-yhchuang@realtek.com \
    --to=yhchuang@realtek.com \
    --cc=bigeasy@linutronix.de \
    --cc=briannorris@chromium.org \
    --cc=kevin_yang@realtek.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.