ath9k_htc_firmware: check only the mesh control present subfield 69/head
authorChun-Yeow Yeoh <yeohchunyeow@gmail.com>
Fri, 14 Nov 2014 04:50:09 +0000 (12:50 +0800)
committerChun-Yeow Yeoh <yeohchunyeow@gmail.com>
Fri, 14 Nov 2014 04:50:40 +0000 (12:50 +0800)
This is related to the previous patch "fix the offset of
CCMP header for mesh data frame". Check only the Mesh
Control Present subfield on QoS Control field to determine
whether it is a mesh data frame.

Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com>
target_firmware/wlan/ieee80211_output.c

index 3d687043405ece246a80fd14bfe8bccaef2a26ff..1230e2c703ba29795e53f06e6fe799ecbd630e4f 100755 (executable)
@@ -74,7 +74,7 @@ ieee80211_tgt_crypto_encap(struct ieee80211_frame *wh,
 
        /* 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)
+       if (wh_mesh->i_qos[1] & 0x01)
                offset = 32;
 
        iv = (a_uint8_t *) wh;