X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=target_firmware%2Fwlan%2Fieee80211_output.c;h=1230e2c703ba29795e53f06e6fe799ecbd630e4f;hb=5795da258fd20dac0f5a49a58fd4ea62c61cb237;hp=562edba1a59bed82ec4f6cd1359feb61750193f3;hpb=2a38076807b9fac0fe6cedcdcc213c10a8658910;p=open-ath9k-htc-firmware.git diff --git a/target_firmware/wlan/ieee80211_output.c b/target_firmware/wlan/ieee80211_output.c index 562edba..1230e2c 100755 --- a/target_firmware/wlan/ieee80211_output.c +++ b/target_firmware/wlan/ieee80211_output.c @@ -48,10 +48,8 @@ #include #include -#include #include "ieee80211_var.h" -#include "_ieee80211.h" #include "ieee80211.h" #include @@ -69,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;