[PATCH RFC/RFT] ath10k: use xmit encapsulation offloading

Zhijun You hujy652 at gmail.com
Fri May 13 22:24:41 PDT 2022


Hello Sergey,

Glad to see there's someone else working on encap offload.
Can confirm it works on my NETGEAR R7800 (QCA9984) with
ath10k +  firmware 10.4-3.9.0.2-00159
Feel free to add my tested by tag.

Tested-by: Zhijun You <hujy652 at gmail.com>

I have a few questions though.

In patch 081

> +-      ieee80211_tx_status(htt->ar->hw, msdu);
> ++      memset(&status, 0, sizeof(status));
>

Instead of using memset maybe we could just init status like this?
struct ieee80211_tx_status status = {};

In the original patch [1]  proposed by QCA guys there are extra checks
in ath10k_htt_tx_32

> -       if ((ieee80211_is_action(hdr->frame_control) ||
> -            ieee80211_is_deauth(hdr->frame_control) ||
> -            ieee80211_is_disassoc(hdr->frame_control)) &&
> -            ieee80211_has_protected(hdr->frame_control)) {
> -               skb_put(msdu, IEEE80211_CCMP_MIC_LEN);
> -       } else if (!(skb_cb->flags & ATH10K_SKB_F_NO_HWCRYPT) &&
> -                  txmode == ATH10K_HW_TXRX_RAW &&
> -                  ieee80211_has_protected(hdr->frame_control)) {
> -               skb_put(msdu, IEEE80211_CCMP_MIC_LEN);
> +       if (!(info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP)) {
> +               if ((ieee80211_is_action(hdr->frame_control) ||
> +                    ieee80211_is_deauth(hdr->frame_control) ||
> +                    ieee80211_is_disassoc(hdr->frame_control)) &&
> +                    ieee80211_has_protected(hdr->frame_control)) {
> +                       skb_put(msdu, IEEE80211_CCMP_MIC_LEN);
> +               } else if (!(skb_cb->flags & ATH10K_SKB_F_NO_HWCRYPT) &&
> +                          txmode == ATH10K_HW_TXRX_RAW &&
> +                          ieee80211_has_protected(hdr->frame_control)) {
> +                       skb_put(msdu, IEEE80211_CCMP_MIC_LEN);
> +               }
>

and  in ath10k_offchan_tx_work

> +               info = IEEE80211_SKB_CB(skb);
> +               if (info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP) {
> +                       peer_addr = skb->data;
> +               } else {
> +                       hdr = (struct ieee80211_hdr *)skb->data;
> +                       peer_addr = ieee80211_get_DA(hdr);
>

Maybe we should add them back since both are checking for ethernet frames?

1. https://patchwork.kernel.org/project/linux-wireless/patch/20191216092207.31032-1-john@phrozen.org/

Best,
Zhijun



More information about the openwrt-devel mailing list