All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ping-Ke Shih <pkshih@realtek.com>
To: <kvalo@kernel.org>
Cc: <linux-wireless@vger.kernel.org>
Subject: [PATCH 00/19] rtw89: support AP mode
Date: Fri, 7 Jan 2022 11:42:20 +0800	[thread overview]
Message-ID: <20220107034239.22002-1-pkshih@realtek.com> (raw)

To support AP mode, we implement ::start_ap and ::stop_ap to configure
firmware and hardware to play an AP. Then, we download beacon content to
firmware, so firmware can send out periodically the frames that must have
continual sequence number with other management frames.

When mac80211 buffers unicast packets for certain STAs, it tells driver via
::set_tim, and then we download the beacon content to firmware again. On the
other hand, if a broadcast packet is going to send out, it should go via
HIQ (HI queue) that hardware will raise group frame bit in TIM of beacon
frame. But if no STA sleeps, a broadcast packet is sent via AC queue.

When a STA is going to connect, it issues a probe request frame and then
auth/assoc frames. To receive these frames before it is connected, we need
to consider more RX filter flags to set registers properly.

When a connection is established, we need to assign a mac_id as a behalf of
this peer in firmware and hardware, and then use this mac_id to initialize
an instance in firmware via H2C(s). The most important part is to add a
corresponding address CAM entry that contains peer's MAC address and BSSID,
so hardware can determine a packet is belong to which peer. If it is a
security connection, keys will be filled to security CAM as well.

Since there are many CAM ID(s), I add a debugfs entry to see if the
relations between ID(s) and STA(s) are expected.

Ping-Ke Shih (19):
  rtw89: configure rx_filter according to FIF_PROBE_REQ
  rtw89: use hardware SSN to TX management frame
  rtw89: download beacon content to firmware
  rtw89: add C2H handle of BCN_CNT
  rtw89: implement mac80211_ops::set_tim to indicate STA to receive
    packets
  rtw89: allocate mac_id for each station in AP mode
  rtw89: extend firmware commands on states of sta_assoc and
    sta_disconnect
  rtw89: rename vif_maintain to role_maintain
  rtw89: configure mac port HIQ registers
  rtw89: send broadcast/multicast packets via HIQ if STAs are in sleep
    mode
  rtw89: set mac_id and port ID to TXWD
  rtw89: separate {init,deinit}_addr_cam functions
  rtw89: extend role_maintain to support AP mode
  rtw89: add addr_cam field to sta to support AP mode
  rtw89: only STA mode change vif_type mapping dynamically
  rtw89: maintain assoc/disassoc STA states of firmware and hardware
  rtw89: implement ieee80211_ops::start_ap and stop_ap
  rtw89: debug: add stations entry to show ID assignment
  rtw89: declare AP mode support

 drivers/net/wireless/realtek/rtw89/cam.c      |  40 +++---
 drivers/net/wireless/realtek/rtw89/cam.h      |   5 +
 drivers/net/wireless/realtek/rtw89/core.c     | 107 ++++++++++++++--
 drivers/net/wireless/realtek/rtw89/core.h     |  83 ++++++++-----
 drivers/net/wireless/realtek/rtw89/debug.c    |  71 +++++++++++
 drivers/net/wireless/realtek/rtw89/fw.c       | 110 ++++++++++++++---
 drivers/net/wireless/realtek/rtw89/fw.h       | 115 +++++++++++++++++-
 drivers/net/wireless/realtek/rtw89/mac.c      |  50 +++++++-
 drivers/net/wireless/realtek/rtw89/mac.h      |   2 +
 drivers/net/wireless/realtek/rtw89/mac80211.c |  67 +++++++++-
 drivers/net/wireless/realtek/rtw89/reg.h      |  14 ++-
 drivers/net/wireless/realtek/rtw89/txrx.h     |   3 +
 12 files changed, 575 insertions(+), 92 deletions(-)

-- 
2.25.1


             reply	other threads:[~2022-01-07  3:42 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-07  3:42 Ping-Ke Shih [this message]
2022-01-07  3:42 ` [PATCH 01/19] rtw89: configure rx_filter according to FIF_PROBE_REQ Ping-Ke Shih
2022-01-28 15:57   ` Kalle Valo
2022-01-07  3:42 ` [PATCH 02/19] rtw89: use hardware SSN to TX management frame Ping-Ke Shih
2022-01-07  3:42 ` [PATCH 03/19] rtw89: download beacon content to firmware Ping-Ke Shih
2022-01-07  3:42 ` [PATCH 04/19] rtw89: add C2H handle of BCN_CNT Ping-Ke Shih
2022-01-07  3:42 ` [PATCH 05/19] rtw89: implement mac80211_ops::set_tim to indicate STA to receive packets Ping-Ke Shih
2022-01-07  3:42 ` [PATCH 06/19] rtw89: allocate mac_id for each station in AP mode Ping-Ke Shih
2022-01-07  3:42 ` [PATCH 07/19] rtw89: extend firmware commands on states of sta_assoc and sta_disconnect Ping-Ke Shih
2022-01-07  3:42 ` [PATCH 08/19] rtw89: rename vif_maintain to role_maintain Ping-Ke Shih
2022-01-07  3:42 ` [PATCH 09/19] rtw89: configure mac port HIQ registers Ping-Ke Shih
2022-01-07  3:42 ` [PATCH 10/19] rtw89: send broadcast/multicast packets via HIQ if STAs are in sleep mode Ping-Ke Shih
2022-01-07  3:42 ` [PATCH 11/19] rtw89: set mac_id and port ID to TXWD Ping-Ke Shih
2022-01-07  3:42 ` [PATCH 12/19] rtw89: separate {init,deinit}_addr_cam functions Ping-Ke Shih
2022-01-07  3:42 ` [PATCH 13/19] rtw89: extend role_maintain to support AP mode Ping-Ke Shih
2022-01-28 15:51   ` Kalle Valo
2022-01-29  3:36     ` Pkshih
2022-02-03  8:42       ` Kalle Valo
2022-02-03  9:41         ` Pkshih
2022-01-28 15:53   ` Kalle Valo
2022-01-07  3:42 ` [PATCH 14/19] rtw89: add addr_cam field to sta " Ping-Ke Shih
2022-01-07  3:42 ` [PATCH 15/19] rtw89: only STA mode change vif_type mapping dynamically Ping-Ke Shih
2022-01-07  3:42 ` [PATCH 16/19] rtw89: maintain assoc/disassoc STA states of firmware and hardware Ping-Ke Shih
2022-01-07  3:42 ` [PATCH 17/19] rtw89: implement ieee80211_ops::start_ap and stop_ap Ping-Ke Shih
2022-01-07  3:42 ` [PATCH 18/19] rtw89: debug: add stations entry to show ID assignment Ping-Ke Shih
2022-01-07  3:42 ` [PATCH 19/19] rtw89: declare AP mode support Ping-Ke Shih

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=20220107034239.22002-1-pkshih@realtek.com \
    --to=pkshih@realtek.com \
    --cc=kvalo@kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    /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.