Linux-Wireless Archive on lore.kernel.org
 help / color / Atom feed
From: <yhchuang@realtek.com>
To: <kvalo@codeaurora.org>
Cc: <linux-wireless@vger.kernel.org>, <briannorris@chromium.org>,
	<sgruszka@redhat.com>
Subject: [PATCH v3 0/3] rtw88: add support for BT co-existence mechanism
Date: Wed, 31 Jul 2019 20:22:44 +0800
Message-ID: <1564575767-27557-1-git-send-email-yhchuang@realtek.com> (raw)

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

This patch set mainly adds a BT co-existence mechanism, which
helps WiFi device to work with BT device concurrently without
interfering each other. For Realtek's WiFi/BT combo devices,
the co-existence mechanism is on the WiFi side.

The rest of the patches add BTcoex support. BTcoex needs to
wake up events that is waiting for some C2H reported in IRQ
context, so these C2H skbs do not required to be queued into
workqueues to be processed. What we need to do is to simply
wake it uin IRQ context.

And actually C2H workqueue context should be protected by
rtwdev->mutex lock to perform some hardware operations
against mac80211 callbacks.

The final patch contains the most of the BTcoex logic.
It is not that complicated, just to gather information and
make decision on WiFi driver side. What makes the code so
much is that the mechanism needs to take care of a lot of
WiFi/BT combinations. Such as if WiFi is at 2G or is having
a lot of traffic or is connecting to AP. And BT has many
profiles such as A2DP/HID/PAN or it is slave or not.


v1 -> v2

    rebase onto the latest wireless-drivers-next
    the conflicts is in pci.c with patch
    "rtw88: pci: Rearrange the memory usage for skb in RX ISR"

v2 -> v3

    - free skbs responded for coex information
    - remove BT efuse check related patches, because it is not
      recommended to read BT's efuse at WiFi side. If the efuse
      bank is switched at WiFi side, BT is not able to read its
      own efuse content
    - add TDMA mode with 4 slots, to deal with some BT earphones
      that have small buffer


Yan-Hsuan Chuang (3):
  rtw88: allow c2h operation in irq context
  rtw88: enclose c2h cmd handle with mutex
  rtw88: add BT co-existence support

 drivers/net/wireless/realtek/rtw88/Makefile   |    1 +
 drivers/net/wireless/realtek/rtw88/coex.c     | 2507 +++++++++++++++++++++++++
 drivers/net/wireless/realtek/rtw88/coex.h     |  369 ++++
 drivers/net/wireless/realtek/rtw88/fw.c       |  135 +-
 drivers/net/wireless/realtek/rtw88/fw.h       |   73 +
 drivers/net/wireless/realtek/rtw88/mac80211.c |   19 +
 drivers/net/wireless/realtek/rtw88/main.c     |   45 +-
 drivers/net/wireless/realtek/rtw88/main.h     |  233 +++
 drivers/net/wireless/realtek/rtw88/pci.c      |    6 +-
 drivers/net/wireless/realtek/rtw88/ps.c       |    9 +
 drivers/net/wireless/realtek/rtw88/reg.h      |   62 +
 drivers/net/wireless/realtek/rtw88/rtw8822b.c |  460 ++++-
 drivers/net/wireless/realtek/rtw88/rtw8822c.c |  355 +++-
 13 files changed, 4240 insertions(+), 34 deletions(-)
 create mode 100644 drivers/net/wireless/realtek/rtw88/coex.c
 create mode 100644 drivers/net/wireless/realtek/rtw88/coex.h

-- 
2.7.4


             reply index

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-31 12:22 yhchuang [this message]
2019-07-31 12:22 ` [PATCH v3 1/3] rtw88: allow c2h operation in irq context yhchuang
2019-08-06 12:42   ` Kalle Valo
2019-07-31 12:22 ` [PATCH v3 2/3] rtw88: enclose c2h cmd handle with mutex yhchuang
2019-08-15 21:11   ` Brian Norris
2019-08-16  2:45     ` Tony Chuang
2019-08-17  1:29       ` Brian Norris
2019-07-31 12:22 ` [PATCH v3 3/3] rtw88: add BT co-existence support yhchuang

Reply instructions:

You may reply publically 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=1564575767-27557-1-git-send-email-yhchuang@realtek.com \
    --to=yhchuang@realtek.com \
    --cc=briannorris@chromium.org \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=sgruszka@redhat.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

Linux-Wireless Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-wireless/0 linux-wireless/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-wireless linux-wireless/ https://lore.kernel.org/linux-wireless \
		linux-wireless@vger.kernel.org linux-wireless@archiver.kernel.org
	public-inbox-index linux-wireless


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-wireless


AGPL code for this site: git clone https://public-inbox.org/ public-inbox