Search Linux Wireless

Re: [PATCH 1/2] mac80211: Let userspace enable and configure vendor specific path selection.

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

 



On Fri, 2010-12-10 at 15:04 -0800, Javier Cardona wrote:

> +++ b/include/net/cfg80211.h
> @@ -643,6 +643,12 @@ struct mesh_config {
>  	u16 dot11MeshHWMPpreqMinInterval;
>  	u16 dot11MeshHWMPnetDiameterTraversalTime;
>  	u8  dot11MeshHWMPRootMode;
> +	u8  vendor_path_sel_enabled;
> +	u8  vendor_metric_enabled;
> +	struct {
> +		u8  *data;

const -- and I really wouldn't do a substruct for this.

> +		u8  length;
> +	} vendor_ie;
>  };

Should these really be part of mesh_config, rather than mesh_setup? I
may accept a need to change beacon IEs, but I don't think it makes any
sense to change the path selection at mesh runtime since changing it
will change the mesh network the node belongs to per mesh_matches_local.

> @@ -522,6 +528,10 @@ void ieee80211_start_mesh(struct ieee80211_sub_if_data *sdata)
>  	ieee80211_mesh_root_setup(ifmsh);
>  	ieee80211_queue_work(&local->hw, &sdata->work);
>  	sdata->vif.bss_conf.beacon_int = MESH_DEFAULT_BEACON_INTERVAL;
> +	sdata->u.mesh.mesh_pp_id = ifmsh->mshcfg.vendor_path_sel_enabled ?
> +		MESH_PATH_PROTOCOL_VENDOR : MESH_PATH_PROTOCOL_HWMP;
> +	sdata->u.mesh.mesh_pm_id = ifmsh->mshcfg.vendor_metric_enabled ?
> +		MESH_PATH_METRIC_VENDOR : MESH_PATH_METRIC_AIRTIME;

In fact, it looks like you only honour changes to them in start_mesh().

> +++ b/net/mac80211/mesh.h
> @@ -44,6 +44,30 @@ enum mesh_path_flags {
>  };
>  
>  /**
> + * enum - mesh path selection protocol identifier
> + *
> + * @MESH_PATH_PROTOCOL_HWMP: the default path selection protocol
> + * @MESH_PATH_PROTOCOL_VENDOR: a vendor specific protocol that will be
> + * specified in a vendor specific information element
> + */
> +enum {
> +	MESH_PATH_PROTOCOL_HWMP = 0,
> +	MESH_PATH_PROTOCOL_VENDOR = 255,
> +};

> +/**
> + * enum - mesh path selection metric identifier
> + *
> + * @MESH_PATH_METRIC_AIRTIME: the default path selection metric
> + * @MESH_PATH_METRIC_VENDOR: a vendor specific metric that will be
> + * specified in a vendor specific information element
> + */
> +enum {
> +	MESH_PATH_METRIC_AIRTIME = 0,
> +	MESH_PATH_METRIC_VENDOR = 255,
> +};

Should these get an IEEE80211 prefix and move to
include/linux/ieee80211.h?

johannes

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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