mac80211: set the AID field correctly for mesh peer frames
authorRui Paulo <rpaulo@gmail.com>
Mon, 9 Nov 2009 23:46:52 +0000 (23:46 +0000)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 13 Nov 2009 22:43:55 +0000 (17:43 -0500)
This sets the AID field correctly for mesh peer confirm frames.

Signed-off-by: Rui Paulo <rpaulo@gmail.com>
Signed-off-by: Javier Cardona <javier@cozybit.com>
Reviewed-by: Andrey Yurovsky <andrey@cozybit.com>
Tested-by: Brian Cavagnolo <brian@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/mesh_plink.c

index cf12f61..ec68d20 100644 (file)
@@ -181,7 +181,8 @@ static int mesh_plink_frame_tx(struct ieee80211_sub_if_data *sdata,
                if (action == PLINK_CONFIRM) {
                        pos = skb_put(skb, 4);
                        /* two-byte status code followed by two-byte AID */
-                       memset(pos, 0, 4);
+                       memset(pos, 0, 2);
+                       memcpy(pos + 2, &plid, 2);
                }
                mesh_mgmt_ies_add(skb, sdata);
        }