Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: rtl8723au: rtw_report_sec_ie23a() is only called from rtw_mlme.c

Move it there and declare it static

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Jes Sorensen and committed by
Greg Kroah-Hartman
814a1d90 1eb66322

+44 -44
+44 -2
drivers/staging/rtl8723au/core/rtw_mlme.c
··· 2002 2002 } 2003 2003 return ie_len; 2004 2004 } 2005 + 2006 + static void 2007 + _rtw_report_sec_ie(struct rtw_adapter *adapter, u8 authmode, u8 *sec_ie) 2008 + { 2009 + uint len; 2010 + u8 *buff, *p, i; 2011 + union iwreq_data wrqu; 2012 + 2013 + RT_TRACE(_module_mlme_osdep_c_, _drv_info_, 2014 + ("+_rtw_report_sec_ie, authmode =%d\n", authmode)); 2015 + 2016 + buff = NULL; 2017 + if (authmode == _WPA_IE_ID_) { 2018 + RT_TRACE(_module_mlme_osdep_c_, _drv_info_, 2019 + ("_rtw_report_sec_ie, authmode =%d\n", authmode)); 2020 + 2021 + buff = kzalloc(IW_CUSTOM_MAX, GFP_KERNEL); 2022 + if (!buff) 2023 + return; 2024 + p = buff; 2025 + 2026 + p += sprintf(p, "ASSOCINFO(ReqIEs ="); 2027 + 2028 + len = sec_ie[1]+2; 2029 + len = (len < IW_CUSTOM_MAX) ? len : IW_CUSTOM_MAX; 2030 + 2031 + for (i = 0; i < len; i++) 2032 + p += sprintf(p, "%02x", sec_ie[i]); 2033 + 2034 + p += sprintf(p, ")"); 2035 + 2036 + memset(&wrqu, 0, sizeof(wrqu)); 2037 + 2038 + wrqu.data.length = p-buff; 2039 + 2040 + wrqu.data.length = (wrqu.data.length < IW_CUSTOM_MAX) ? 2041 + wrqu.data.length : IW_CUSTOM_MAX; 2042 + 2043 + kfree(buff); 2044 + } 2045 + } 2046 + 2005 2047 int rtw_restruct_sec_ie23a(struct rtw_adapter *adapter, u8 *in_ie, u8 *out_ie, 2006 2048 uint in_len) 2007 2049 { ··· 2079 2037 memcpy(&out_ie[ielength], &psecuritypriv->supplicant_ie[0], 2080 2038 psecuritypriv->supplicant_ie[1] + 2); 2081 2039 ielength += psecuritypriv->supplicant_ie[1] + 2; 2082 - rtw_report_sec_ie23a(adapter, authmode, 2083 - psecuritypriv->supplicant_ie); 2040 + _rtw_report_sec_ie(adapter, authmode, 2041 + psecuritypriv->supplicant_ie); 2084 2042 } 2085 2043 2086 2044 iEntry = SecIsInPMKIDList(adapter, pmlmepriv->assoc_bssid);
-2
drivers/staging/rtl8723au/include/mlme_osdep.h
··· 19 19 #include <drv_types.h> 20 20 21 21 void rtw_os_indicate_disconnect23a(struct rtw_adapter *adapter); 22 - void rtw_report_sec_ie23a(struct rtw_adapter *adapter, u8 authmode, u8 *sec_ie); 23 - 24 22 void rtw_reset_securitypriv23a(struct rtw_adapter *adapter); 25 23 26 24 #endif /* _MLME_OSDEP_H_ */
-40
drivers/staging/rtl8723au/os_dep/mlme_linux.c
··· 80 80 81 81 rtw_reset_securitypriv23a(adapter); 82 82 } 83 - 84 - void rtw_report_sec_ie23a(struct rtw_adapter *adapter, u8 authmode, u8 *sec_ie) 85 - { 86 - uint len; 87 - u8 *buff, *p, i; 88 - union iwreq_data wrqu; 89 - 90 - RT_TRACE(_module_mlme_osdep_c_, _drv_info_, 91 - ("+rtw_report_sec_ie23a, authmode =%d\n", authmode)); 92 - 93 - buff = NULL; 94 - if (authmode == _WPA_IE_ID_) { 95 - RT_TRACE(_module_mlme_osdep_c_, _drv_info_, 96 - ("rtw_report_sec_ie23a, authmode =%d\n", authmode)); 97 - 98 - buff = kzalloc(IW_CUSTOM_MAX, GFP_KERNEL); 99 - if (!buff) 100 - return; 101 - p = buff; 102 - 103 - p += sprintf(p, "ASSOCINFO(ReqIEs ="); 104 - 105 - len = sec_ie[1]+2; 106 - len = (len < IW_CUSTOM_MAX) ? len : IW_CUSTOM_MAX; 107 - 108 - for (i = 0; i < len; i++) 109 - p += sprintf(p, "%02x", sec_ie[i]); 110 - 111 - p += sprintf(p, ")"); 112 - 113 - memset(&wrqu, 0, sizeof(wrqu)); 114 - 115 - wrqu.data.length = p-buff; 116 - 117 - wrqu.data.length = (wrqu.data.length < IW_CUSTOM_MAX) ? 118 - wrqu.data.length : IW_CUSTOM_MAX; 119 - 120 - kfree(buff); 121 - } 122 - }