]> www.infradead.org Git - users/jedix/linux-maple.git/commit
wifi: rtw89: cam: tweak relation between sec CAM and addr CAM
authorZong-Zhe Yang <kevin_yang@realtek.com>
Thu, 9 May 2024 09:06:44 +0000 (17:06 +0800)
committerPing-Ke Shih <pkshih@realtek.com>
Tue, 14 May 2024 01:29:06 +0000 (09:29 +0800)
commit0448c65af9219ee296f844748d60448f7418180f
treee8c32f4a68e149a90c393d76c13523dd3fc811b1
parentcea4066588308fa932b6b03486c608efff1d761c
wifi: rtw89: cam: tweak relation between sec CAM and addr CAM

In original code architecture, sec CAM is a component of addr CAM.
Hence, sec CAM could not be shared. After MLO, each link has its own
addr CAM. However, one MLD PTK takes only one sec CAM but it needs to
work on multiple links' addr CAMs. So, we now manage sec CAMs in global
pool, and each of them is not bound to a single addr CAM now.

before:

+-----------------+         +--------------------+
| rtw89_{vif/sta} |   ...   | ieee80211_key_conf |
+-----------------+         +--------------------+
        ^                              |
        V                              | hw_key_idx
        |                              |
        |                              V
        |                             +--
   +----------+   addr_cam::key_idx   |  \        +---------+
   | addr_cam |<>---------------------|   |-------| sec_cam |
   +----------+                       |  /        +---------+
                                      +--

after:

+----------------------+         +--------------------+
| rtw89_{vif/sta}_link |   ...   | ieee80211_key_conf |
+----------------------+         +--------------------+
        ^                                   |
        V                                   | hw_key_idx
        |                                   |
        |                                   V
        |                                  --+                  +---------+
        |              +---------+        /  |  sec_cam_idx     | global  |
        |              | sec_cam |-------|   |----------------<>| sec_cam |
        |              +---------+        \  |                  | pool    |
        |                   ^              --+                  +---------+
        |                   |
        |               (*) |
   +----------+             |
   | addr_cam |-------------+
   +----------+

Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://msgid.link/20240509090646.35304-3-pkshih@realtek.com
drivers/net/wireless/realtek/rtw89/cam.c
drivers/net/wireless/realtek/rtw89/core.c
drivers/net/wireless/realtek/rtw89/core.h
drivers/net/wireless/realtek/rtw89/debug.c