summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOndrej Jirman <megous@megous.com>2020-06-15 12:33:09 +0200
committerJaron Kent-Dobias <jaron@kent-dobias.com>2020-08-11 12:52:49 -0400
commit7199e2598238296e47076575d64d235bad7dccce (patch)
tree19a40abab87f581e39173ca34a075c4a90fc45f3
parent787d9a1a4c1a0a2d2ad9b7168dc00f530c42da3c (diff)
downloadlinux-7199e2598238296e47076575d64d235bad7dccce.tar.gz
linux-7199e2598238296e47076575d64d235bad7dccce.tar.bz2
linux-7199e2598238296e47076575d64d235bad7dccce.zip
8723cs: Port to Linux 5.8v5.8.1-pine1
-rw-r--r--drivers/staging/rtl8723cs-new/core/rtw_security.c10
-rw-r--r--drivers/staging/rtl8723cs-new/include/rtw_security.h2
-rw-r--r--drivers/staging/rtl8723cs-new/os_dep/linux/ioctl_cfg80211.c33
3 files changed, 39 insertions, 6 deletions
diff --git a/drivers/staging/rtl8723cs-new/core/rtw_security.c b/drivers/staging/rtl8723cs-new/core/rtw_security.c
index df88f53d0b27..50b71fe2d400 100644
--- a/drivers/staging/rtl8723cs-new/core/rtw_security.c
+++ b/drivers/staging/rtl8723cs-new/core/rtw_security.c
@@ -2135,7 +2135,7 @@ BIP_exit:
#ifndef PLATFORM_FREEBSD
/* compress 512-bits */
-static int sha256_compress(struct sha256_state *md, unsigned char *buf)
+static int sha256_compress(struct rtw_sha256_state *md, unsigned char *buf)
{
u32 S[8], W[64], t0, t1;
u32 t;
@@ -2183,7 +2183,7 @@ static int sha256_compress(struct sha256_state *md, unsigned char *buf)
}
/* Initialize the hash state */
-static void sha256_init(struct sha256_state *md)
+static void sha256_init(struct rtw_sha256_state *md)
{
md->curlen = 0;
md->length = 0;
@@ -2204,7 +2204,7 @@ static void sha256_init(struct sha256_state *md)
@param inlen The length of the data (octets)
@return CRYPT_OK if successful
*/
-static int sha256_process(struct sha256_state *md, unsigned char *in,
+static int sha256_process(struct rtw_sha256_state *md, unsigned char *in,
unsigned long inlen)
{
unsigned long n;
@@ -2245,7 +2245,7 @@ static int sha256_process(struct sha256_state *md, unsigned char *in,
@param out [out] The destination of the hash (32 bytes)
@return CRYPT_OK if successful
*/
-static int sha256_done(struct sha256_state *md, unsigned char *out)
+static int sha256_done(struct rtw_sha256_state *md, unsigned char *out)
{
int i;
@@ -2295,7 +2295,7 @@ static int sha256_done(struct sha256_state *md, unsigned char *out)
static int sha256_vector(size_t num_elem, u8 *addr[], size_t *len,
u8 *mac)
{
- struct sha256_state ctx;
+ struct rtw_sha256_state ctx;
size_t i;
sha256_init(&ctx);
diff --git a/drivers/staging/rtl8723cs-new/include/rtw_security.h b/drivers/staging/rtl8723cs-new/include/rtw_security.h
index b27fabc35987..5e258a171a4d 100644
--- a/drivers/staging/rtl8723cs-new/include/rtw_security.h
+++ b/drivers/staging/rtl8723cs-new/include/rtw_security.h
@@ -246,7 +246,7 @@ struct security_priv {
#endif /* DBG_SW_SEC_CNT */
};
-struct sha256_state {
+struct rtw_sha256_state {
u64 length;
u32 state[8], curlen;
u8 buf[64];
diff --git a/drivers/staging/rtl8723cs-new/os_dep/linux/ioctl_cfg80211.c b/drivers/staging/rtl8723cs-new/os_dep/linux/ioctl_cfg80211.c
index dc4e887f5a57..133414fb3c86 100644
--- a/drivers/staging/rtl8723cs-new/os_dep/linux/ioctl_cfg80211.c
+++ b/drivers/staging/rtl8723cs-new/os_dep/linux/ioctl_cfg80211.c
@@ -5908,6 +5908,33 @@ exit:
return ret;
}
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0))
+
+static void
+cfg80211_rtw_update_mgmt_frame_registrations(struct wiphy *wiphy,
+ struct wireless_dev *wdev,
+ struct mgmt_frame_regs *upd)
+{
+ struct net_device *ndev = wdev_to_ndev(wdev);
+ struct rtw_wdev_priv *pwdev_priv;
+ _adapter *adapter;
+
+ if (ndev == NULL)
+ return;
+
+ adapter = (_adapter *)rtw_netdev_priv(ndev);
+ pwdev_priv = adapter_wdev_data(adapter);
+
+#ifdef CONFIG_DEBUG_CFG80211
+ RTW_INFO(FUNC_ADPT_FMT" stypes:%x\n", FUNC_ADPT_ARG(adapter),
+ upd->interface_stypes);
+#endif
+
+ /* not implemented, see bellow */
+}
+
+#else
+
static void cfg80211_rtw_mgmt_frame_register(struct wiphy *wiphy,
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0))
struct wireless_dev *wdev,
@@ -5952,6 +5979,8 @@ exit:
return;
}
+#endif
+
#if defined(CONFIG_TDLS) && (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0))
static int cfg80211_rtw_tdls_mgmt(struct wiphy *wiphy,
struct net_device *ndev,
@@ -6899,7 +6928,11 @@ static struct cfg80211_ops rtw_cfg80211_ops = {
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE)
.mgmt_tx = cfg80211_rtw_mgmt_tx,
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0))
+ .update_mgmt_frame_registrations = cfg80211_rtw_update_mgmt_frame_registrations,
+#else
.mgmt_frame_register = cfg80211_rtw_mgmt_frame_register,
+#endif
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34) && LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35))
.action = cfg80211_rtw_mgmt_tx,
#endif