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

staging: rtl8723au: Remove unused rtl8723a_update_txdesc() and child functions

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
e2e0c12e b81f3f26

-249
-248
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c
··· 1975 1975 ptxdesc->txdw7 |= cpu_to_le32(checksum & 0x0000ffff); 1976 1976 } 1977 1977 1978 - static void fill_txdesc_sectype(struct pkt_attrib *pattrib, 1979 - struct txdesc_8723a *ptxdesc) 1980 - { 1981 - if ((pattrib->encrypt > 0) && !pattrib->bswenc) { 1982 - switch (pattrib->encrypt) { 1983 - /* SEC_TYPE */ 1984 - case WLAN_CIPHER_SUITE_WEP40: 1985 - case WLAN_CIPHER_SUITE_WEP104: 1986 - case WLAN_CIPHER_SUITE_TKIP: 1987 - ptxdesc->sectype = 1; 1988 - break; 1989 - 1990 - case WLAN_CIPHER_SUITE_CCMP: 1991 - ptxdesc->sectype = 3; 1992 - break; 1993 - 1994 - case 0: 1995 - default: 1996 - break; 1997 - } 1998 - } 1999 - } 2000 - 2001 - static void fill_txdesc_vcs(struct pkt_attrib *pattrib, 2002 - struct txdesc_8723a *ptxdesc) 2003 - { 2004 - /* DBG_8723A("cvs_mode =%d\n", pattrib->vcs_mode); */ 2005 - 2006 - switch (pattrib->vcs_mode) { 2007 - case RTS_CTS: 2008 - ptxdesc->rtsen = 1; 2009 - break; 2010 - 2011 - case CTS_TO_SELF: 2012 - ptxdesc->cts2self = 1; 2013 - break; 2014 - 2015 - case NONE_VCS: 2016 - default: 2017 - break; 2018 - } 2019 - 2020 - if (pattrib->vcs_mode) { 2021 - ptxdesc->hw_rts_en = 1; /* ENABLE HW RTS */ 2022 - 2023 - /* Set RTS BW */ 2024 - if (pattrib->ht_en) { 2025 - if (pattrib->bwmode & HT_CHANNEL_WIDTH_40) 2026 - ptxdesc->rts_bw = 1; 2027 - 2028 - switch (pattrib->ch_offset) { 2029 - case HAL_PRIME_CHNL_OFFSET_DONT_CARE: 2030 - ptxdesc->rts_sc = 0; 2031 - break; 2032 - 2033 - case HAL_PRIME_CHNL_OFFSET_LOWER: 2034 - ptxdesc->rts_sc = 1; 2035 - break; 2036 - 2037 - case HAL_PRIME_CHNL_OFFSET_UPPER: 2038 - ptxdesc->rts_sc = 2; 2039 - break; 2040 - 2041 - default: 2042 - ptxdesc->rts_sc = 3; /* Duplicate */ 2043 - break; 2044 - } 2045 - } 2046 - } 2047 - } 2048 - 2049 - static void fill_txdesc_phy(struct pkt_attrib *pattrib, 2050 - struct txdesc_8723a *ptxdesc) 2051 - { 2052 - if (pattrib->ht_en) { 2053 - if (pattrib->bwmode & HT_CHANNEL_WIDTH_40) 2054 - ptxdesc->data_bw = 1; 2055 - 2056 - switch (pattrib->ch_offset) { 2057 - case HAL_PRIME_CHNL_OFFSET_DONT_CARE: 2058 - ptxdesc->data_sc = 0; 2059 - break; 2060 - 2061 - case HAL_PRIME_CHNL_OFFSET_LOWER: 2062 - ptxdesc->data_sc = 1; 2063 - break; 2064 - 2065 - case HAL_PRIME_CHNL_OFFSET_UPPER: 2066 - ptxdesc->data_sc = 2; 2067 - break; 2068 - 2069 - default: 2070 - ptxdesc->data_sc = 3; /* Duplicate */ 2071 - break; 2072 - } 2073 - } 2074 - } 2075 - 2076 - static void rtl8723a_fill_default_txdesc(struct xmit_frame *pxmitframe, 2077 - u8 *pbuf) 2078 - { 2079 - struct rtw_adapter *padapter; 2080 - struct hal_data_8723a *pHalData; 2081 - struct dm_priv *pdmpriv; 2082 - struct mlme_ext_priv *pmlmeext; 2083 - struct mlme_ext_info *pmlmeinfo; 2084 - struct pkt_attrib *pattrib; 2085 - struct txdesc_8723a *ptxdesc; 2086 - s32 bmcst; 2087 - 2088 - padapter = pxmitframe->padapter; 2089 - pHalData = GET_HAL_DATA(padapter); 2090 - pdmpriv = &pHalData->dmpriv; 2091 - pmlmeext = &padapter->mlmeextpriv; 2092 - pmlmeinfo = &pmlmeext->mlmext_info; 2093 - 2094 - pattrib = &pxmitframe->attrib; 2095 - bmcst = is_multicast_ether_addr(pattrib->ra); 2096 - 2097 - ptxdesc = (struct txdesc_8723a *)pbuf; 2098 - 2099 - if (pxmitframe->frame_tag == DATA_FRAMETAG) { 2100 - ptxdesc->macid = pattrib->mac_id; /* CAM_ID(MAC_ID) */ 2101 - 2102 - if (pattrib->ampdu_en == true) 2103 - ptxdesc->agg_en = 1; /* AGG EN */ 2104 - else 2105 - ptxdesc->bk = 1; /* AGG BK */ 2106 - 2107 - ptxdesc->qsel = pattrib->qsel; 2108 - ptxdesc->rate_id = pattrib->raid; 2109 - 2110 - fill_txdesc_sectype(pattrib, ptxdesc); 2111 - 2112 - ptxdesc->seq = pattrib->seqnum; 2113 - 2114 - if ((pattrib->ether_type != 0x888e) && 2115 - (pattrib->ether_type != 0x0806) && 2116 - (pattrib->dhcp_pkt != 1)) { 2117 - /* Non EAP & ARP & DHCP type data packet */ 2118 - 2119 - fill_txdesc_vcs(pattrib, ptxdesc); 2120 - fill_txdesc_phy(pattrib, ptxdesc); 2121 - 2122 - ptxdesc->rtsrate = 8; /* RTS Rate = 24M */ 2123 - ptxdesc->data_ratefb_lmt = 0x1F; 2124 - ptxdesc->rts_ratefb_lmt = 0xF; 2125 - 2126 - /* use REG_INIDATA_RATE_SEL value */ 2127 - ptxdesc->datarate = 2128 - pdmpriv->INIDATA_RATE[pattrib->mac_id]; 2129 - 2130 - } else { 2131 - /* EAP data packet and ARP packet. */ 2132 - /* Use the 1M data rate to send the EAP/ARP packet. */ 2133 - /* This will maybe make the handshake smooth. */ 2134 - 2135 - ptxdesc->bk = 1; /* AGG BK */ 2136 - ptxdesc->userate = 1; /* driver uses rate */ 2137 - if (pmlmeinfo->preamble_mode == PREAMBLE_SHORT) 2138 - ptxdesc->data_short = 1; 2139 - ptxdesc->datarate = MRateToHwRate23a(pmlmeext->tx_rate); 2140 - } 2141 - } else if (pxmitframe->frame_tag == MGNT_FRAMETAG) { 2142 - /* RT_TRACE(_module_hal_xmit_c_, _drv_notice_, 2143 - ("%s: MGNT_FRAMETAG\n", __func__)); */ 2144 - 2145 - ptxdesc->macid = pattrib->mac_id; /* CAM_ID(MAC_ID) */ 2146 - ptxdesc->qsel = pattrib->qsel; 2147 - ptxdesc->rate_id = pattrib->raid; /* Rate ID */ 2148 - ptxdesc->seq = pattrib->seqnum; 2149 - ptxdesc->userate = 1; /* driver uses rate, 1M */ 2150 - ptxdesc->rty_lmt_en = 1; /* retry limit enable */ 2151 - ptxdesc->data_rt_lmt = 6; /* retry limit = 6 */ 2152 - 2153 - /* CCX-TXRPT ack for xmit mgmt frames. */ 2154 - if (pxmitframe->ack_report) 2155 - ptxdesc->ccx = 1; 2156 - 2157 - ptxdesc->datarate = MRateToHwRate23a(pmlmeext->tx_rate); 2158 - } else if (pxmitframe->frame_tag == TXAGG_FRAMETAG) { 2159 - RT_TRACE(_module_hal_xmit_c_, _drv_warning_, 2160 - ("%s: TXAGG_FRAMETAG\n", __func__)); 2161 - } else { 2162 - RT_TRACE(_module_hal_xmit_c_, _drv_warning_, 2163 - ("%s: frame_tag = 0x%x\n", __func__, 2164 - pxmitframe->frame_tag)); 2165 - 2166 - ptxdesc->macid = 4; /* CAM_ID(MAC_ID) */ 2167 - ptxdesc->rate_id = 6; /* Rate ID */ 2168 - ptxdesc->seq = pattrib->seqnum; 2169 - ptxdesc->userate = 1; /* driver uses rate */ 2170 - ptxdesc->datarate = MRateToHwRate23a(pmlmeext->tx_rate); 2171 - } 2172 - 2173 - ptxdesc->pktlen = pattrib->last_txcmdsz; 2174 - ptxdesc->offset = TXDESC_SIZE + OFFSET_SZ; 2175 - if (bmcst) 2176 - ptxdesc->bmc = 1; 2177 - ptxdesc->ls = 1; 2178 - ptxdesc->fs = 1; 2179 - ptxdesc->own = 1; 2180 - 2181 - /* 2009.11.05. tynli_test. Suggested by SD4 Filen for FW LPS. */ 2182 - /* (1) The sequence number of each non-Qos frame / broadcast / 2183 - * multicast / mgnt frame should be controled by Hw because Fw 2184 - * will also send null data which we cannot control when Fw LPS enable. 2185 - * --> default enable non-Qos data sequense number. 2186 - 2010.06.23. by tynli. */ 2187 - /* (2) Enable HW SEQ control for beacon packet, 2188 - * because we use Hw beacon. */ 2189 - /* (3) Use HW Qos SEQ to control the seq num of Ext port 2190 - * non-Qos packets. */ 2191 - /* 2010.06.23. Added by tynli. */ 2192 - if (!pattrib->qos_en) { 2193 - /* Hw set sequence number */ 2194 - ptxdesc->hwseq_en = 1; /* HWSEQ_EN */ 2195 - ptxdesc->hwseq_sel = 0; /* HWSEQ_SEL */ 2196 - } 2197 - } 2198 - 2199 - /* 2200 - * Description: 2201 - * 2202 - * Parameters: 2203 - * pxmitframe xmitframe 2204 - * pbuf where to fill tx desc 2205 - */ 2206 - void rtl8723a_update_txdesc(struct xmit_frame *pxmitframe, u8 *pbuf) 2207 - { 2208 - struct tx_desc *pdesc; 2209 - 2210 - pdesc = (struct tx_desc *)pbuf; 2211 - memset(pdesc, 0, sizeof(struct tx_desc)); 2212 - 2213 - rtl8723a_fill_default_txdesc(pxmitframe, pbuf); 2214 - 2215 - pdesc->txdw0 = cpu_to_le32(pdesc->txdw0); 2216 - pdesc->txdw1 = cpu_to_le32(pdesc->txdw1); 2217 - pdesc->txdw2 = cpu_to_le32(pdesc->txdw2); 2218 - pdesc->txdw3 = cpu_to_le32(pdesc->txdw3); 2219 - pdesc->txdw4 = cpu_to_le32(pdesc->txdw4); 2220 - pdesc->txdw5 = cpu_to_le32(pdesc->txdw5); 2221 - pdesc->txdw6 = cpu_to_le32(pdesc->txdw6); 2222 - pdesc->txdw7 = cpu_to_le32(pdesc->txdw7); 2223 - rtl8723a_cal_txdesc_chksum(pdesc); 2224 - } 2225 - 2226 1978 /* 2227 1979 * Description: In normal chip, we should send some packet to Hw which 2228 1980 * will be used by Fw in FW LPS mode. The function is to fill the Tx
-1
drivers/staging/rtl8723au/include/rtl8723a_xmit.h
··· 212 212 #define txrpt_ccx_qtime_8723a(txrpt_ccx) ((txrpt_ccx)->ccx_qtime0+((txrpt_ccx)->ccx_qtime1<<8)) 213 213 214 214 void handle_txrpt_ccx_8723a(struct rtw_adapter *adapter, void *buf); 215 - void rtl8723a_update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem); 216 215 void rtl8723a_fill_fake_txdesc(struct rtw_adapter *padapter, u8 *pDesc, u32 BufferLen, u8 IsPsPoll, u8 IsBTQosNull); 217 216 218 217 int rtl8723au_hal_xmitframe_enqueue(struct rtw_adapter *padapter, struct xmit_frame *pxmitframe);