wifi: rtw89: 8922a: use SW CRYPTO when broadcast in MLO mode
authorPo-Hao Huang <phhuang@realtek.com>
Mon, 28 Apr 2025 11:24:48 +0000 (19:24 +0800)
committerPing-Ke Shih <pkshih@realtek.com>
Mon, 5 May 2025 01:44:14 +0000 (09:44 +0800)
8922A doesn't support broadcast/multicast traffic under MLO mode.
So let mac80211 do the encryption/decryption for us when the
connection is in MLO mode. Future BE ICs fixes this issue.

Signed-off-by: Po-Hao Huang <phhuang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20250428112456.13165-3-pkshih@realtek.com
drivers/net/wireless/realtek/rtw89/cam.c
drivers/net/wireless/realtek/rtw89/core.h
drivers/net/wireless/realtek/rtw89/rtw8851b.c
drivers/net/wireless/realtek/rtw89/rtw8852a.c
drivers/net/wireless/realtek/rtw89/rtw8852b.c
drivers/net/wireless/realtek/rtw89/rtw8852bt.c
drivers/net/wireless/realtek/rtw89/rtw8852c.c
drivers/net/wireless/realtek/rtw89/rtw8922a.c

index eca3d767ff6032974bcdad46773d648364171aa7..34316e64b777715227f6a82a80f9c4bf2089a1ea 100644 (file)
@@ -469,6 +469,10 @@ int rtw89_cam_sec_key_add(struct rtw89_dev *rtwdev,
        bool ext_key = false;
        int ret;
 
+       if (ieee80211_vif_is_mld(vif) && !chip->hw_mlo_bmc_crypto &&
+           !(key->flags & IEEE80211_KEY_FLAG_PAIRWISE))
+               return -EOPNOTSUPP;
+
        switch (key->cipher) {
        case WLAN_CIPHER_SUITE_WEP40:
                hw_key_type = RTW89_SEC_KEY_TYPE_WEP40;
index be1259cfa7125c963b038f275faac44bb5af8a1e..8f51bbde1fada5c9cd1dc4a8078ecb07a122b912 100644 (file)
@@ -4292,6 +4292,7 @@ struct rtw89_chip_info {
        bool hw_sec_hdr;
        bool hw_mgmt_tx_encrypt;
        bool hw_tkip_crypto;
+       bool hw_mlo_bmc_crypto;
        u8 rf_path_num;
        u8 tx_nss;
        u8 rx_nss;
index 174b90661037b8887d2e941d8888d4a53631e0b4..fafa200a9c8debdc86d4b3bbcd53ec8193239160 100644 (file)
@@ -2506,6 +2506,7 @@ const struct rtw89_chip_info rtw8851b_chip_info = {
        .hw_sec_hdr             = false,
        .hw_mgmt_tx_encrypt     = false,
        .hw_tkip_crypto         = false,
+       .hw_mlo_bmc_crypto      = false,
        .rf_path_num            = 1,
        .tx_nss                 = 1,
        .rx_nss                 = 1,
index 408c2f7b3eece270873e02715e614a9673265099..cd5987fc52d7dfda938dad59a5b1dc01fb9eef94 100644 (file)
@@ -2224,6 +2224,7 @@ const struct rtw89_chip_info rtw8852a_chip_info = {
        .hw_sec_hdr             = false,
        .hw_mgmt_tx_encrypt     = false,
        .hw_tkip_crypto         = false,
+       .hw_mlo_bmc_crypto      = false,
        .rf_path_num            = 2,
        .tx_nss                 = 2,
        .rx_nss                 = 2,
index dec736a07c54cf17fa292db576d6e005cff18ab5..dacdb384de2cf1f028912ccf2d9fab991d7df1aa 100644 (file)
@@ -860,6 +860,7 @@ const struct rtw89_chip_info rtw8852b_chip_info = {
        .hw_sec_hdr             = false,
        .hw_mgmt_tx_encrypt     = false,
        .hw_tkip_crypto         = false,
+       .hw_mlo_bmc_crypto      = false,
        .rf_path_num            = 2,
        .tx_nss                 = 2,
        .rx_nss                 = 2,
index 3aaf70e32652ba1544915e05192a6d76f4aaef1d..289dce688d72082f6164ffcdc8c6d9b41bcc253d 100644 (file)
@@ -793,6 +793,7 @@ const struct rtw89_chip_info rtw8852bt_chip_info = {
        .hw_sec_hdr             = false,
        .hw_mgmt_tx_encrypt     = false,
        .hw_tkip_crypto         = true,
+       .hw_mlo_bmc_crypto      = false,
        .rf_path_num            = 2,
        .tx_nss                 = 2,
        .rx_nss                 = 2,
index 9a2235f28e243863125c103fd5f6e7ea2be7ef04..2a6143a8d256b025bcc9777d92e147f0bf246379 100644 (file)
@@ -3047,6 +3047,7 @@ const struct rtw89_chip_info rtw8852c_chip_info = {
        .hw_sec_hdr             = true,
        .hw_mgmt_tx_encrypt     = true,
        .hw_tkip_crypto         = true,
+       .hw_mlo_bmc_crypto      = false,
        .rf_path_num            = 2,
        .tx_nss                 = 2,
        .rx_nss                 = 2,
index 2ff847eb76fdb0beeca4e6b7bec2f1442464d0c3..1d0f6e7df497d609f8d389bffdfd96d6ac5bb124 100644 (file)
@@ -2858,6 +2858,7 @@ const struct rtw89_chip_info rtw8922a_chip_info = {
        .hw_sec_hdr             = true,
        .hw_mgmt_tx_encrypt     = true,
        .hw_tkip_crypto         = true,
+       .hw_mlo_bmc_crypto      = false,
        .rf_path_num            = 2,
        .tx_nss                 = 2,
        .rx_nss                 = 2,