On Thu, 2017-06-08 at 12:50 +0800, Xuebing Wang wrote: > Hi community, > > Does IEEE80211_IBSS_MAX_STA_ENTRIES (in net/mac80211/ibss.c) work? Yes, as far as it's supposed to :) > I hard-code it to be 2 (from original 128), and update kernel for > one node, and start IBSS network with 5 nodes. In the node with hard- > coded IBSS_MAX_STA_ENTRIES = 2, I still can see and ping all other 4 > nodes. I am using kernel v3.18.29, does IBSS_MAX_STA_ENTRIES work > with latest kernel source code? > > My purpose is to limit the max number of peers (for all nodes in > IBSS network) to be 12 or 20. This isn't really the point of this setting, and that's why it's also not configurable. This setting is really just intended to catch the case of a rogue network/transmitter or similar overflowing the amount of memory we keep. This setting has no impact on who we can *communicate* with - although we can only communicate with peers that we don't have a station entry for on very few low rates, so you won't get good performance beyond that point. If you wanted to actually limit the IBSS network to a certain number of peers, you'd have to * make that setting configurable (with a sane upper bound) * write some additional code to restrict IBSS communication to when a station entry exists You could also do some higher layer filtering (iptables) I guess. johannes