aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorcolin@cozybit.com <colin@cozybit.com>2008-10-21 15:03:48 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-10-31 19:00:39 -0400
commit93da9cc17c5ae8a751886fd4732db89ad5e9bdb9 (patch)
tree5c8c16eaeca4c6e4555682a4ab1b448cdbe21595 /include
parent4a68ec535ef1043319928f601d633f78e650a16f (diff)
Add nl80211 commands to get and set o11s mesh networking parameters
The two new commands are NL80211_CMD_GET_MESH_PARAMS and NL80211_CMD_SET_MESH_PARAMS. There is a new attribute enum, NL80211_ATTR_MESH_PARAMS, which enumerates the various mesh configuration parameters. Moved struct mesh_config from mac80211/ieee80211_i.h to net/cfg80211.h. nl80211_get_mesh_params and nl80211_set_mesh_params unpack the netlink messages and ask the driver to get or set the configuration. This is done via two new function stubs, get_mesh_params and set_mesh_params, in struct cfg80211_ops. Signed-off-by: Colin McCabe <colin@cozybit.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/nl80211.h86
-rw-r--r--include/net/cfg80211.h32
2 files changed, 117 insertions, 1 deletions
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h
index 41720d47d618..e4cc7869b22f 100644
--- a/include/linux/nl80211.h
+++ b/include/linux/nl80211.h
@@ -106,6 +106,12 @@
106 * to the the specified ISO/IEC 3166-1 alpha2 country code. The core will 106 * to the the specified ISO/IEC 3166-1 alpha2 country code. The core will
107 * store this as a valid request and then query userspace for it. 107 * store this as a valid request and then query userspace for it.
108 * 108 *
109 * @NL80211_CMD_GET_MESH_PARAMS: Get mesh networking properties for the
110 * interface identified by %NL80211_ATTR_IFINDEX
111 *
112 * @NL80211_CMD_SET_MESH_PARAMS: Set mesh networking properties for the
113 * interface identified by %NL80211_ATTR_IFINDEX
114 *
109 * @NL80211_CMD_MAX: highest used command number 115 * @NL80211_CMD_MAX: highest used command number
110 * @__NL80211_CMD_AFTER_LAST: internal use 116 * @__NL80211_CMD_AFTER_LAST: internal use
111 */ 117 */
@@ -148,6 +154,9 @@ enum nl80211_commands {
148 NL80211_CMD_SET_REG, 154 NL80211_CMD_SET_REG,
149 NL80211_CMD_REQ_SET_REG, 155 NL80211_CMD_REQ_SET_REG,
150 156
157 NL80211_CMD_GET_MESH_PARAMS,
158 NL80211_CMD_SET_MESH_PARAMS,
159
151 /* add new commands above here */ 160 /* add new commands above here */
152 161
153 /* used to define NL80211_CMD_MAX below */ 162 /* used to define NL80211_CMD_MAX below */
@@ -296,6 +305,8 @@ enum nl80211_attrs {
296 NL80211_ATTR_REG_ALPHA2, 305 NL80211_ATTR_REG_ALPHA2,
297 NL80211_ATTR_REG_RULES, 306 NL80211_ATTR_REG_RULES,
298 307
308 NL80211_ATTR_MESH_PARAMS,
309
299 /* add attributes here, update the policy in nl80211.c */ 310 /* add attributes here, update the policy in nl80211.c */
300 311
301 __NL80211_ATTR_AFTER_LAST, 312 __NL80211_ATTR_AFTER_LAST,
@@ -606,4 +617,79 @@ enum nl80211_mntr_flags {
606 NL80211_MNTR_FLAG_MAX = __NL80211_MNTR_FLAG_AFTER_LAST - 1 617 NL80211_MNTR_FLAG_MAX = __NL80211_MNTR_FLAG_AFTER_LAST - 1
607}; 618};
608 619
620/**
621 * enum nl80211_meshconf_params - mesh configuration parameters
622 *
623 * Mesh configuration parameters
624 *
625 * @__NL80211_MESHCONF_INVALID: internal use
626 *
627 * @NL80211_MESHCONF_RETRY_TIMEOUT: specifies the initial retry timeout in
628 * millisecond units, used by the Peer Link Open message
629 *
630 * @NL80211_MESHCONF_CONFIRM_TIMEOUT: specifies the inital confirm timeout, in
631 * millisecond units, used by the peer link management to close a peer link
632 *
633 * @NL80211_MESHCONF_HOLDING_TIMEOUT: specifies the holding timeout, in
634 * millisecond units
635 *
636 * @NL80211_MESHCONF_MAX_PEER_LINKS: maximum number of peer links allowed
637 * on this mesh interface
638 *
639 * @NL80211_MESHCONF_MAX_RETRIES: specifies the maximum number of peer link
640 * open retries that can be sent to establish a new peer link instance in a
641 * mesh
642 *
643 * @NL80211_MESHCONF_TTL: specifies the value of TTL field set at a source mesh
644 * point.
645 *
646 * @NL80211_MESHCONF_AUTO_OPEN_PLINKS: whether we should automatically
647 * open peer links when we detect compatible mesh peers.
648 *
649 * @NL80211_MESHCONF_HWMP_MAX_PREQ_RETRIES: the number of action frames
650 * containing a PREQ that an MP can send to a particular destination (path
651 * target)
652 *
653 * @NL80211_MESHCONF_PATH_REFRESH_TIME: how frequently to refresh mesh paths
654 * (in milliseconds)
655 *
656 * @NL80211_MESHCONF_MIN_DISCOVERY_TIMEOUT: minimum length of time to wait
657 * until giving up on a path discovery (in milliseconds)
658 *
659 * @NL80211_MESHCONF_HWMP_ACTIVE_PATH_TIMEOUT: The time (in TUs) for which mesh
660 * points receiving a PREQ shall consider the forwarding information from the
661 * root to be valid. (TU = time unit)
662 *
663 * @NL80211_MESHCONF_HWMP_PREQ_MIN_INTERVAL: The minimum interval of time (in
664 * TUs) during which an MP can send only one action frame containing a PREQ
665 * reference element
666 *
667 * @NL80211_MESHCONF_HWMP_NET_DIAM_TRVS_TIME: The interval of time (in TUs)
668 * that it takes for an HWMP information element to propagate across the mesh
669 *
670 * @NL80211_MESHCONF_ATTR_MAX: highest possible mesh configuration attribute
671 *
672 * @__NL80211_MESHCONF_ATTR_AFTER_LAST: internal use
673 */
674enum nl80211_meshconf_params {
675 __NL80211_MESHCONF_INVALID,
676 NL80211_MESHCONF_RETRY_TIMEOUT,
677 NL80211_MESHCONF_CONFIRM_TIMEOUT,
678 NL80211_MESHCONF_HOLDING_TIMEOUT,
679 NL80211_MESHCONF_MAX_PEER_LINKS,
680 NL80211_MESHCONF_MAX_RETRIES,
681 NL80211_MESHCONF_TTL,
682 NL80211_MESHCONF_AUTO_OPEN_PLINKS,
683 NL80211_MESHCONF_HWMP_MAX_PREQ_RETRIES,
684 NL80211_MESHCONF_PATH_REFRESH_TIME,
685 NL80211_MESHCONF_MIN_DISCOVERY_TIMEOUT,
686 NL80211_MESHCONF_HWMP_ACTIVE_PATH_TIMEOUT,
687 NL80211_MESHCONF_HWMP_PREQ_MIN_INTERVAL,
688 NL80211_MESHCONF_HWMP_NET_DIAM_TRVS_TIME,
689
690 /* keep last */
691 __NL80211_MESHCONF_ATTR_AFTER_LAST,
692 NL80211_MESHCONF_ATTR_MAX = __NL80211_MESHCONF_ATTR_AFTER_LAST - 1
693};
694
609#endif /* __LINUX_NL80211_H */ 695#endif /* __LINUX_NL80211_H */
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 0e85ec39b638..03e1e88c6a09 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -347,6 +347,25 @@ struct ieee80211_regdomain {
347 .flags = reg_flags, \ 347 .flags = reg_flags, \
348 } 348 }
349 349
350struct mesh_config {
351 /* Timeouts in ms */
352 /* Mesh plink management parameters */
353 u16 dot11MeshRetryTimeout;
354 u16 dot11MeshConfirmTimeout;
355 u16 dot11MeshHoldingTimeout;
356 u16 dot11MeshMaxPeerLinks;
357 u8 dot11MeshMaxRetries;
358 u8 dot11MeshTTL;
359 bool auto_open_plinks;
360 /* HWMP parameters */
361 u8 dot11MeshHWMPmaxPREQretries;
362 u32 path_refresh_time;
363 u16 min_discovery_timeout;
364 u32 dot11MeshHWMPactivePathTimeout;
365 u16 dot11MeshHWMPpreqMinInterval;
366 u16 dot11MeshHWMPnetDiameterTraversalTime;
367};
368
350/* from net/wireless.h */ 369/* from net/wireless.h */
351struct wiphy; 370struct wiphy;
352 371
@@ -397,6 +416,12 @@ struct wiphy;
397 * 416 *
398 * @change_station: Modify a given station. 417 * @change_station: Modify a given station.
399 * 418 *
419 * @get_mesh_params: Put the current mesh parameters into *params
420 *
421 * @set_mesh_params: Set mesh parameters.
422 * The mask is a bitfield which tells us which parameters to
423 * set, and which to leave alone.
424 *
400 * @set_mesh_cfg: set mesh parameters (by now, just mesh id) 425 * @set_mesh_cfg: set mesh parameters (by now, just mesh id)
401 * 426 *
402 * @change_bss: Modify parameters for a given BSS. 427 * @change_bss: Modify parameters for a given BSS.
@@ -452,7 +477,12 @@ struct cfg80211_ops {
452 int (*dump_mpath)(struct wiphy *wiphy, struct net_device *dev, 477 int (*dump_mpath)(struct wiphy *wiphy, struct net_device *dev,
453 int idx, u8 *dst, u8 *next_hop, 478 int idx, u8 *dst, u8 *next_hop,
454 struct mpath_info *pinfo); 479 struct mpath_info *pinfo);
455 480 int (*get_mesh_params)(struct wiphy *wiphy,
481 struct net_device *dev,
482 struct mesh_config *conf);
483 int (*set_mesh_params)(struct wiphy *wiphy,
484 struct net_device *dev,
485 const struct mesh_config *nconf, u32 mask);
456 int (*change_bss)(struct wiphy *wiphy, struct net_device *dev, 486 int (*change_bss)(struct wiphy *wiphy, struct net_device *dev,
457 struct bss_parameters *params); 487 struct bss_parameters *params);
458}; 488};