From f42ef2ce84f48cfb682525049f99368ebfa30751 Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Thu, 12 Mar 2015 14:14:19 -0500 Subject: [PATCH] rtl8188eu: Remove CONFIG_TCP_CSUM_OFFLOAD_TX This change also allows the removal of rtw_set_tx_chksum_offload() as it is now empty. Signed-off-by: Larry Finger --- core/rtw_xmit.c | 3 --- hal/rtl8188eu_xmit.c | 17 +---------------- include/osdep_service.h | 7 ------- include/rtw_xmit.h | 3 --- include/xmit_osdep.h | 18 ++++++++---------- os_dep/mlme_linux.c | 29 +---------------------------- os_dep/os_intfs.c | 11 ----------- os_dep/xmit_linux.c | 33 --------------------------------- 8 files changed, 10 insertions(+), 111 deletions(-) diff --git a/core/rtw_xmit.c b/core/rtw_xmit.c index fe881a5..6716ab1 100755 --- a/core/rtw_xmit.c +++ b/core/rtw_xmit.c @@ -822,12 +822,9 @@ static s32 update_attrib(struct adapter *padapter, _pkt *pkt, struct pkt_attrib pattrib->bswenc = false; RT_TRACE(_module_rtl871x_xmit_c_,_drv_info_,("update_attrib: bswenc=false\n")); } - rtw_set_tx_chksum_offload(pkt, pattrib); - update_attrib_phy_info(pattrib, psta); exit: - return res; } diff --git a/hal/rtl8188eu_xmit.c b/hal/rtl8188eu_xmit.c index 6ee3d95..45f83c4 100755 --- a/hal/rtl8188eu_xmit.c +++ b/hal/rtl8188eu_xmit.c @@ -364,20 +364,7 @@ if (padapter->registrypriv.mp_mode == 0) ptxdesc->txdw5 |= cpu_to_le32(MRateToHwRate(pmlmeext->tx_rate)); } - -#ifdef CONFIG_TCP_CSUM_OFFLOAD_TX - /* offset 24 */ - if ( pattrib->hw_tcp_csum == 1 ) { - u8 ip_hdr_offset = 32 + pattrib->hdrlen + pattrib->iv_len + 8; - ptxdesc->txdw7 = (1 << 31) | (ip_hdr_offset << 16); - DBG_8192C("ptxdesc->txdw7 = %08x\n", ptxdesc->txdw7); - } -#endif - } - else if((pxmitframe->frame_tag&0x0f)== MGNT_FRAMETAG) - { - /* DBG_8192C("pxmitframe->frame_tag == MGNT_FRAMETAG\n"); */ - + } else if((pxmitframe->frame_tag&0x0f)== MGNT_FRAMETAG) { /* offset 4 */ ptxdesc->txdw1 |= cpu_to_le32(pattrib->mac_id&0x3f); @@ -386,8 +373,6 @@ if (padapter->registrypriv.mp_mode == 0) ptxdesc->txdw1 |= cpu_to_le32((pattrib->raid<< RATE_ID_SHT) & 0x000f0000); - /* fill_txdesc_sectype(pattrib, ptxdesc); */ - /* offset 8 */ /* CCX-TXRPT ack for xmit mgmt frames. */ if (pxmitframe->ack_report) { diff --git a/include/osdep_service.h b/include/osdep_service.h index fb4aef9..089637a 100755 --- a/include/osdep_service.h +++ b/include/osdep_service.h @@ -67,15 +67,8 @@ #include #include #include - #include #include - -#ifdef CONFIG_TCP_CSUM_OFFLOAD_TX - #include - #include -#endif - #include #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,21)) #include diff --git a/include/rtw_xmit.h b/include/rtw_xmit.h index 5c7b99f..1f57f23 100755 --- a/include/rtw_xmit.h +++ b/include/rtw_xmit.h @@ -171,9 +171,6 @@ struct pkt_attrib u8 intel_proxim; u8 retry_ctrl; struct sta_info * psta; -#ifdef CONFIG_TCP_CSUM_OFFLOAD_TX - u8 hw_tcp_csum; -#endif }; #define WLANHDR_OFFSET 64 diff --git a/include/xmit_osdep.h b/include/xmit_osdep.h index fbdff03..9253c70 100755 --- a/include/xmit_osdep.h +++ b/include/xmit_osdep.h @@ -41,22 +41,20 @@ 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); +int _rtw_xmit_entry(_pkt *pkt, _nic_hdl pnetdev); +int rtw_xmit_entry(_pkt *pkt, _nic_hdl pnetdev); void rtw_os_xmit_schedule(struct adapter *padapter); int rtw_os_xmit_resource_alloc(struct adapter *padapter, struct xmit_buf *pxmitbuf,u32 alloc_sz); void rtw_os_xmit_resource_free(struct adapter *padapter, struct xmit_buf *pxmitbuf,u32 free_sz); -extern void rtw_set_tx_chksum_offload(_pkt *pkt, struct pkt_attrib *pattrib); +uint rtw_remainder_len(struct pkt_file *pfile); +void _rtw_open_pktfile(_pkt *pkt, struct pkt_file *pfile); +uint _rtw_pktfile_read (struct pkt_file *pfile, u8 *rmem, uint rlen); +sint rtw_endofpktfile (struct pkt_file *pfile); -extern uint rtw_remainder_len(struct pkt_file *pfile); -extern void _rtw_open_pktfile(_pkt *pkt, struct pkt_file *pfile); -extern uint _rtw_pktfile_read (struct pkt_file *pfile, u8 *rmem, uint rlen); -extern sint rtw_endofpktfile (struct pkt_file *pfile); - -extern void rtw_os_pkt_complete(struct adapter *padapter, _pkt *pkt); -extern void rtw_os_xmit_complete(struct adapter *padapter, struct xmit_frame *pxframe); +void rtw_os_pkt_complete(struct adapter *padapter, _pkt *pkt); +void rtw_os_xmit_complete(struct adapter *padapter, struct xmit_frame *pxframe); #endif //__XMIT_OSDEP_H_ diff --git a/os_dep/mlme_linux.c b/os_dep/mlme_linux.c index b989726..95a2b44 100755 --- a/os_dep/mlme_linux.c +++ b/os_dep/mlme_linux.c @@ -415,33 +415,12 @@ int hostapd_mode_init(struct adapter *padapter) pnetdev->stop = mgnt_netdev_close; pnetdev->hard_start_xmit = mgnt_xmit_entry; - - /* pnetdev->set_mac_address = r871x_net_set_mac_address; */ - - /* pnetdev->get_stats = r871x_net_get_stats; */ - - /* pnetdev->do_ioctl = r871x_mp_ioctl; */ - #endif pnetdev->watchdog_timeo = HZ; /* 1 second timeout */ - /* pnetdev->wireless_handlers = NULL; */ - -#ifdef CONFIG_TCP_CSUM_OFFLOAD_TX - pnetdev->features |= NETIF_F_IP_CSUM; -#endif - - - if(dev_alloc_name(pnetdev,"mgnt.wlan%d") < 0) - { DBG_871X("hostapd_mode_init(): dev_alloc_name, fail! \n"); - } - - - /* SET_NETDEV_DEV(pnetdev, pintfpriv->udev); */ - mac[0]=0x00; mac[1]=0xe0; @@ -457,18 +436,12 @@ int hostapd_mode_init(struct adapter *padapter) /* Tell the network stack we exist */ - if (register_netdev(pnetdev) != 0) - { + if (register_netdev(pnetdev) != 0) { DBG_871X("hostapd_mode_init(): register_netdev fail!\n"); - if(pnetdev) - { rtw_free_netdev(pnetdev); - } } - return 0; - } void hostapd_mode_unload(struct adapter *padapter) diff --git a/os_dep/os_intfs.c b/os_dep/os_intfs.c index 5c4266e..688cb97 100755 --- a/os_dep/os_intfs.c +++ b/os_dep/os_intfs.c @@ -594,26 +594,15 @@ struct net_device *rtw_init_netdev(struct adapter *old_padapter) pnetdev->do_ioctl = rtw_ioctl; #endif - -#ifdef CONFIG_TCP_CSUM_OFFLOAD_TX - pnetdev->features |= NETIF_F_IP_CSUM; -#endif - /* pnetdev->tx_timeout = NULL; */ pnetdev->watchdog_timeo = HZ*3; /* 3 second timeout */ #ifdef CONFIG_WIRELESS_EXT pnetdev->wireless_handlers = (struct iw_handler_def *)&rtw_handlers_def; #endif -#ifdef WIRELESS_SPY - /* priv->wireless_data.spy_data = &priv->spy_data; */ - /* pnetdev->wireless_data = &priv->wireless_data; */ -#endif - /* step 2. */ loadparam(padapter, pnetdev); return pnetdev; - } u32 rtw_start_drv_threads(struct adapter *padapter) diff --git a/os_dep/xmit_linux.c b/os_dep/xmit_linux.c index ddfe656..f53f2f4 100755 --- a/os_dep/xmit_linux.c +++ b/os_dep/xmit_linux.c @@ -72,39 +72,6 @@ sint rtw_endofpktfile(struct pkt_file *pfile) return false; } -void rtw_set_tx_chksum_offload(_pkt *pkt, struct pkt_attrib *pattrib) -{ - -#ifdef CONFIG_TCP_CSUM_OFFLOAD_TX - struct sk_buff *skb = (struct sk_buff *)pkt; - pattrib->hw_tcp_csum = 0; - - if (skb->ip_summed == CHECKSUM_PARTIAL) { - if (skb_shinfo(skb)->nr_frags == 0) - { - const struct iphdr *ip = ip_hdr(skb); - if (ip->protocol == IPPROTO_TCP) { - /* TCP checksum offload by HW */ - DBG_871X("CHECKSUM_PARTIAL TCP\n"); - pattrib->hw_tcp_csum = 1; - /* skb_checksum_help(skb); */ - } else if (ip->protocol == IPPROTO_UDP) { - /* DBG_871X("CHECKSUM_PARTIAL UDP\n"); */ - skb_checksum_help(skb); - } else { - DBG_871X("%s-%d TCP CSUM offload Error!!\n", __FUNCTION__, __LINE__); - WARN_ON(1); /* we need a WARN() */ - } - } - else { /* IP fragmentation case */ - DBG_871X("%s-%d nr_frags != 0, using skb_checksum_help(skb);!!\n", __FUNCTION__, __LINE__); - skb_checksum_help(skb); - } - } -#endif - -} - int rtw_os_xmit_resource_alloc(struct adapter *padapter, struct xmit_buf *pxmitbuf,u32 alloc_sz) { int i;