> +/* plink is short for peer link */ > +struct mesh_plink { Looking at this structure in more detail, a few more comments. If you group "retries" and "ignore_timer" the structure will be four bytes smaller (each of them uses one byte and is padded to four in the current struct layout). > + struct ieee80211_channel channel; > + u32 channel_precedence; These don't seem to be used? I was about to suggest that channel should be a pointer instead of a copy of the data, especially since the original data can be updated by the regulatory control code. > +#define plink_inc(s) atomic_inc(&s->u.sta.mshstats.estab_plinks) > +#define plink_dec(s) atomic_dec(&s->u.sta.mshstats.estab_plinks) > +#define plink_capacity(s) (s->u.sta.mshcfg.dot11MeshMaxPeerLinks - \ > + atomic_read(&s->u.sta.mshstats.estab_plinks)) > +#define available_plinks(s) (min(plink_capacity(s), MESH_MAX_PLINKS - \ > + atomic_read(&s->u.sta.plinks)) > 0) > + > +#define activate_path(mpath) (mpath->flags |= \ > + (MESH_PATH_ACTIVE | MESH_PATH_RESOLVED)) Those should probably all be static inlines. johannes
Attachment:
signature.asc
Description: This is a digitally signed message part