From 92c313c3b1a2eada9e1f549cc2389fc363574cb7 Mon Sep 17 00:00:00 2001 From: GeorgeBannister Date: Wed, 25 Jan 2023 11:02:40 +0000 Subject: [PATCH 1/3] fix cfi trip from usb_recv_tasklet --- include/usb_ops_linux.h | 2 +- os_dep/linux/usb_ops_linux.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/usb_ops_linux.h b/include/usb_ops_linux.h index bf59ca0..dd4665e 100644 --- a/include/usb_ops_linux.h +++ b/include/usb_ops_linux.h @@ -89,7 +89,7 @@ int usb_write16(struct intf_hdl *pintfhdl, u32 addr, u16 val); int usb_write32(struct intf_hdl *pintfhdl, u32 addr, u32 val); int usb_writeN(struct intf_hdl *pintfhdl, u32 addr, u32 length, u8 *pdata); u32 usb_read_port(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *rmem); -void usb_recv_tasklet(void *priv); +void usb_recv_tasklet(unsigned long priv); #ifdef CONFIG_USB_INTERRUPT_IN_PIPE void usb_read_interrupt_complete(struct urb *purb, struct pt_regs *regs); diff --git a/os_dep/linux/usb_ops_linux.c b/os_dep/linux/usb_ops_linux.c index 16fc944..fd03f86 100644 --- a/os_dep/linux/usb_ops_linux.c +++ b/os_dep/linux/usb_ops_linux.c @@ -724,7 +724,7 @@ void usb_init_recvbuf(_adapter *padapter, struct recv_buf *precvbuf) int recvbuf2recvframe(PADAPTER padapter, void *ptr); #ifdef CONFIG_USE_USB_BUFFER_ALLOC_RX -void usb_recv_tasklet(void *priv) +void usb_recv_tasklet(unsigned long priv) { struct recv_buf *precvbuf = NULL; _adapter *padapter = (_adapter *)priv; @@ -862,7 +862,7 @@ u32 usb_read_port(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *rmem) } #else /* CONFIG_USE_USB_BUFFER_ALLOC_RX */ -void usb_recv_tasklet(void *priv) +void usb_recv_tasklet(unsigned long priv) { _pkt *pskb; _adapter *padapter = (_adapter *)priv; From e1e4ebd3ef063d02d644c276a73a7b88ad321220 Mon Sep 17 00:00:00 2001 From: GeorgeBannister Date: Thu, 26 Jan 2023 14:37:56 +0000 Subject: [PATCH 2/3] fix cfi trip from rtw_xmit_entry --- os_dep/linux/xmit_linux.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/os_dep/linux/xmit_linux.c b/os_dep/linux/xmit_linux.c index ebbf1f0..f08dd8e 100644 --- a/os_dep/linux/xmit_linux.c +++ b/os_dep/linux/xmit_linux.c @@ -444,7 +444,7 @@ int rtw_mlcst2unicst(_adapter *padapter, struct sk_buff *skb) #endif /* CONFIG_TX_MCAST2UNI */ -int _rtw_xmit_entry(_pkt *pkt, _nic_hdl pnetdev) +netdev_tx_t _rtw_xmit_entry(struct sk_buff *pkt, struct net_device *pnetdev) { _adapter *padapter = (_adapter *)rtw_netdev_priv(pnetdev); struct xmit_priv *pxmitpriv = &padapter->xmitpriv; @@ -544,11 +544,11 @@ exit: return 0; } -int rtw_xmit_entry(_pkt *pkt, _nic_hdl pnetdev) +netdev_tx_t rtw_xmit_entry(struct sk_buff *pkt, struct net_device *pnetdev) { _adapter *padapter = (_adapter *)rtw_netdev_priv(pnetdev); struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); - int ret = 0; + netdev_tx_t ret = NETDEV_TX_OK; if (pkt) { if (check_fwstate(pmlmepriv, WIFI_MONITOR_STATE) == _TRUE) { From c0084bb902996028362a8c35149c8254901b6ab3 Mon Sep 17 00:00:00 2001 From: GeorgeBannister Date: Thu, 26 Jan 2023 14:39:27 +0000 Subject: [PATCH 3/3] fix prototype --- include/xmit_osdep.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/xmit_osdep.h b/include/xmit_osdep.h index 70070a8..f51b8de 100644 --- a/include/xmit_osdep.h +++ b/include/xmit_osdep.h @@ -67,8 +67,8 @@ struct sta_xmit_priv; struct xmit_frame; struct xmit_buf; -extern int _rtw_xmit_entry(_pkt *pkt, _nic_hdl pnetdev); -extern int rtw_xmit_entry(_pkt *pkt, _nic_hdl pnetdev); +extern netdev_tx_t _rtw_xmit_entry(struct sk_buff *pkt, struct net_device *pnetdev); +extern netdev_tx_t rtw_xmit_entry(struct sk_buff *pkt, struct net_device *pnetdev); #endif /* PLATFORM_LINUX */