Search Linux Wireless

Re: [PATCH 02/13] o11s: (nl80211/cfg80211) support for mesh interfaces and set_mesh_cfg command

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

 



 
> +/*
> + * struct mesh_params - describes mesh parameters

Here, and various other places too, you need "/**" rather than just "/*"
for kernel-doc to be able to pick it up.

>   * @add_key: add a key with the given parameters. @mac_addr will be %NULL
>   *	when adding a group key.
> + * @set_mesh_cfg: set mesh parameters (by now, just mesh id)
>   *
>   * @get_key: get information about the key with the given parameters.
>   *	@mac_addr will be %NULL when requesting information for a group

Please keep the key operations grouped.

> @@ -82,6 +82,8 @@ static struct nla_policy nl80211_policy[NL80211_ATTR_MAX+1] __read_mostly = {
>  	[NL80211_ATTR_STA_SUPPORTED_RATES] = { .type = NLA_BINARY,
>  					       .len = NL80211_MAX_SUPP_RATES },
>  	[NL80211_ATTR_STA_VLAN] = { .type = NLA_U32 },
> +	[NL80211_ATTR_MESH_ID] = { .type = NLA_NUL_STRING,
> +				.len = IEEE80211_MAX_MESH_ID_LEN },

That should be NLA_BINARY since it's not a NULL-terminated string but
rather an arbitrary up-to-MESH_ID_LEN-long byte value, no?
 
> +	params.mesh_id = nla_data(info->attrs[NL80211_ATTR_MESH_ID]);
> +	/* Cut null character */
> +	params.mesh_id_len = nla_len(info->attrs[NL80211_ATTR_MESH_ID]) - 1 ;

Then you can save that -1 and the comment :)

FWIW, I'm not entirely happy with this interface. I tried to keep
ADD/DEL/GET/SET groups of commands to create/delete/get/set
object/object properties. This breaks that, but I guess it's just a
single value that is set. That's why I initially suggested to make it
part of the SET_INTERFACE command since it seems to me that this
identifies the mesh you'll be using.

However, maybe I don't understand the mesh ID well enough yet, can you
maybe explain in a few sentences where it is used and what for?

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