The _rtw_init_xmit_priv function calls rtw_alloc_hwxmits to allocate
memory for pxmitpriv->hwxmits (this is an array of struct hw_xmit). This
allocation uses kzalloc, the allocated memory is initialised with 0.
After the allocation, _rtw_init_xmit_priv calls rtw_init_hwxmits to set an
element of each hw_xmit to 0. This is not necessary, we can remove the
rtw_init_hwxmits call and the now unused function rtw_init_hwxmits.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20221230180646.91008-20-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
        if (rtw_alloc_hwxmits(padapter))
                goto free_xmit_extbuf;
 
-       rtw_init_hwxmits(pxmitpriv->hwxmits, pxmitpriv->hwxmit_entry);
-
        for (i = 0; i < 4; i++)
                pxmitpriv->wmm_para_seq[i] = i;
 
        kfree(hwxmits);
 }
 
-void rtw_init_hwxmits(struct hw_xmit *phwxmit, int entry)
-{
-       int i;
-
-       for (i = 0; i < entry; i++, phwxmit++)
-               phwxmit->accnt = 0;
-}
-
 static int rtw_br_client_tx(struct adapter *padapter, struct sk_buff **pskb)
 {
        struct sk_buff *skb = *pskb;
 
 s32 rtw_txframes_pending(struct adapter *padapter);
 s32 rtw_txframes_sta_ac_pending(struct adapter *padapter,
                                struct pkt_attrib *pattrib);
-void rtw_init_hwxmits(struct hw_xmit *phwxmit, int entry);
 int _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, struct adapter *padapter);
 void _rtw_free_xmit_priv(struct xmit_priv *pxmitpriv);
 int rtw_alloc_hwxmits(struct adapter *padapter);