Skip to content

Commit

Permalink
mac80211: correct aid location in peering frames
Browse files Browse the repository at this point in the history
According to 802.11-2012 8.5.16.3.2 AID comes directly after the
capability bytes in mesh peering confirm frames.  The existing
code, however, was adding a 2 byte offset to this location,
resulting in garbage data going out over the air.  Remove the
offset to fix it.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  • Loading branch information
Bob Copeland authored and Johannes Berg committed Jul 17, 2015
1 parent 042ab5f commit 2ea752c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/mac80211/mesh_plink.c
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ static int mesh_plink_frame_tx(struct ieee80211_sub_if_data *sdata,
if (action == WLAN_SP_MESH_PEERING_CONFIRM) {
/* AID */
pos = skb_put(skb, 2);
put_unaligned_le16(plid, pos + 2);
put_unaligned_le16(plid, pos);
}
if (ieee80211_add_srates_ie(sdata, skb, true, band) ||
ieee80211_add_ext_srates_ie(sdata, skb, true, band) ||
Expand Down

0 comments on commit 2ea752c

Please sign in to comment.