From: Adrian Chadd Date: Fri, 4 Apr 2014 10:38:45 +0000 (-0700) Subject: Merge pull request #51 from chunyeow/master X-Git-Tag: 1.4.0~9 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=dd9b0fc8602b54c56dc9e76a3d9def97ff83d3a4;hp=d719756b76ed82c431e468e0fe61a34b965216da;p=open-ath9k-htc-firmware.git Merge pull request #51 from chunyeow/master ath9k_htc_firmware: fix the offset of CCMP header for mesh data frame --- 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;