Search Linux Wireless

Re: [PATCH 05/13] o11s: added mesh.h, mesh function and data structures definitions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> +/* 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


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux