Re: [PATCH 15/50] wifi: ath12k: add dp_rx.c

Kalle Valo
2022-10-21T13:30:14Z

"Sriram R (QUIC)" <quic_srirrama@quicinc.com> writes:

>>> +static void ath12k_dp_rx_process_received_packets(struct ath12k_base
>>*ab,
>>> + struct napi_struct *napi,
>>> + struct sk_buff_head *msdu_list,
>>> + int ring_id) {
>>> + struct ieee80211_rx_status rx_status = {0};
>>
>>initializing just on entry seems wrong, see below
>
> We reset the whole struct once, and reset the necessary fields alone
> for every loop within ath12k_dp_rx_h_ppdu or similar places as
> necessary and pass the status to mac80211. The initial reset is
> necessary so as to reset all unused fields. This is an optimization to
> not memset the struct for every loop.

It would be good to document such optimisations with a comment,
otherwise people might be confused.

--