]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
staging: rtl8723bs: move rtw_report_sec_ie to core/rtw_mlme.c
authorMichael Straube <straube.linux@gmail.com>
Fri, 1 Aug 2025 08:31:30 +0000 (10:31 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 11 Aug 2025 05:21:22 +0000 (07:21 +0200)
Move the function rtw_report_sec_ie from os_dep/mlme_linux.c to
core/rtw_mlme.c to reduce code in the os_dep directory.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Tested-by: Hans de Goede <hansg@kernel.org>
Reviewed-by: Hans de Goede <hansg@kernel.org>
Link: https://lore.kernel.org/r/20250801083131.82915-8-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/core/rtw_mlme.c
drivers/staging/rtl8723bs/include/mlme_osdep.h
drivers/staging/rtl8723bs/os_dep/mlme_linux.c

index d0579cba3e3229955712c466d5ed8ff566b5cc84..5a5ca148ac8bf55c0782df3ef4aceba98ed97e14 100644 (file)
@@ -2034,6 +2034,40 @@ static int rtw_append_pmkid(struct adapter *Adapter, int iEntry, u8 *ie, uint ie
        return ie_len;
 }
 
+static void rtw_report_sec_ie(struct adapter *adapter, u8 authmode, u8 *sec_ie)
+{
+       uint    len;
+       u8 *buff, *p, i;
+       union iwreq_data wrqu;
+
+       buff = NULL;
+       if (authmode == WLAN_EID_VENDOR_SPECIFIC) {
+               buff = rtw_zmalloc(IW_CUSTOM_MAX);
+               if (!buff)
+                       return;
+
+               p = buff;
+
+               p += scnprintf(p, IW_CUSTOM_MAX - (p - buff), "ASSOCINFO(ReqIEs =");
+
+               len = sec_ie[1] + 2;
+               len = (len < IW_CUSTOM_MAX) ? len : IW_CUSTOM_MAX;
+
+               for (i = 0; i < len; i++)
+                       p += scnprintf(p, IW_CUSTOM_MAX - (p - buff), "%02x", sec_ie[i]);
+
+               p += scnprintf(p, IW_CUSTOM_MAX - (p - buff), ")");
+
+               memset(&wrqu, 0, sizeof(wrqu));
+
+               wrqu.data.length = p - buff;
+
+               wrqu.data.length = (wrqu.data.length < IW_CUSTOM_MAX) ? wrqu.data.length : IW_CUSTOM_MAX;
+
+               kfree(buff);
+       }
+}
+
 signed int rtw_restruct_sec_ie(struct adapter *adapter, u8 *in_ie, u8 *out_ie, uint in_len)
 {
        u8 authmode = 0x0;
index 8e8b5de285dc52bfa4483aecbc6688f323b09c84..3930d9e6dab79b31406b08db884047dbc1c93a26 100644 (file)
@@ -8,8 +8,6 @@
 #define __MLME_OSDEP_H_
 
 
-extern void rtw_report_sec_ie(struct adapter *adapter, u8 authmode, u8 *sec_ie);
-
 void rtw_reset_securitypriv(struct adapter *adapter);
 
 #endif /* _MLME_OSDEP_H_ */
index d2f4855e9d9d32a180c2b55304ba64b92166f440..918d9496d7ccbfcdae3c401b665919b398a91120 100644 (file)
@@ -65,37 +65,3 @@ void rtw_reset_securitypriv(struct adapter *adapter)
        /*  add for CONFIG_IEEE80211W, none 11w also can use */
        spin_unlock_bh(&adapter->security_key_mutex);
 }
-
-void rtw_report_sec_ie(struct adapter *adapter, u8 authmode, u8 *sec_ie)
-{
-       uint    len;
-       u8 *buff, *p, i;
-       union iwreq_data wrqu;
-
-       buff = NULL;
-       if (authmode == WLAN_EID_VENDOR_SPECIFIC) {
-               buff = rtw_zmalloc(IW_CUSTOM_MAX);
-               if (!buff)
-                       return;
-
-               p = buff;
-
-               p += scnprintf(p, IW_CUSTOM_MAX - (p - buff), "ASSOCINFO(ReqIEs =");
-
-               len = sec_ie[1] + 2;
-               len = (len < IW_CUSTOM_MAX) ? len : IW_CUSTOM_MAX;
-
-               for (i = 0; i < len; i++)
-                       p += scnprintf(p, IW_CUSTOM_MAX - (p - buff), "%02x", sec_ie[i]);
-
-               p += scnprintf(p, IW_CUSTOM_MAX - (p - buff), ")");
-
-               memset(&wrqu, 0, sizeof(wrqu));
-
-               wrqu.data.length = p - buff;
-
-               wrqu.data.length = (wrqu.data.length < IW_CUSTOM_MAX) ? wrqu.data.length : IW_CUSTOM_MAX;
-
-               kfree(buff);
-       }
-}