]> Pileus Git - ~andy/linux/commit
mac80211: clean up mesh local link ID generation
authorThomas Pedersen <thomas@cozybit.com>
Tue, 5 Nov 2013 19:17:05 +0000 (11:17 -0800)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 25 Nov 2013 19:50:29 +0000 (20:50 +0100)
commit204d130426206071b08c0aa74002fbdb67960eed
treec1f4a7788bba2b3afe9c5df2254995231daefc9c
parentc99a89edb1066e4c1f79b3ca4e91a676d1b25ce1
mac80211: clean up mesh local link ID generation

802.11-2012 13.3.1 implicitly limits the mesh local link
ID range to that of AID, since for mesh PS the local link
ID must be indicated in the TIM IE, which only holds
IEEE80211_MAX_AID bits.

Also the code was allowing a local link ID of 0, but this
is not correct since that TIM bit is used for indicating
buffered mcast frames.

Generate a random, unique, link ID from 1 - 2007, and drop
a modulo conversion for the local link ID, but keep it for
the peer link ID in case he chose something > MAX_AID.

Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/mesh_plink.c
net/mac80211/mesh_ps.c
net/mac80211/sta_info.c