[PATCH] ath9k_htc_firmware: fix the offset of CCMP header for mesh data frame

Adrian Chadd adrian at freebsd.org
Fri Apr 4 03:39:15 PDT 2014


Hi!

I've just merged this.

Thanks!


-a


On 4 April 2014 02:20, Chun-Yeow Yeoh <yeohchunyeow at gmail.com> wrote:
> Mesh data frame uses at least 3 addresses scheme. So set the offset
> correctly while fetching the CCMP header. Previously, we are not
> able to do HW encryption for unicast data frame. Applying this
> patch will allow HW encryption and avoid loading ath9k_htc.ko using
> "nohwcrypt=1".
>
> Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow at gmail.com>
> ---
>  target_firmware/wlan/ieee80211_output.c |    6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/target_firmware/wlan/ieee80211_output.c b/target_firmware/wlan/ieee80211_output.c
> index ce034ed..3d68704 100755
> --- a/target_firmware/wlan/ieee80211_output.c
> +++ b/target_firmware/wlan/ieee80211_output.c
> @@ -67,10 +67,16 @@ ieee80211_tgt_crypto_encap(struct ieee80211_frame *wh,
>         a_uint16_t tmp;
>         a_uint16_t offset = IEEE80211_WLAN_HDR_LEN;
>         a_uint8_t b1, b2;
> +       struct ieee80211_qosframe_addr4 *wh_mesh;
>
>         if (IEEE80211_QOS_HAS_SEQ(wh))
>                 offset += 4;  // pad for 4 byte alignment
>
> +       /* set the offset to 32 if the mesh control field is present */
> +       wh_mesh = (struct ieee80211_qosframe_addr4 *)wh;
> +       if (wh_mesh->i_qos[1] == 0x01)
> +               offset = 32;
> +
>         iv = (a_uint8_t *) wh;
>         iv = iv + offset;
>
> --
> 1.7.9.5
>
>
> _______________________________________________
> ath9k_htc_fw mailing list
> ath9k_htc_fw at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/ath9k_htc_fw



More information about the ath9k_htc_fw mailing list